Documentation
¶
Overview ¶
Package testenv provides general test utilities.
Index ¶
- func BytesEqual(a *assert.Assertions, expected, actual []byte, msgAndArgs ...any) bool
- func BytesFromHex(input string) []byte
- func Exit(code int)
- func FromJSON[T any](j string) (value T)
- func MakeAR(t require.TestingT) (*assert.Assertions, *require.Assertions)
- func RandBytes(p []byte)
- func ToJSON(v any) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesEqual ¶
func BytesEqual(a *assert.Assertions, expected, actual []byte, msgAndArgs ...any) bool
BytesEqual asserts that actual bytes equals expected bytes. It considers nil slice and zero-length slice to be the same.
func BytesFromHex ¶
BytesFromHex converts a hexadecimal string to a byte slice. The octets must be written as upper case. All characters other than [0-9A-F] are considered comments and stripped.
func MakeAR ¶
func MakeAR(t require.TestingT) (*assert.Assertions, *require.Assertions)
MakeAR creates testify assert and require objects.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.