assert

package
v8.0.0-rc0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(t *testing.T, a interface{})

Empty takes a value and checks whether it is empty for the given type supports slices, arrays, channels, strings, and maps

func Equal

func Equal(t *testing.T, a, b interface{}, msgAndArgs ...interface{}) bool

Equal asserts that two objects are equal.

func Error

func Error(t *testing.T, err error, msgAndArgs ...interface{}) bool

Error asserts that a function returned an error (i.e. not `nil`).

func Exactly

func Exactly(t *testing.T, a, b interface{}, msgAndArgs ...interface{}) bool

Exactly asserts that two objects are equal in value and type.

func GreaterOrEqual

func GreaterOrEqual(t *testing.T, a, b int, msgAndArgs ...interface{}) bool

GreaterOrEqual asserts that the first element is greater than or equal to the second

func NoError

func NoError(t *testing.T, err error, msgAndArgs ...interface{}) bool

NoError asserts that a function returned no error (i.e. `nil`).

func NotEmpty

func NotEmpty(t *testing.T, a interface{})

NotEmpty takes a value and checks whether it isvnot empty for the given type supports slices, arrays, channels, strings, and maps

func NotEqual

func NotEqual(t *testing.T, a, b interface{}, msgAndArgs ...interface{}) bool

NotEqual asserts that two objects are NOT equal.

func NotNil

func NotNil(t *testing.T, a interface{}, msgAndArgs ...interface{}) bool

NotNil asserts that the specified object is not nil.

func RequireEqual

func RequireEqual(t *testing.T, a, b interface{}, msgAndArgs ...interface{})

RequireEqual asserts that two objects are equal. It marks the test as failed and stops execution.

func RequireGreaterOrEqual

func RequireGreaterOrEqual(t *testing.T, a, b int, msgAndArgs ...interface{})

RequireGreaterOrEqual asserts that the first element is greater than or equal to the second It marks the test as failed and stops execution.

func RequireNoError

func RequireNoError(t *testing.T, err error, msgAndArgs ...interface{})

RequireNoError asserts that a function returned no error (i.e. `nil`). It marks the test as failed and stops execution.

func RequireNotEqual

func RequireNotEqual(t *testing.T, a, b interface{}, msgAndArgs ...interface{})

RequireNotEqual asserts that two objects are NOT equal. It marks the test as failed and stops execution.

func RequireNotNil

func RequireNotNil(t *testing.T, a interface{}, msgAndArgs ...interface{})

RequireNotNil asserts that the specified object is not nil. It marks the test as failed and stops execution.

Types

This section is empty.

Jump to

Keyboard shortcuts

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