asserterror

package
v0.0.0-...-155bc9a Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bigger

func Bigger[T constraints.Ordered](t *testing.T, a, b T, msgAndArgs ...any)

Bigger invariant will call t.Error() if a is lesser than b.

func Equal

func Equal[T comparable](t *testing.T, a, b T, msgAndArgs ...any)

Equal invariant will call t.Error() if two compared variables are not equal.

func EqualBytes

func EqualBytes(t *testing.T, a, b []byte, msgAndArgs ...any)

EqualBytes invariant will call t.Error() if two byte slices are not equal.

func EqualDeep

func EqualDeep(t *testing.T, a, b any, msgAndArgs ...any)

EqualDeep invariant will call t.Error() if two variables are not deep equal.

func EqualError

func EqualError(t *testing.T, a, b error, msgAndArgs ...any)

EqualError invariant will call t.Error() if two errors are not equal.

func Lesser

func Lesser[T constraints.Ordered](t *testing.T, a, b T, msgAndArgs ...any)

Lesser invariant will call t.Error() if a is bigger than b.

func SameTime

func SameTime(t *testing.T, a, b time.Time, delta time.Duration,
	msgAndArgs ...any)

SameTime invariant will panic if two times are not equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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