Documentation ¶
Index ¶
- Variables
- func ExtractSameValue(t T, v any) (any, bool)
- func ExtractorUnsupported(t T, v any) (any, bool)
- func GetHelper(t T) interface{ ... }
- func GetRoot(t T) *testing.T
- type Asserter
- type Assertion
- type Comparator
- type EqualToMatcher
- type Extractor
- type HasParent
- type Location
- type Matcher
- func BeBetween(min, max any) Matcher
- func BeEmpty() Matcher
- func BeGreaterThan(min any) Matcher
- func BeLessThan(max any) Matcher
- func BeNil() Matcher
- func Fail(patterns ...string) Matcher
- func Not(m Matcher) Matcher
- func Say[Type string | *regexp.Regexp](expectation Type) Matcher
- func Succeed() Matcher
- type MatcherFunc
- type T
- type ValueExtractor
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NumericValueExtractor = NewNumericValueExtractor()
)
Functions ¶
Types ¶
type Comparator ¶
type EqualToMatcher ¶
type EqualToMatcher interface { Matcher Using(comparator Comparator) EqualToMatcher }
func EqualTo ¶
func EqualTo(expected ...any) EqualToMatcher
type Extractor ¶
func NewChannelExtractor ¶
func NewChannelExtractor(ve ValueExtractor, recurse bool) Extractor
func NewFuncExtractor ¶
func NewFuncExtractor(ve ValueExtractor, recurse bool) Extractor
func NewPointerExtractor ¶
func NewPointerExtractor(ve ValueExtractor, recurse bool) Extractor
type MatcherFunc ¶
func (MatcherFunc) Assert ¶
func (f MatcherFunc) Assert(t T, actuals ...any)
type ValueExtractor ¶
func NewNumericValueExtractor ¶
func NewNumericValueExtractor() ValueExtractor
func NewValueExtractor ¶
func NewValueExtractor(defaultExtractor Extractor) ValueExtractor
func NewValueExtractorWithMap ¶
func NewValueExtractorWithMap(defaultExtractor Extractor, extractors map[reflect.Kind]Extractor) ValueExtractor
func (ValueExtractor) ExtractValue ¶
func (ve ValueExtractor) ExtractValue(t T, actual any) (any, bool)
func (ValueExtractor) MustExtractValue ¶
func (ve ValueExtractor) MustExtractValue(t T, actual any) any
Source Files ¶
- asserter.go
- location.go
- matcher.go
- matchers_be_between.go
- matchers_be_empty.go
- matchers_be_greater_than.go
- matchers_be_less_than.go
- matchers_be_nil.go
- matchers_equal_to.go
- matchers_fail.go
- matchers_not.go
- matchers_say.go
- matchers_succeed.go
- os_interrupt_handling.go
- t.go
- value_extractor_base.go
- value_extractor_numeric.go
Click to show internal directories.
Click to hide internal directories.