Documentation
¶
Index ¶
- func DeepEqual(loggerFn assertionLoggerFn, expected, actual any, msg ...any)
- func DeepNotEqual(loggerFn assertionLoggerFn, expected, actual any, msg ...any)
- func DeepNotSSZEqual(loggerFn assertionLoggerFn, expected, actual any, msg ...any)
- func DeepSSZEqual(loggerFn assertionLoggerFn, expected, actual any, msg ...any)
- func Equal(loggerFn assertionLoggerFn, expected, actual any, msg ...any)
- func ErrorContains(loggerFn assertionLoggerFn, want string, err error, msg ...any)
- func ErrorIs(loggerFn assertionLoggerFn, err, target error, msg ...any)
- func IsNil(loggerFn assertionLoggerFn, got any, msg ...any)
- func LogsContain(loggerFn assertionLoggerFn, hook *test.Hook, want string, flag bool, ...)
- func NoError(loggerFn assertionLoggerFn, err error, msg ...any)
- func NotEmpty(loggerFn assertionLoggerFn, obj any, msg ...any)
- func NotEqual(loggerFn assertionLoggerFn, expected, actual any, msg ...any)
- func NotNil(loggerFn assertionLoggerFn, obj any, msg ...any)
- func ProtobufPrettyDiff(a, b any) string
- func SprintfAssertionLoggerFn(s *string) assertionLoggerFn
- func StringContains(loggerFn assertionLoggerFn, expected, actual string, flag bool, msg ...any)
- type AssertionTestingTB
- type TBMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepNotEqual ¶
DeepNotEqual compares values using DeepEqual.
func DeepNotSSZEqual ¶
DeepNotSSZEqual compares values using ssz.DeepEqual.
func DeepSSZEqual ¶
DeepSSZEqual compares values using ssz.DeepEqual.
func ErrorContains ¶
ErrorContains asserts that actual error contains wanted message.
func ErrorIs ¶
ErrorIs uses Errors.Is to recursively unwrap err looking for target in the chain. If any error in the chain matches target, the assertion will pass.
func LogsContain ¶
LogsContain checks whether a given substring is a part of logs. If flag=false, inverse is checked.
func NotEmpty ¶
NotEmpty asserts that an object's fields are not empty. This function recursively checks each pointer / struct field.
func ProtobufPrettyDiff ¶
func SprintfAssertionLoggerFn ¶
func SprintfAssertionLoggerFn(s *string) assertionLoggerFn
func StringContains ¶
StringContains checks whether a string contains specified substring. If flag is false, inverse is checked.
Types ¶
type AssertionTestingTB ¶
type AssertionTestingTB interface {
Errorf(format string, args ...any)
Fatalf(format string, args ...any)
}
AssertionTestingTB exposes enough testing.TB methods for assertions.