testing

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

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

Equal asserts that two objects are equal.

assert.Equal(t, 123, 123)

Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses). Function equality cannot be determined and will always fail.

func Fail

func Fail(t *testing.T, failureMessage string, msgAndArgs ...any) bool

Fail reports a failure through

func Nil

func Nil(t *testing.T, object any, msgAndArgs ...any) bool

Nil asserts that the specified object is nil.

assert.Nil(t, err)

func NotEqual

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

NotEqual asserts that the specified values are NOT equal.

assert.NotEqual(t, obj1, obj2)

Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses).

func NotNil

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

NotNil asserts that the specified object is not nil.

assert.NotNil(t, err)

Types

This section is empty.

Jump to

Keyboard shortcuts

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