assert

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 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, expected, actual interface{})

Equal compares x and y for equality and fails with the test if not

func Equalf

func Equalf(t testing.TB, expected, actual interface{}, format string, args ...interface{})

Equalf compares x and y for equality and fails with the test with the provided formatted message if not

func False

func False(t testing.TB, o interface{}, format string, args ...interface{})

False asserts that the o parameter is a boolean with value false and fails with the test with the provided formatted message if not

func Match

func Match(t testing.TB, expected, actual interface{})

Match compares x and y and ensures there is no diff and fails with the test with the reported differences if not

func Nil

func Nil(t testing.TB, o interface{})

Nil asserts that the o parameter is nil and fails with the test if not

func Nilf

func Nilf(t testing.TB, o interface{}, format string, args ...interface{})

Nilf asserts that the o parameter is nil and fails with the test with the provided formatted message if not

func NotEqual

func NotEqual(t testing.TB, expected, actual interface{}, format string, args ...interface{})

NotEqual compares x and y for inequality and fails with the test if not

func NotEqualf

func NotEqualf(t testing.TB, expected, actual interface{}, format string, args ...interface{})

NotEqualf compares x and y for inequality and fails with the test with the provided formatted message if not

func NotNil

func NotNil(t testing.TB, o interface{})

NotNil asserts that the o parameter is not nil and fails with the test if not

func NotNilf

func NotNilf(t testing.TB, o interface{}, format string, args ...interface{})

NotNilf asserts that the o parameter is not nil and fails with the test with the provided formatted message if not

func RegisterOpts

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

RegisterOpts registers go-cmp options for a given type to be used when calling cmp.Diff or cmp.Equal

func True

func True(t testing.TB, o interface{}, format string, args ...interface{})

True asserts that the obj parameter is a boolean with value true and fails with the test with the provided formatted message if not

Types

This section is empty.

Jump to

Keyboard shortcuts

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