assert

package
v0.15.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eq

func Eq(t *testing.T, expected interface{}, actual interface{})

Eq asserts the values are equal. Uses reflect.DeepEqual to test for equality

func EqItems

func EqItems(t *testing.T, expected interface{}, actual interface{})

EqItems asserts the given slices have the same elements (regardless of their order)

func Err

func Err(t *testing.T, err error)

Err asserts the error is not nil

func Fail

func Fail(t *testing.T, text string)

Fail fails immediately

func Failf

func Failf(t *testing.T, format string, args ...interface{})

Failf fails immediately

func MustPanic

func MustPanic(t *testing.T, match *regexp.Regexp)

MustPanic ensures that the caller's context will panic and that the panic will match the given regular expression

  func() {
  	defer mustPanic(t, regexp.MustCompile("+*"))
		panic("some text")
  }

func NoErr

func NoErr(t *testing.T, err error)

NoErr asserts the error is nil

func NotEq

func NotEq(t *testing.T, notThisValue interface{}, actual interface{})

NotEq asserts the given values are not equal. Uses reflect.DeepEqual to test for equality

func True

func True(t *testing.T, actual interface{})

True asserts that the given value is a boolean true

Types

This section is empty.

Jump to

Keyboard shortcuts

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