Documentation ¶
Index ¶
- func Equal[T comparable](t testing.TB, a, b T) bool
- func EqualNow[T comparable](t testing.TB, a, b T)
- func Error(t testing.TB, err error) bool
- func ErrorNow(t testing.TB, err error)
- func NoError(t testing.TB, err error) bool
- func NoErrorNow(t testing.TB, err error)
- func NotNil(t testing.TB, v any) bool
- func NotNilNow(t testing.TB, v any)
- func PanicsNow(t testing.TB, f func())
- func Smaller[T constraints.Ordered](t testing.TB, a, b T) bool
- func SmallerNow[T constraints.Ordered](t testing.TB, a, b T)
- func StringContains(t testing.TB, s, substr string) bool
- func True(t testing.TB, b bool, msg string) bool
- func TrueNow(t testing.TB, b bool, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
func Equal[T comparable](t testing.TB, a, b T) bool
Equal asserts that a == b. Returns true if assertion passes.
func EqualNow ¶
func EqualNow[T comparable](t testing.TB, a, b T)
EqualNow asserts that a == b, terminating test immediately otherwise.
func ErrorNow ¶
ErrorNow asserts that the provided value is an error, terminating the test if this is not true.
func NoError ¶
NoError asserts that the provided value is not an error. Returns true if assertion passes.
func NoErrorNow ¶
NoErrorNow asserts that the provided value is not an error, terminating the test if this is not true.
func PanicsNow ¶
PanicsNow asserts that the provided function panics, terminating the test immediately if it doesn't.
func Smaller ¶
func Smaller[T constraints.Ordered](t testing.TB, a, b T) bool
Smaller asserts that a < b. Returns true if assertion passes.
func SmallerNow ¶
func SmallerNow[T constraints.Ordered](t testing.TB, a, b T)
SmallerNow asserts that a < b, terminating test immediately otherwise.
func StringContains ¶
StringContains asserts that substr is within s. Returns true if assertion passes.
Types ¶
This section is empty.