assert

package
v0.0.0-...-b8d4c9e Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(t TestingT, object any, msgAndArgs ...any) bool

func Equal

func Equal[T any](t TestingT, expected, actual T, msgAndArgs ...any) bool

func ErrorContains

func ErrorContains(t TestingT, err error, contains string, msgAndArgs ...any) bool

func ErrorIs

func ErrorIs(t TestingT, err, target error, msgAndArgs ...any) bool

func False

func False(t TestingT, condition bool, msgAndArgs ...any) bool

func Greater

func Greater[T constraints.Ordered](t TestingT, a, b T, msgAndArgs ...any) bool

func GreaterOrEqual

func GreaterOrEqual[T constraints.Ordered](t TestingT, a, b T, msgAndArgs ...any) bool

func Len

func Len(t TestingT, obj any, length int, msgAndArgs ...any) bool

func Nil

func Nil(t TestingT, object any, msgAndArgs ...any) bool

func NoError

func NoError(t TestingT, err error, msgAndArgs ...any) bool

func NotEmpty

func NotEmpty(t TestingT, object any, msgAndArgs ...any) bool

func NotEqual

func NotEqual[T any](t TestingT, expected, actual T, msgAndArgs ...any) bool

func NotNil

func NotNil(t TestingT, object any, msgAndArgs ...any) bool

func NotPanics

func NotPanics(t TestingT, f func(), msgAndArgs ...any) bool

func NotZero

func NotZero(t TestingT, value any, msgAndArgs ...any) bool

func Panics

func Panics(t TestingT, f func(), msgAndArgs ...any) bool

func Regexp

func Regexp(t TestingT, pattern, text string, msgAndArgs ...any) bool

func True

func True(t TestingT, condition bool, msgAndArgs ...any) bool

func Zero

func Zero(t TestingT, value any, msgAndArgs ...any) bool

Types

type TestingT

type TestingT interface {
	Helper()
	Error(msgAndArgs ...any)
}

Jump to

Keyboard shortcuts

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