assert

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicCatcher added in v1.1.0

func PanicCatcher(action func()) (thePanic interface{})

Types

type Matcher

type Matcher func(actual interface{}) (bool, string)

func CreateMatcher added in v0.3.0

func CreateMatcher(match MatcherImplementation, message MessageProvider) Matcher

Helper functions

func CreateNotMatcher added in v0.3.0

func CreateNotMatcher(match MatcherImplementation, message MessageProvider) Matcher

type MatcherImplementation added in v0.3.0

type MatcherImplementation func(actual interface{}) bool

type MessageProvider added in v0.3.0

type MessageProvider func(actual interface{}) string

type Wrapper added in v0.4.0

type Wrapper struct {
	T *testing.T
}

Wrapper around T to allow extension functions

func Assert

func Assert(t *testing.T) Wrapper

func (Wrapper) Fail added in v0.4.0

func (a Wrapper) Fail(format string, args ...interface{})

func (Wrapper) Logf added in v0.4.0

func (a Wrapper) Logf(format string, args ...interface{})

func (Wrapper) That added in v0.4.0

func (a Wrapper) That(actual interface{}, matcher Matcher, reasonFormat string, reasonArgs ...interface{})

func (Wrapper) ThatEventually added in v1.4.0

func (a Wrapper) ThatEventually(ctx context.Context, actual func() interface{}, matcher Matcher, reasonFormat string, reasonArgs ...interface{})

Jump to

Keyboard shortcuts

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