testutils

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DerivativeWithEquality

func DerivativeWithEquality(equalities semantic.Equalities, expected interface{}) *matchers.EqualitiesDerivativeMatcher

DerivativeWithEquality returns a matcher that determines whether the actual value derives from the expected value using the supplied semantic.Equalities.

func EqualWithEquality

func EqualWithEquality(equalities semantic.Equalities, expected interface{}) *matchers.EqualitiesEqualMatcher

EqualWithEquality returns a matcher that determines whether the expected value is equal to an actual value using the supplied semantic.Equalities.

func MatchErrorFunc

func MatchErrorFunc(f func(err error) bool) *matchers.ErrorFuncMatcher

MatchErrorFunc returns a matcher that determines whether the actual value is an error and matches the supplied function. The name of the function will be dynamically inferred.

func MatchNamedErrorFunc

func MatchNamedErrorFunc(name string, f func(err error) bool) matchers.ErrorFuncMatcher

MatchNamedErrorFunc returns a matcher that determines whether the actual value is an error and matches the supplied function. The given name will be used unless it's empty in which case it will be dynamically inferred.

func SemanticDerivative

func SemanticDerivative(expected interface{}) *matchers.EqualitiesDerivativeMatcher

SemanticDerivative returns a matcher that determines whether the actual value derives from the expected value using equality.Semantic.Equalities.

func SemanticEqual

func SemanticEqual(expected interface{}) *matchers.EqualitiesEqualMatcher

SemanticEqual returns a matcher that determines whether the expected value is equal to an actual value using equality.Semantic.Equalities.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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