assert

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElementsMatch

func ElementsMatch[S ~[]E, E any](t *testing.T, a, b S)

ElementsMatch checks whether the given slices contain the same elements.

func Equal

func Equal[T any](t *testing.T, a, b T)

Equal verifies equality of two objects.

func ErrorContains

func ErrorContains(t *testing.T, err error, str string)

ErrorContains checks whether the given error contains the specified string.

func IsNil added in v0.8.0

func IsNil(t *testing.T, obj any)

IsNil verifies that the object is nil.

func NotEqual added in v0.8.0

func NotEqual[T any](t *testing.T, a, b T)

NotEqual asserts that the given objects are not equal.

func PanicMsgContains added in v0.8.0

func PanicMsgContains(t *testing.T, f func(), str string)

PanicMsgContains checks whether a function panics with a message containing the given string.

func Panics added in v0.8.0

func Panics(t *testing.T, f func())

Panics checks whether the given function panics.

func Same added in v0.8.0

func Same[T any](t *testing.T, a, b *T)

Same asserts that the given pointers point to the same object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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