assert

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](t *testing.T, arr []T, elem T, formatString string, args ...any) bool

Contains checks if an element is in an array.

func ContainsAll

func ContainsAll[T comparable](t *testing.T, arr []T, elems []T, formatString string, args ...any) bool

ContainsAll checks if all elements are in an array.

func Equal

func Equal[T comparable](t *testing.T, expected T, actual T, formatString string, args ...any) bool

Equal checks if two values are equal.

func EqualArray

func EqualArray[T comparable](t *testing.T, expected, actual []T, formatString string, args ...any) bool

EqualArray checks if two arrays are equal.

func EqualMap

func EqualMap[T, R comparable](t *testing.T, expected, actual map[T]R, formatString string, args ...any) bool

EqualMap checks if two maps are equal.

func False

func False(t *testing.T, actual bool, formatString string, args ...any) bool

False checks if a boolean is false.

func Greater

func Greater[T constraints.Ordered](t *testing.T, expected T, actual T, formatString string, args ...any) bool

Greater checks if a value is greater than another.

func GreaterOrEqual

func GreaterOrEqual[T constraints.Ordered](t *testing.T, expected T, actual T, formatString string, args ...any) bool

GreaterOrEqual checks if a value is greater or equal to another.

func IsNil

func IsNil[T any](t *testing.T, actual *T, formatString string, args ...any) bool

IsNil checks if a pointer is nil.

func Less

func Less[T constraints.Ordered](t *testing.T, expected T, actual T, formatString string, args ...any) bool

Less checks if a value is less than another.

func LessOrEqual

func LessOrEqual[T constraints.Ordered](t *testing.T, expected T, actual T, formatString string, args ...any) bool

LessOrEqual checks if a value is less or equal to another.

func NotContains

func NotContains[T comparable](t *testing.T, arr []T, elem T, formatString string, args ...any) bool

NotContains checks if an element is not in an array.

func NotEqual

func NotEqual[T comparable](t *testing.T, expected T, actual T, formatString string, args ...any) bool

NotEqual checks if two values are not equal.

func NotNil

func NotNil[T any](t *testing.T, actual *T, formatString string, args ...any) bool

NotNil checks if a pointer is not nil.

func True

func True(t *testing.T, actual bool, formatString string, args ...any) bool

True checks if a boolean 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