Documentation
¶
Index ¶
- func Expect[A any](t testing.TB, actual A, matchers ...Matcher[A])
- func ExpectPanic[A any](t testing.TB, f func(), matchers ...Matcher[A])
- func NewComparedMatcher[A any, E any](name string, match func(A, E) bool) internal.MatcherNewer[A, E]
- type Matcher
- func Be[E any](expect E) Matcher[E]
- func BeAssignableTo[E any]() Matcher[any]
- func BeConvertibleTo[E any]() Matcher[any]
- func BeFalse() Matcher[bool]
- func BeNil[A any]() Matcher[A]
- func BeTrue() Matcher[bool]
- func BeType[E any]() Matcher[any]
- func Contains[E comparable, S ~[]E](v E) Matcher[S]
- func ContainsSubString(sub string) Matcher[string]
- func Equal[E any](expect E) Matcher[E]
- func EquivalentSlice[E comparable, S ~[]E](expect S) Matcher[S]
- func ErrorContains(sub string) Matcher[error]
- func ErrorEqual(expect string) Matcher[error]
- func Failed() Matcher[error]
- func HaveCap[T any](cap int) Matcher[T]
- func HaveLen[T any](len int) Matcher[T]
- func HavePrefix(prefix string) Matcher[string]
- func HaveSuffix(suffix string) Matcher[string]
- func IsCodeError[Code codex.Code](expect Code) Matcher[error]
- func IsError(expect error) Matcher[error]
- func IsNotZero[A any]() Matcher[A]
- func IsZero[A any]() Matcher[A]
- func NewMatcher[A any](name string, match func(A) bool) Matcher[A]
- func Not[A any](matcher Matcher[A]) Matcher[A]
- func NotBe[E any](expect E) Matcher[E]
- func NotBeNil[A any]() Matcher[A]
- func NotEqual[E any](expect E) Matcher[E]
- func Succeed() Matcher[error]
- type NormalizedExpectedMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectPanic ¶ added in v0.2.0
func NewComparedMatcher ¶ added in v0.2.0
Types ¶
type Matcher ¶ added in v0.2.0
func BeAssignableTo ¶ added in v0.2.0
func BeConvertibleTo ¶ added in v0.2.0
func Contains ¶ added in v0.2.0
func Contains[E comparable, S ~[]E](v E) Matcher[S]
func ContainsSubString ¶ added in v0.2.0
func EquivalentSlice ¶ added in v0.2.1
func EquivalentSlice[E comparable, S ~[]E](expect S) Matcher[S]
func ErrorContains ¶ added in v0.2.0
func ErrorEqual ¶ added in v0.2.0
func HavePrefix ¶ added in v0.2.0
func HaveSuffix ¶ added in v0.2.0
func NewMatcher ¶ added in v0.2.0
type NormalizedExpectedMatcher ¶ added in v0.2.0
type NormalizedExpectedMatcher = internal.NormalizedExpectedMatcher
Click to show internal directories.
Click to hide internal directories.