Documentation
¶
Overview ¶
Package assert provides functions for writing assertions in tests.
Index ¶
- func Between(tb testing.TB, start, end, actual any, args ...any)
- func Diff[T any](expected, actual T) []byte
- func ElementsMatch[T any](tb testing.TB, expected, actual []T, args ...any) bool
- func Equal[T any](tb testing.TB, expected, actual T, args ...any)
- func Error(tb testing.TB, expected any, actual error, args ...any) bool
- func Fatal(tb testing.TB, msg Message)
- func NoError(tb testing.TB, actual error, args ...any) bool
- func NoPanic(tb testing.TB, fn func(), args ...any)
- func Ok[T any](tb testing.TB, v T, err error) T
- func Panic(tb testing.TB, expected any, fn func(), args ...any)
- func Print(v any)
- func Sprint(v any) string
- func WithEnviron(tb testing.TB, environ map[string]string, fn func())
- func WithinDuration(tb testing.TB, expected, actual time.Time, delta time.Duration, args ...any)
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ElementsMatch ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.