Documentation ¶
Overview ¶
assert implements several helper methods for comparing elements during tests, all of which fail the test immediately.
Index ¶
- func Close(t *testing.T, a, b, delta float64)
- func CloseMsg(t *testing.T, a, b, delta float64, msg string)
- func DeepEq(t *testing.T, got, expected any)
- func DeepEqMsg(t *testing.T, got, expected any, msg string)
- func Eq[T comparable](t *testing.T, got, expected T)
- func EqMsg[T comparable](t *testing.T, got, expected T, msg string)
- func Err(t *testing.T, got error)
- func ErrMsg(t *testing.T, got error, msg string)
- func False(t *testing.T, got bool)
- func FalseMsg(t *testing.T, got bool, msg string)
- func Ge[T constraints.Ordered](t *testing.T, a, b T)
- func GeMsg[T constraints.Ordered](t *testing.T, a, b T, msg string)
- func Gt[T constraints.Ordered](t *testing.T, a, b T)
- func GtMsg[T constraints.Ordered](t *testing.T, a, b T, msg string)
- func Inf(t *testing.T, got float64)
- func InfMsg(t *testing.T, got float64, msg string)
- func Le[T constraints.Ordered](t *testing.T, a, b T)
- func LeMsg[T constraints.Ordered](t *testing.T, a, b T, msg string)
- func Lt[T constraints.Ordered](t *testing.T, a, b T)
- func LtMsg[T constraints.Ordered](t *testing.T, a, b T, msg string)
- func NaN(t *testing.T, got float64)
- func NaNMsg(t *testing.T, got float64, msg string)
- func Ne[T comparable](t *testing.T, got, expected T)
- func NeMsg[T comparable](t *testing.T, got, expected T, msg string)
- func NoErr(t *testing.T, got error)
- func NoErrMsg(t *testing.T, got error, msg string)
- func Normal(t *testing.T, got float64)
- func NormalMsg(t *testing.T, got float64, msg string)
- func NotInf(t *testing.T, got float64)
- func NotInfMsg(t *testing.T, got float64, msg string)
- func NotNaN(t *testing.T, got float64)
- func NotNaNMsg(t *testing.T, got float64, msg string)
- func NotNormal(t *testing.T, got float64)
- func NotNormalMsg(t *testing.T, got float64, msg string)
- func SpecificErr(t *testing.T, got, expected error)
- func SpecificErrMsg(t *testing.T, got, expected error, msg string)
- func True(t *testing.T, got bool)
- func TrueMsg(t *testing.T, got bool, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eq ¶
func Eq[T comparable](t *testing.T, got, expected T)
func Ne ¶
func Ne[T comparable](t *testing.T, got, expected T)
func SpecificErr ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.