Documentation
¶
Index ¶
- Variables
- func AssertBytesEqual(t *testing.T, a, b []byte, contextArgs ...interface{}) bool
- func AssertBytesNotEqual(t *testing.T, a, b []byte, contextArgs ...interface{}) bool
- func AssertEqual(t *testing.T, a, b interface{}, contextArgs ...interface{}) bool
- func AssertEqualAny(t *testing.T, a interface{}, possibilities []interface{}, ...) bool
- func AssertError(t *testing.T, err error, contextArgs ...interface{}) bool
- func AssertFalse(t *testing.T, b bool, contextArgs ...interface{}) bool
- func AssertIsError(t *testing.T, err error, target error, contextArgs ...interface{}) bool
- func AssertIsNotError(t *testing.T, err error, target error, contextArgs ...interface{}) bool
- func AssertNil(t *testing.T, a interface{}, contextArgs ...interface{}) bool
- func AssertNoError(t *testing.T, err error, contextArgs ...interface{}) bool
- func AssertNoErrorFatal(t *testing.T, err error, contextArgs ...interface{}) bool
- func AssertNotEqual(t *testing.T, a, b interface{}, contextArgs ...interface{}) bool
- func AssertNotEqualShallow(t *testing.T, a, b interface{}, contextArgs ...interface{}) bool
- func AssertNotNil(t *testing.T, a interface{}, contextArgs ...interface{}) bool
- func AssertTrue(t *testing.T, b bool, contextArgs ...interface{}) bool
- type Logger
Constants ¶
This section is empty.
Variables ¶
var ErrStatic = errors.New("static test error")
ErrStatic is an error used for testing purposes only
Functions ¶
func AssertBytesEqual ¶
AssertBytesEqual can be used to (test) assert that two byte slices are equal logging a message with context and stacktrace if false.
func AssertBytesNotEqual ¶
AssertBytesNotEqual can be used to (test) assert that two byte slices are not equal logging a message with context and stacktrace if false.
func AssertEqual ¶
AssertEqual can be used to (test) assert that 2 values are deep (reflect) equal, logging a message with context and stacktrace if false
func AssertEqualAny ¶
func AssertEqualAny(t *testing.T, a interface{}, possibilities []interface{}, contextArgs ...interface{}) bool
AssertEqualAny can be used to (test) assert that a value is deep (reflect) equal with any of the given possibilities, logging a message with context and stacktrace if false
func AssertError ¶
AssertError can be used to (test) assert if an error is non-nil, logging a message with context and stacktrace if false
func AssertFalse ¶
AssertFalse can be used to (test) assert that a boolean is true logging a message with context and stacktrace if false.
func AssertIsError ¶
AssertIsError can be used to (test) assert if an error is a specific kind of error, logging a message with context and stacktrace if false
func AssertIsNotError ¶
AssertIsNotError can be used to (test) assert if an error is not a specific kind of error, logging a message with context and stacktrace if false
func AssertNil ¶
AssertNil can be used to (test) assert that a value is nil, logging a message with context and stacktrace if false.
func AssertNoError ¶
AssertNoError can be used to (test) assert if an error is nil, logging a message with context and stacktrace if false
func AssertNoErrorFatal ¶
AssertNoErrorFatal can be used to (test) assert if an error is nil, logging a message with context and stacktrace if true, and halting the program afterwards.
func AssertNotEqual ¶
AssertNotEqual can be used to (test) assert that 2 values are not deep (reflect) equal, logging a message with context and stacktrace if false.
func AssertNotEqualShallow ¶
AssertNotEqualShallow can be used to (test) assert that two values are by value equal or by pointer, logging a message with context and stacktrace if false.
func AssertNotNil ¶
AssertNotNil can be used to (test) assert that a value is not nil, logging a message with context and stacktrace if false.
Types ¶
type Logger ¶
type Logger struct{}
Logger is a `bqwriter/log.Logger` implementation for (unit) testing purposes only.
func (Logger) Debug ¶
func (Logger) Debug(_args ...interface{})
Debug implements bqwriter/log.Logger.Debug