Documentation
¶
Index ¶
- func Equal[T comparable](t *testing.T, expected, got T) bool
- func EqualSeq2[K, V any](t *testing.T, expected, got iter.Seq2[K, V], ...) bool
- func EqualSlice[T comparable](t *testing.T, expected, got []T) bool
- func EqualSliceFunc[T comparable](t *testing.T, expected, got []T, equal func(want, item T) bool) bool
- func EqualTime(t *testing.T, expected, got time.Time) bool
- func Equalf[T comparable](t *testing.T, expected, got T, format string, args ...any) bool
- func Error(t *testing.T, got error) bool
- func Falsef(t *testing.T, got bool, format string, args ...any) bool
- func MustNoError[T any](t *testing.T, fn func() (T, error)) T
- func NoError(t *testing.T, got error) bool
- func NoErrorEventually(t *testing.T, duration time.Duration, fn func() error) bool
- func NoPanic(t *testing.T, assert func())
- func NotEqual[T comparable](t *testing.T, unexpected, got T) bool
- func NotNil(t *testing.T, got any) bool
- func Panic(t *testing.T, assert func())
- func Truef(t *testing.T, got bool, format string, args ...any) bool
- type KeyValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualSlice ¶
func EqualSlice[T comparable](t *testing.T, expected, got []T) bool
func EqualSliceFunc ¶
func EqualSliceFunc[T comparable](t *testing.T, expected, got []T, equal func(want, item T) bool) bool
func NoErrorEventually ¶
NoErrorEventually retries fn up to 10 times over the given duration. It returns true if any call to fn returns nil. If all attempts fail, it logs the last error and fails the test.
Types ¶
Click to show internal directories.
Click to hide internal directories.