Versions in this module Expand all Collapse all v0 v0.1.0 Mar 6, 2024 Changes in this version + var DefaultTimeout = 20 * time.Second + var ErrChannelClosed = errors.New("channel was closed") + var ErrReadTimeout = errors.New("context timed out while reading channel") + var IgnoreUnexported = cmpopts.IgnoreUnexported + func AsCheckFunc[W any, G any](check func(W, G) error) func(W) CheckFunc[G] + func DoesNotPanic(f func()) (err error) + func Equal[T any](want, got T, opts ...cmp.Option) error + func Equalf[T any](want, got T, msg string, args ...any) error + func Expect(t *testing.T, errs ...error) + func HasNoError[T any](_ T, err error) error + func IgnoreFields[T any](fields ...string) cmp.Option + func IsEmptySlice[T any](slice []T) error + func IsError(want, got error) error + func IsErrorf(want, got error, msg string, args ...any) error + func IsNilPointer[T any](ptr *T) error + func IsNilPointerf[T any](ptr *T, msg string, args ...any) error + func IsNotEmptySlice[T any](slice []T) error + func IsNotNilPointer[T any](ptr *T) error + func IsNotNilPointerf[T any](ptr *T, msg string, args ...any) error + func IsNotZero[T any](have T, opts ...cmp.Option) error + func IsNotZerof[T any](have T, msg string, args ...any) error + func IsSamePointer[T any](want, got *T) error + func IsSamePointerf[T any](want, got *T, msg string, args ...any) error + func IsZero[T any](obj T) error + func NewTestContext() (context.Context, context.CancelFunc) + func NoError(err error) error + func NoErrorf(err error, msg string, args ...any) error + func NotEqual[T any](want, got T, opts ...cmp.Option) error + func NotEqualf[T any](want, got T, msg string, args ...any) error + func PointerTo[T any](obj T) *T + func ReadChannel[T any](ctx context.Context, ch <-chan T) (T, error) + func Require(t *testing.T, errs ...error) + func ShouldPanic(f func()) error + func SliceContains[T comparable](want T, slice []T) error + func SliceDoesNotContain[T comparable](want T, slice []T) error + func SliceHasLength[T any](want int, slice []T) error + func TestContext(timeout time.Duration) (context.Context, context.CancelFunc) + type CheckFunc func(T, error) error + func CheckAll[T any](checks ...CheckFunc[T]) CheckFunc[T] + func HasError[T any](want error) CheckFunc[T]