Documentation
¶
Overview ¶
Package testutil defines the testing utils such as asserting logs.
Index ¶
- func AssertLogsContain(t *testing.T, hook *test.Hook, want string)
- func AssertLogsDoNotContain(t *testing.T, hook *test.Hook, want string)
- func BitLength(b int) int
- func BitSetCount(bytes []byte) int
- func CheckBit(bitfield []byte, index int) (bool, error)
- func WaitForLog(t *testing.T, hook *test.Hook, want string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertLogsContain ¶
AssertLogsContain checks that the desired string is a subset of the current log output. Set exitOnFail to true to immediately exit the test on failure
func AssertLogsDoNotContain ¶
AssertLogsDoNotContain is the inverse check of AssertLogsContain
func BitLength ¶
BitLength returns the length of the bitfield for a giben number of attesters in bytes.
func BitSetCount ¶
BitSetCount counts the number of 1s in a byte using the following algo: https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.