assert

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package assert has test assertions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T any](t *testing.T, got, want T)

Equal asserts two values are equal.

func Equalish

func Equalish(t *testing.T, got, want, delta float64)

Equalish asserts two floats are equal to within delta.

func ErrorAs

func ErrorAs(t *testing.T, got error, target any)

ErrorAs ...

func ErrorIs

func ErrorIs(t *testing.T, got, want error)

ErrorIs ...

func False

func False(t *testing.T, got bool)

False asserts a value resolves to false.

func MatchesRegexp

func MatchesRegexp(t *testing.T, got, pattern string)

MatchesRegexp asserts a value matches a regex expression.

func Nil

func Nil(t *testing.T, got any)

Nil asserts a value is nil.

func NotEqual

func NotEqual[T any](t *testing.T, got, want T)

NotEqual asserts two values are not equal.

func NotNil

func NotNil(t *testing.T, got any)

NotNil asserts a value is not nil.

func True

func True(t *testing.T, got bool)

True asserts a value resolves to true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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