Documentation ¶
Index ¶
- func DeepEqual(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
- func DeepNotEqual(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
- func Equal(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
- func ErrorContains(loggerFn assertionLoggerFn, want string, err error, msg ...interface{})
- func LogsContain(loggerFn assertionLoggerFn, hook *test.Hook, want string, flag bool, ...)
- func LogsContainNTimes(loggerFn assertionLoggerFn, hook *test.Hook, want string, times uint64, ...)
- func NoError(loggerFn assertionLoggerFn, err error, msg ...interface{})
- func NotEqual(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
- func NotNil(loggerFn assertionLoggerFn, obj interface{}, msg ...interface{})
- type AssertionTestingTB
- type TBMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepEqual ¶
func DeepEqual(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
DeepEqual compares values using DeepEqual.
func DeepNotEqual ¶
func DeepNotEqual(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
DeepNotEqual compares values using DeepEqual.
func Equal ¶
func Equal(loggerFn assertionLoggerFn, expected, actual interface{}, msg ...interface{})
Equal compares values using comparison operator.
func ErrorContains ¶
ErrorContains asserts that actual error contains wanted message.
func LogsContain ¶
func LogsContain(loggerFn assertionLoggerFn, hook *test.Hook, want string, flag bool, msg ...interface{})
LogsContain checks whether a given substring is a part of logs. If flag=false, inverse is checked.
func LogsContainNTimes ¶ added in v0.7.0
func LogsContainNTimes(loggerFn assertionLoggerFn, hook *test.Hook, want string, times uint64, flag bool, msg ...interface{})
LogsContainNTimes checks whether a given substring is a part of logs with certain number of times. If flag=false, inverse is checked.
func NoError ¶
func NoError(loggerFn assertionLoggerFn, err error, msg ...interface{})
NoError asserts that error is nil.
Types ¶
type AssertionTestingTB ¶
type AssertionTestingTB interface { Errorf(format string, args ...interface{}) Fatalf(format string, args ...interface{}) }
AssertionTestingTB exposes enough testing.TB methods for assertions.
Click to show internal directories.
Click to hide internal directories.