require

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package require provides fail-fast test assertions used by the root module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(t testingT, container, item any, msgAndArgs ...any) bool

Contains requires container to contain item.

func Empty

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

Empty requires object to be empty.

func Equal

func Equal(t testingT, expected, actual any, msgAndArgs ...any) bool

Equal requires expected and actual to be deeply equal.

func Error

func Error(t testingT, err error, msgAndArgs ...any) bool

Error requires err to be non-nil.

func ErrorIs

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

ErrorIs requires err to match target.

func FailNow

func FailNow(t testingT, msgAndArgs ...any)

FailNow marks the test as failed and stops execution.

func False

func False(t testingT, value bool, msgAndArgs ...any) bool

False requires value to be false.

func GreaterOrEqual

func GreaterOrEqual(t testingT, actual, expected any, msgAndArgs ...any) bool

GreaterOrEqual requires actual to be greater than or equal to expected.

func Len

func Len(t testingT, object any, length int, msgAndArgs ...any) bool

Len requires object length to equal length.

func NoError

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

NoError requires err to be nil.

func NotEmpty

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

NotEmpty requires object to be non-empty.

func NotNil

func NotNil(t testingT, value any, msgAndArgs ...any) bool

NotNil requires value to be non-nil.

func PanicsWithValue

func PanicsWithValue(t testingT, expected any, fn func(), msgAndArgs ...any) bool

PanicsWithValue requires fn to panic with expected.

func Regexp

func Regexp(t testingT, rx any, str any, msgAndArgs ...any) bool

Regexp requires str to match rx.

func True

func True(t testingT, value bool, msgAndArgs ...any) bool

True requires value to be true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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