Documentation ¶
Overview ¶
Package assert 测试断言.
包括各种测试断言.
Index ¶
- func Contains[T comparable](errorf errorfer, contains []T, sub T, msgAndArgs ...any) bool
- func Equal[T comparable](errorf errorfer, expected, actual T, msgAndArgs ...any) bool
- func Equals[T comparable](errorf errorfer, expected, actual []T, msgAndArgs ...any) bool
- func Fail(errorf errorfer, failureMessage string, msgAndArgs ...any) bool
- func False(errorf errorfer, value bool, msgAndArgs ...interface{}) bool
- func Greater[T constraints.Ordered](errorf errorfer, big, small T, msgAndArgs ...any) bool
- func GreaterOrEqual[T constraints.Ordered](errorf errorfer, big, small T, msgAndArgs ...any) bool
- func Less[T constraints.Ordered](errorf errorfer, small, big T, msgAndArgs ...any) bool
- func LessOrEqual[T constraints.Ordered](errorf errorfer, small, big T, msgAndArgs ...any) bool
- func Message(args ...any) string
- func Nil(errorf errorfer, value any, msgAndArgs ...any) bool
- func NotEqual[T comparable](errorf errorfer, expected, actual T, msgAndArgs ...any) bool
- func NotEquals[T comparable](errorf errorfer, expected, actual []T, msgAndArgs ...any) bool
- func NotNil(errorf errorfer, value any, msgAndArgs ...any) bool
- func Panics(errorf errorfer, call panicFunc, msgAndArgs ...any) bool
- func PanicsWithError(errorf errorfer, errString string, call panicFunc, msgAndArgs ...any) bool
- func True(errorf errorfer, value bool, msgAndArgs ...any) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](errorf errorfer, contains []T, sub T, msgAndArgs ...any) bool
func Equal ¶
func Equal[T comparable](errorf errorfer, expected, actual T, msgAndArgs ...any) bool
func Equals ¶
func Equals[T comparable](errorf errorfer, expected, actual []T, msgAndArgs ...any) bool
func Greater ¶
func Greater[T constraints.Ordered](errorf errorfer, big, small T, msgAndArgs ...any) bool
func GreaterOrEqual ¶
func GreaterOrEqual[T constraints.Ordered](errorf errorfer, big, small T, msgAndArgs ...any) bool
func LessOrEqual ¶
func LessOrEqual[T constraints.Ordered](errorf errorfer, small, big T, msgAndArgs ...any) bool
func NotEqual ¶
func NotEqual[T comparable](errorf errorfer, expected, actual T, msgAndArgs ...any) bool
func NotEquals ¶ added in v0.3.22
func NotEquals[T comparable](errorf errorfer, expected, actual []T, msgAndArgs ...any) bool
func PanicsWithError ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.