Documentation
¶
Index ¶
- func Fatalf(t *testing.T, format string, args, message []any)
- func ItContains(t *testing.T, s string, substr any, message ...any)
- func ItHasPrefix(t *testing.T, corpus string, prefix any, message ...any)
- func ItHasSuffix(t *testing.T, corpus string, suffix any, message ...any)
- func ItMatches(t *testing.T, expr string, actual any, message ...any)
- func ItNotContains(t *testing.T, s string, substr any, message ...any)
- func ItNotHasPrefix(t *testing.T, corpus string, prefix any, message ...any)
- func ItNotHasSuffix(t *testing.T, corpus string, suffix any, message ...any)
- func ItNotMatches(t *testing.T, expr string, actual any, message ...any)
- func ItNotPanics[T any](t *testing.T, fn func() T, message ...any) (out T)
- func ItPanics(t *testing.T, fn func(), message ...any)
- func ItsAll[T any](t *testing.T, values []T, fn func(T) bool, message ...any)
- func ItsAny[T any](t *testing.T, values []T, fn func(T) bool, message ...any)
- func ItsEmpty(t *testing.T, v any, message ...any)
- func ItsEpsilon[T IEpsilon](t *testing.T, actual, expected, epsilon T, message ...any)
- func ItsEqual(t *testing.T, expected, actual any, message ...any)
- func ItsFalse(t *testing.T, expectedFalse bool, message ...any)
- func ItsInTimeDelta(t *testing.T, t0, t1 time.Time, d time.Duration, userMessage ...any)
- func ItsLen(t *testing.T, v interface{}, expected int, message ...any)
- func ItsNil(t *testing.T, v any, message ...any)
- func ItsNone[T comparable](t *testing.T, values []T, fn func(T) bool, message ...any)
- func ItsNotEmpty(t *testing.T, v any, message ...any)
- func ItsNotEqual(t *testing.T, expected, actual any, message ...any)
- func ItsNotInTimeDelta(t *testing.T, t0, t1 time.Time, d time.Duration, userMessage ...any)
- func ItsNotNil(t *testing.T, v any, message ...any)
- func ItsNotZero(t *testing.T, actual any, message ...any)
- func ItsTrue(t *testing.T, expectedTrue bool, message ...any)
- func ItsZero(t *testing.T, actual any, message ...any)
- func Len(object any) int
- func Nil(object any) bool
- type IEpsilon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ItContains ¶
ItContains a test helper to verify that a string contains a given string.
func ItHasPrefix ¶
ItContains a test helper to verify that a string contains a given string.
func ItHasSuffix ¶
ItContains a test helper to verify that a string contains a given string.
func ItNotContains ¶
ItContains a test helper to verify that a string does not contain a given string.
func ItNotHasPrefix ¶
ItContains a test helper to verify that a string does not contain a given string.
func ItNotHasSuffix ¶
ItContains a test helper to verify that a string does not contain a given string.
func ItNotMatches ¶
ItNotMatches is a test helper to verify that an expression does not match a given string.
func ItNotPanics ¶
ItNotPanics is an assertion helper.
It will test that a given function panics using a recovery.
func ItPanics ¶
ItPanics is an assertion helper.
It will test that a given function panics using a recovery.
func ItsAll ¶
ItsAll is an assertion helper.
It will test that all values in the slice match the filter.
func ItsAny ¶
ItsAny is an assertion helper.
It will test that any value in the slice matches the filter.
func ItsEmpty ¶
ItsEmpty is an assertion helper.
It will test that the given value is empty, printing the value if the value has a string form.
func ItsEpsilon ¶
ItsEpsilon asserts that two numbers are within an epsilon of each other.
func ItsEqual ¶
ItsEqual is a test helper to verify that two arguments are equal.
You can use it to build up other assertions, such as for length or not-nil.
func ItsInTimeDelta ¶
ItsInTimeDelta is a test helper to verify that two times are within a given duration.
It works strictly in an absolute sense, that is if one time is before another, or vice versa the delta will always be positive.
func ItsNil ¶
ItsNil is an assertion helper.
It will test that the given value is nil, printing the value if the value has a string form.
func ItsNone ¶
func ItsNone[T comparable](t *testing.T, values []T, fn func(T) bool, message ...any)
ItsNone is an assertion helper.
It will test that none of the values in the slice match the filter.
func ItsNotEmpty ¶
ItsNotEmpty is an assertion helper.
It will test that the given value is not empty.
func ItsNotEqual ¶
ItsNotEqual is a test helper to verify that two arguments are not equal.
You can use it to build up other assertions, such as for length or not-nil.
func ItsNotInTimeDelta ¶
ItsNotInTimeDelta is a test helper to verify that two times are within a given duration.
It works strictly in an absolute sense, that is if one time is before another, or vice versa the delta will always be positive.
func ItsNotZero ¶
ItsNotZero is a test helper to verify that an argument is not zero.