Documentation ¶
Index ¶
- func Assert[T any](t testing.TB, v T, m Matcher[T])
- func Expect[T any](t testing.TB, v T, m Matcher[T])
- type Matcher
- func AllOf[T any](ms ...Matcher[T]) Matcher[T]
- func AnyOf[T any](ms ...Matcher[T]) Matcher[T]
- func Contains[T any](m Matcher[T]) Matcher[[]T]
- func ContainsEq[T comparable](v T) Matcher[[]T]
- func ContainsRegex(r string) Matcher[string]
- func ContainsRegexPOSIX(r string) Matcher[string]
- func Each[T any](m Matcher[T]) Matcher[[]T]
- func ElementsAre[T any](m ...Matcher[T]) Matcher[[]T]
- func ElementsAreEq[T comparable](vs ...T) Matcher[[]T]
- func EndsWith(s string) Matcher[string]
- func Eq[T comparable](v T) Matcher[T]
- func Ge[T constraints.Ordered](v T) Matcher[T]
- func Gt[T constraints.Ordered](v T) Matcher[T]
- func HasSubstr(s string) Matcher[string]
- func IsPermutationOf[T any](m ...Matcher[T]) Matcher[[]T]
- func IsPermutationOfEq[T comparable](vs ...T) Matcher[[]T]
- func IsSubsetOf[T any](m ...Matcher[T]) Matcher[[]T]
- func IsSubsetOfEq[T comparable](vs ...T) Matcher[[]T]
- func IsSupersetOf[T any](m ...Matcher[T]) Matcher[[]T]
- func IsSupersetOfEq[T comparable](vs ...T) Matcher[[]T]
- func Le[T constraints.Ordered](v T) Matcher[T]
- func Lt[T constraints.Ordered](v T) Matcher[T]
- func Not[T any](m Matcher[T]) Matcher[T]
- func StartsWith(s string) Matcher[string]
- func UnorderedElementsAre[T any](m ...Matcher[T]) Matcher[[]T]
- func UnorderedElementsAreEq[T comparable](vs ...T) Matcher[[]T]
- func WrapsError(err error) Matcher[error]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Matcher ¶
func ContainsEq ¶
func ContainsEq[T comparable](v T) Matcher[[]T]
ContainsEq checks if the list argument contains an element equal to v.
func ContainsRegex ¶
func ContainsRegexPOSIX ¶
func ElementsAre ¶
ElementsAre checks each element in list matches in order.
func ElementsAreEq ¶
func ElementsAreEq[T comparable](vs ...T) Matcher[[]T]
func Eq ¶
func Eq[T comparable](v T) Matcher[T]
func Ge ¶
func Ge[T constraints.Ordered](v T) Matcher[T]
func Gt ¶
func Gt[T constraints.Ordered](v T) Matcher[T]
func IsPermutationOf ¶
func IsPermutationOfEq ¶
func IsPermutationOfEq[T comparable](vs ...T) Matcher[[]T]
func IsSubsetOf ¶
func IsSubsetOfEq ¶
func IsSubsetOfEq[T comparable](vs ...T) Matcher[[]T]
func IsSupersetOf ¶
func IsSupersetOfEq ¶
func IsSupersetOfEq[T comparable](vs ...T) Matcher[[]T]
func Le ¶
func Le[T constraints.Ordered](v T) Matcher[T]
func Lt ¶
func Lt[T constraints.Ordered](v T) Matcher[T]
func StartsWith ¶
func UnorderedElementsAre ¶
func UnorderedElementsAreEq ¶
func UnorderedElementsAreEq[T comparable](vs ...T) Matcher[[]T]
func WrapsError ¶
Click to show internal directories.
Click to hide internal directories.