assert

package
v0.0.0-...-9eb61df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable, S StringOrSet[T]](t testing.TB, s S, lf T, out ...any)

func ContainsFunc

func ContainsFunc[A, B any, S Set[A]](t testing.TB, s S, lf B, cmp func(A, B) bool, out ...any)

func Empty

func Empty[T any](t testing.TB, v T, out ...any)

func Equal

func Equal[T any](t testing.TB, a, b T, out ...any)

func EqualFunc

func EqualFunc[A, B any](t testing.TB, a A, b B, cmp func(A, B) bool, out ...any)

func Error

func Error(t testing.TB, got, want error, out ...any)

func False

func False(t testing.TB, got bool, out ...any)

func Greater

func Greater[T cmp.Ordered](t testing.TB, a, b T)

func HasNoPrefix

func HasNoPrefix(t testing.TB, s string, pfx string, out ...any)

func HasNoSuffix

func HasNoSuffix(t testing.TB, s string, sfx string, out ...any)

func HasPrefix

func HasPrefix(t testing.TB, s string, pfx string, out ...any)

func HasSuffix

func HasSuffix(t testing.TB, s string, sfx string, out ...any)

func Nil

func Nil(t testing.TB, v any, out ...any)

func NotContains

func NotContains[T comparable, S StringOrSet[T]](t testing.TB, s S, lf T, out ...any)

func NotContainsFunc

func NotContainsFunc[A, B any, S Set[A]](t testing.TB, s S, lf B, cmp func(A, B) bool, out ...any)

func NotEmpty

func NotEmpty[T any](t testing.TB, v T, out ...any)

func NotEqual

func NotEqual[T any](t testing.TB, a, b T, out ...any)

func NotEqualFunc

func NotEqualFunc[A, B any](t testing.TB, a A, b B, cmp func(A, B) bool, out ...any)

func NotError

func NotError(t testing.TB, got, nwant error, out ...any)

func NotNil

func NotNil(t testing.TB, v any, out ...any)

func NotPanics

func NotPanics(t testing.TB, fn func(), out ...any)

func NotZero

func NotZero[T any](t testing.TB, v T, out ...any)

func PanicIs

func PanicIs(t testing.TB, fn func(), exp any, out ...any)

func Panics

func Panics(t testing.TB, fn func(), out ...any)

func Smaller

func Smaller[T cmp.Ordered](t testing.TB, a, b T)

func True

func True(t testing.TB, got bool, out ...any)

func Zero

func Zero[T any](t testing.TB, v T, out ...any)

Types

type Set

type Set[T any] interface {
	[]T | iter.Seq[T]
}

type StringOrSet

type StringOrSet[T comparable] interface {
	string | Set[T]
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL