assert

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T any](t testing.TB, expected, actual T, msgAndArgs ...any)

Equal asserts that "expected" and "actual" are equal.

func Error

func Error(t testing.TB, err error, msgAndArgs ...any)

Error asserts that an error is not nil.

func False

func False(t testing.TB, ok bool, msgAndArgs ...any)

False asserts that an expression is false.

func NoError

func NoError(t testing.TB, err error, msgAndArgs ...any)

NoError asserts that an error is nil.

func NotZero

func NotZero[T any](t testing.TB, value T, msgAndArgs ...any)

func Panics

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

Panics asserts that the given function panics.

func True

func True(t testing.TB, ok bool, msgAndArgs ...any)

True asserts that an expression is true.

func Zero

func Zero[T any](t testing.TB, value T, msgAndArgs ...any)

Zero asserts that a value is its zero value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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