Documentation
¶
Index ¶
- func Approx[T constraints.Float](t *testing.T, val T, expected T, epsilon T)
- func Contains[T comparable](t *testing.T, hatstack []T, needle T)
- func Empty[T any](t *testing.T, val []T)
- func Eq[T comparable](t *testing.T, val T, expected T)
- func Error(t *testing.T, err error, expected string)
- func False(t *testing.T, val bool)
- func Gt[T constraints.Ordered](t *testing.T, val T, threshold T)
- func Gte[T constraints.Ordered](t *testing.T, val T, threshold T)
- func Len[T any](t *testing.T, val []T, count int)
- func Lt[T constraints.Ordered](t *testing.T, val T, threshold T)
- func Lte[T constraints.Ordered](t *testing.T, val T, threshold T)
- func Match(t *testing.T, val string, pattern string)
- func Nil(t *testing.T, val any)
- func NotNil(t *testing.T, val any)
- func Panic(t *testing.T)
- func True(t *testing.T, val bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Approx ¶
func Approx[T constraints.Float](t *testing.T, val T, expected T, epsilon T)
Approx is a helper function to test if the passed floating point numbers are approximately equal.
func Contains ¶ added in v1.0.3
func Contains[T comparable](t *testing.T, hatstack []T, needle T)
Contains is a helper fuction to test if the passed haystack array contains the needle value.
func Eq ¶
func Eq[T comparable](t *testing.T, val T, expected T)
Eq is a helper function to test the equality of two passed values.
func Gt ¶
func Gt[T constraints.Ordered](t *testing.T, val T, threshold T)
Gt is a helper function to test if the passed value is greater than the threshold.
func Gte ¶
func Gte[T constraints.Ordered](t *testing.T, val T, threshold T)
Gt is a helper function to test if the passed value is greater than or equal to the threshold.
func Lt ¶
func Lt[T constraints.Ordered](t *testing.T, val T, threshold T)
Lt is a helper function to test if the passed value is less than the threshold.
func Lte ¶
func Lte[T constraints.Ordered](t *testing.T, val T, threshold T)
Lte is a helper function to test if the passed value is less than or equal to the threshold.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.