require

package
v0.0.0-...-bee29bd Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerInfo

func CallerInfo() []string

CallerInfo returns an array of strings containing the file and line number of each stack frame leading from the current test to the assert call that failed.

func Equal

func Equal(t *testing.T, expected, actual any, msgAndArgs ...any)

func Error

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

func ErrorIs

func ErrorIs(t *testing.T, expected, actual error, msgAndArgs ...any)

func FailNow

func FailNow(t *testing.T, errMsg string, msgAndArgs ...any)

func False

func False(t *testing.T, b bool, msgAndArgs ...any)

func Greater

func Greater(t *testing.T, expected, actual any, msgAndArgs ...any)

func GreaterOrEqual

func GreaterOrEqual(t *testing.T, expected, actual any, msgAndArgs ...any)

func Less

func Less(t *testing.T, expected, actual any, msgAndArgs ...any)

func LessOrEqual

func LessOrEqual(t *testing.T, expected, actual any, msgAndArgs ...any)

func NoError

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

func NotNil

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

func NotZero

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

func True

func True(t *testing.T, b bool, msgAndArgs ...any)

func Zero

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

Types

type Require

type Require struct {
	// contains filtered or unexported fields
}

func New

func New(t *testing.T) *Require

func (*Require) Equal

func (r *Require) Equal(expected, actual any, msgAndArgs ...any)

func (*Require) Error

func (r *Require) Error(err error, msgAndArgs ...any)

func (*Require) ErrorIs

func (r *Require) ErrorIs(expected, actual error, msgAndArgs ...any)

func (*Require) False

func (r *Require) False(b bool, msgAndArgs ...any)

func (*Require) Greater

func (r *Require) Greater(expected, actual any, msgAndArgs ...any)

func (*Require) GreaterOrEqual

func (r *Require) GreaterOrEqual(expected, actual any, msgAndArgs ...any)

func (*Require) Less

func (r *Require) Less(expected, actual any, msgAndArgs ...any)

func (*Require) LessOrEqual

func (r *Require) LessOrEqual(expected, actual any, msgAndArgs ...any)

func (*Require) NoError

func (r *Require) NoError(err error, msgAndArgs ...any)

func (*Require) NotNil

func (r *Require) NotNil(a any, msgAndArgs ...any)

func (*Require) NotZero

func (r *Require) NotZero(a any, msgAndArgs ...any)

func (*Require) True

func (r *Require) True(b bool, msgAndArgs ...any)

func (*Require) Zero

func (r *Require) Zero(a any, msgAndArgs ...any)

Jump to

Keyboard shortcuts

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