assert

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package assert provides functions for internal test assertions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail added in v0.5.5

func Fail(t testing.TB, fmt string, args ...any)

func Failf

func Failf(t testing.TB, fmt string, args ...any)

func ToBeEqual

func ToBeEqual(t testing.TB, expected, actual any)

func ToBeEqualUsing added in v0.7.0

func ToBeEqualUsing(t testing.TB, expected, actual any, comparator any)

func ToBeMatching added in v0.7.1

func ToBeMatching(t testing.TB, expectedPattern string, actual any)

func ToBeNil

func ToBeNil(t testing.TB, actual any)

func ToBeNoError

func ToBeNoError(t testing.TB, actual error)

func ToBeNotEqual added in v0.7.0

func ToBeNotEqual(t testing.TB, expected, actual any)

func ToBeNotEqualUsing added in v0.7.0

func ToBeNotEqualUsing(t testing.TB, expected, actual any, comparator any)

func ToBeNotNil added in v0.7.0

func ToBeNotNil(t testing.TB, actual any)

func ToBeNotSame added in v0.7.1

func ToBeNotSame(t testing.TB, expected, actual any)

func ToBeOfType

func ToBeOfType(t testing.TB, expectedType, actual any)

func ToBeSame

func ToBeSame(t testing.TB, expected, actual any)

Types

type ExecutionT added in v0.7.0

type ExecutionT struct {
	testing.TB
	// contains filtered or unexported fields
}

func Execution added in v0.7.0

func Execution(t testing.TB, f func()) *ExecutionT

func (*ExecutionT) WillPanicWith added in v0.7.0

func (instance *ExecutionT) WillPanicWith(pattern string)

func (*ExecutionT) WillPanicWithRegexp added in v0.7.0

func (instance *ExecutionT) WillPanicWithRegexp(pattern *regexp.Regexp)

Jump to

Keyboard shortcuts

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