assert

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(t testing.TB, first, second interface{}, msg string, args ...interface{})

Equal compares first and second for equality. The objects must be of the same type. If the objects are not equal, the test will be failed with an error message containing msg and args.

func False

func False(t testing.TB, obj interface{}, msg string, args ...interface{})

False asserts that the obj parameter is a boolean with value false.

func Nil

func Nil(t testing.TB, obj interface{}, msg string, args ...interface{})

Nil asserts that the obj parameter is nil.

func NotEqual

func NotEqual(t testing.TB, first, second interface{}, msg string, args ...interface{})

NotEqual compares first and second for inequality. The objects must be of the same type.

func NotNil

func NotNil(t testing.TB, obj interface{}, msg string, args ...interface{})

NotNil asserts that the obj parameter is not nil.

func RegisterOpts

func RegisterOpts(t reflect.Type, opts ...cmp.Option)

RegisterOpts registers go-cmp options for a type. These options will be used when comparing two objects for equality.

func True

func True(t testing.TB, obj interface{}, msg string, args ...interface{})

True asserts that the obj parameter is a boolean with value true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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