assert

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(tb testing.TB, expected, actual interface{}) (success bool)

Equal asserts that expected and actual are deeply equal.

func Error

func Error(tb testing.TB, err error) (success bool)

Error asserts that err is not nil.

func ErrorContains

func ErrorContains(tb testing.TB, err error, substr string) (success bool)

ErrorContains asserts that err contains substr.

func ErrorIs

func ErrorIs(tb testing.TB, err, target error) (success bool)

ErrorIs asserts that err is target.

func False

func False(tb testing.TB, value bool) (success bool)

False asserts that value is false.

func Nil

func Nil(tb testing.TB, value interface{}) (success bool)

Nil asserts that value is nil.

func NoError

func NoError(tb testing.TB, err error) (success bool)

NoError asserts that err is nil.

func NotEqual

func NotEqual(tb testing.TB, expected, actual interface{}) (success bool)

NotEqual asserts that expected and actual are not deeply equal.

func NotNil

func NotNil(tb testing.TB, value interface{}) (success bool)

NotNil asserts that value is not nil.

func True

func True(tb testing.TB, value bool) (success bool)

True asserts that value is true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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