Documentation
¶
Overview ¶
Package assert provides lightweight test assertions used by the root module.
Index ¶
- func Contains(t testingT, container, item any, msgAndArgs ...any) bool
- func Empty(t testingT, object any, msgAndArgs ...any) bool
- func Equal(t testingT, expected, actual any, msgAndArgs ...any) bool
- func Error(t testingT, err error, msgAndArgs ...any) bool
- func ErrorIs(t testingT, err, target error, msgAndArgs ...any) bool
- func False(t testingT, value bool, msgAndArgs ...any) bool
- func Greater(t testingT, actual, expected any, msgAndArgs ...any) bool
- func GreaterOrEqual(t testingT, actual, expected any, msgAndArgs ...any) bool
- func Implements(t testingT, interfaceObject, object any, msgAndArgs ...any) bool
- func InDelta(t testingT, expected, actual, delta any, msgAndArgs ...any) bool
- func InDeltaSlice(t testingT, expected, actual any, delta float64, msgAndArgs ...any) bool
- func IsType(t testingT, expectedType, object any, msgAndArgs ...any) bool
- func Len(t testingT, object any, length int, msgAndArgs ...any) bool
- func Less(t testingT, actual, expected any, msgAndArgs ...any) bool
- func LessOrEqual(t testingT, actual, expected any, msgAndArgs ...any) bool
- func Nil(t testingT, value any, msgAndArgs ...any) bool
- func NoError(t testingT, err error, msgAndArgs ...any) bool
- func NotContains(t testingT, container, item any, msgAndArgs ...any) bool
- func NotEmpty(t testingT, object any, msgAndArgs ...any) bool
- func NotEqual(t testingT, expected, actual any, msgAndArgs ...any) bool
- func NotNil(t testingT, value any, msgAndArgs ...any) bool
- func NotPanics(t testingT, fn func(), msgAndArgs ...any) bool
- func NotSame(t testingT, expected, actual any, msgAndArgs ...any) bool
- func Regexp(t testingT, rx any, str any, msgAndArgs ...any) bool
- func Same(t testingT, expected, actual any, msgAndArgs ...any) bool
- func True(t testingT, value bool, msgAndArgs ...any) bool
- func Zero(t testingT, value any, msgAndArgs ...any) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GreaterOrEqual ¶
GreaterOrEqual reports whether actual is greater than or equal to expected.
func Implements ¶
Implements reports whether object implements interfaceObject.
func InDeltaSlice ¶
InDeltaSlice reports whether numeric slices differ element-wise by at most delta.
func LessOrEqual ¶
LessOrEqual reports whether actual is less than or equal to expected.
func NotContains ¶
NotContains reports whether container does not contain item.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.