testx

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 9 Imported by: 6 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expect added in v0.2.0

func Expect[A any](t testing.TB, actual A, matchers ...Matcher[A])

func ExpectPanic added in v0.2.0

func ExpectPanic[A any](t testing.TB, f func(), matchers ...Matcher[A])

func NewComparedMatcher added in v0.2.0

func NewComparedMatcher[A any, E any](name string, match func(A, E) bool) internal.MatcherNewer[A, E]

Types

type Matcher added in v0.2.0

type Matcher[A any] = internal.Matcher[A]

func Be added in v0.2.0

func Be[E any](expect E) Matcher[E]

func BeAssignableTo added in v0.2.0

func BeAssignableTo[E any]() Matcher[any]

func BeConvertibleTo added in v0.2.0

func BeConvertibleTo[E any]() Matcher[any]

func BeFalse added in v0.2.0

func BeFalse() Matcher[bool]

func BeNil added in v0.2.0

func BeNil[A any]() Matcher[A]

func BeTrue added in v0.2.0

func BeTrue() Matcher[bool]

func BeType added in v0.2.0

func BeType[E any]() Matcher[any]

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 ContainsSubString(sub string) Matcher[string]

func Equal added in v0.2.0

func Equal[E any](expect E) Matcher[E]

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 ErrorContains(sub string) Matcher[error]

func ErrorEqual added in v0.2.0

func ErrorEqual(expect string) Matcher[error]

func Failed added in v0.2.0

func Failed() Matcher[error]

func HaveCap added in v0.2.0

func HaveCap[T any](cap int) Matcher[T]

func HaveLen added in v0.2.0

func HaveLen[T any](len int) Matcher[T]

func HavePrefix added in v0.2.0

func HavePrefix(prefix string) Matcher[string]

func HaveSuffix added in v0.2.0

func HaveSuffix(suffix string) Matcher[string]

func IsCodeError added in v0.2.5

func IsCodeError[Code codex.Code](expect Code) Matcher[error]

func IsError added in v0.2.0

func IsError(expect error) Matcher[error]

func IsNotZero added in v0.2.12

func IsNotZero[A any]() Matcher[A]

func IsZero added in v0.2.12

func IsZero[A any]() Matcher[A]

func NewMatcher added in v0.2.0

func NewMatcher[A any](name string, match func(A) bool) Matcher[A]

func Not added in v0.2.0

func Not[A any](matcher Matcher[A]) Matcher[A]

func NotBe added in v0.2.0

func NotBe[E any](expect E) Matcher[E]

func NotBeNil added in v0.2.0

func NotBeNil[A any]() Matcher[A]

func NotEqual added in v0.2.0

func NotEqual[E any](expect E) Matcher[E]

func Succeed added in v0.2.0

func Succeed() Matcher[error]

type NormalizedExpectedMatcher added in v0.2.0

type NormalizedExpectedMatcher = internal.NormalizedExpectedMatcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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