assert

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

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

func Logf

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

func That

func That[T any](t *testing.T, actual T, matcher Matcher[T], reasonFormat string, reasonArgs ...interface{})

func ThatEventually

func ThatEventually[T any](t *testing.T, ctx context.Context, actual func() T, matcher Matcher[T], reasonFormat string, reasonArgs ...interface{})

Types

type Matcher

type Matcher[T any] func(actual T) (match bool, message string)

func CreateMatcher

func CreateMatcher[T any](match MatcherImplementation[T], message MessageProvider[T]) Matcher[T]

Helper functions

func CreateNotMatcher

func CreateNotMatcher[T any](match MatcherImplementation[T], message MessageProvider[T]) Matcher[T]

type MatcherImplementation

type MatcherImplementation[T any] func(actual T) (match bool, message string)

type MessageProvider

type MessageProvider[T any] func(actual T, extra string) string

Jump to

Keyboard shortcuts

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