Documentation
¶
Index ¶
- func Contains(t TestingT, s string, substr string, args ...any) bool
- func Equal(t TestingT, expected any, actual any, args ...any) bool
- func Error(t TestingT, err error, args ...any) bool
- func ErrorContains(t TestingT, err error, substr string, args ...any) bool
- func FailIf(t TestingT, condition bool, args ...any) bool
- func FailIfError(t TestingT, err error, args ...any) bool
- func False(t TestingT, condition bool, args ...any) bool
- func FatalIf(t TestingT, condition bool, args ...any)
- func FatalIfError(t TestingT, err error, args ...any)
- func Nil(t TestingT, obj any, args ...any) bool
- func NoError(t TestingT, err error, args ...any) bool
- func NotContains(t TestingT, s string, substr string, args ...any) bool
- func NotEqual(t TestingT, expected any, actual any, args ...any) bool
- func NotNil(t TestingT, obj any, args ...any) bool
- func NotZero[T int8 | int16 | int32 | int64 | int | float32 | float64](t TestingT, actual T, args ...any) bool
- func SliceContains[T any](t TestingT, slice []T, contains T, args ...any) bool
- func SliceEqual[T comparable](t TestingT, expected []T, actual []T, args ...any) bool
- func SliceLen[T any](t TestingT, slice []T, length int, args ...any) bool
- func SliceNotContains[T any](t TestingT, slice []T, contains T, args ...any) bool
- func SliceNotEqual[T comparable](t TestingT, expected []T, actual []T, args ...any) bool
- func StrLen(t TestingT, s string, length int, args ...any) bool
- func True(t TestingT, condition bool, args ...any) bool
- func Zero[T int8 | int16 | int32 | int64 | int | float32 | float64](t TestingT, actual T, args ...any) bool
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorContains ¶
ErrorContains fails the test if the err is nil or if it does not contain the substring.
func FailIf ¶
FailIf fails the test if the condition is met. If returns back the result of evaluating the condition.
func FailIfError ¶
FailIfError is a shortcut to FailIf(t, err != nil, append([]any{err}, args...)...) .
func FatalIfError ¶
FatalIfError is a shortcut to FatalIf(t, err != nil, append([]any{err}, args...)...) .
func NotContains ¶
NotContains fails the test if the string contain a substring.
func NotZero ¶
func NotZero[T int8 | int16 | int32 | int64 | int | float32 | float64](t TestingT, actual T, args ...any) bool
NotZero fails the test if the value is 0.
func SliceContains ¶
SliceContains fails the test if the slice does not contain the item.
func SliceEqual ¶
func SliceEqual[T comparable](t TestingT, expected []T, actual []T, args ...any) bool
SliceEqual fails the test if the two values are not equal.
func SliceNotContains ¶
SliceNotContains fails the test if the slice contains the item.
func SliceNotEqual ¶
func SliceNotEqual[T comparable](t TestingT, expected []T, actual []T, args ...any) bool
SliceNotEqual fails the test if the two values are equal.
