Documentation ¶
Overview ¶
This is a package that defines helper functions for writing unit tests.
Index ¶
- func ContainsError(expected error, got error, t *testing.T)
- func Eq(l any, r any, t *testing.T)
- func False(v bool, t *testing.T)
- func FloatEq[T ~float32 | float64](l T, r T, eps T, t *testing.T)
- func FormatError(expected any, got any, base string, file string, line int, t *testing.T)
- func MapsMatch[K comparable, V any](actual map[K]V, generated map[K]V, t *testing.T)
- func Neq(l any, r any, t *testing.T)
- func Nil(v any, t *testing.T)
- func NilPntr[T any](v *T, t *testing.T)
- func NilSlice[T any](v []T, t *testing.T)
- func NoPanic(action func(), t *testing.T)
- func NotNil(v any, t *testing.T)
- func NotNilPntr[T any](v *T, t *testing.T)
- func NotNilSlice[T any](v []T, t *testing.T)
- func Panics(action func(), t *testing.T)
- func SlicesMatch[T any](actual []T, generated []T, t *testing.T)
- func SlicesMatchUnordered[T any](actual []T, generated []T, t *testing.T)
- func True(v bool, t *testing.T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatError ¶
func MapsMatch ¶
func MapsMatch[K comparable, V any]( actual map[K]V, generated map[K]V, t *testing.T, )
func NotNilPntr ¶
func NotNilSlice ¶
func SlicesMatch ¶
func SlicesMatchUnordered ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.