Versions in this module Expand all Collapse all v0 v0.16.0 Sep 21, 2026 Changes in this version + const DefaultPollInterval + var UpdateGolden = flag.Bool("xtest.update", false, "rewrite golden files") + func AllocsPerRun(runs int, fn func()) float64 + func Eventually(tb testing.TB, timeout time.Duration, cond func() bool) + func EventuallyE(tb testing.TB, timeout time.Duration, fn func() error) error + func EventuallyEvery(tb testing.TB, timeout, interval time.Duration, cond func() bool) + func EventuallyEveryE(tb testing.TB, timeout, interval time.Duration, fn func() error) error + func ExpectFatal(t *testing.T, testName, envVar, wantSubstr string, fn func(t *testing.T)) + func GoldenJSON(tb testing.TB, name string, got any) + func GoldenJSONWithUpdate(tb testing.TB, name string, got any, update bool) + func Never(tb testing.TB, duration time.Duration, cond func() bool) + func RequireAllocsBetween(tb testing.TB, runs int, minimum, maximum float64, fn func()) + func RequireGoroutinesAtMost(tb testing.TB, baseline int, timeout time.Duration, allowedDelta int) + func RequireMaxAlloc(tb testing.TB, runs int, limit float64, fn func()) + func RequireNoGoroutineLeak(tb testing.TB, baseline int, timeout time.Duration) + func RequireZeroAlloc(tb testing.TB, runs int, fn func()) + func RunParallel(tb testing.TB, count int, fn func(index int) error) + func WaitForAtLeast(tb testing.TB, counter *atomic.Int32, minimum int32, timeout time.Duration) + func WaitForAtMost(tb testing.TB, counter *atomic.Int32, maximum int32, timeout time.Duration) + func WaitForSignal(tb testing.TB, signal <-chan struct{}, timeout time.Duration) + func WaitForValue[T comparable](tb testing.TB, timeout time.Duration, want T, get func() T) T + type Gate struct + func NewGate() *Gate + func (g *Gate) Active() int32 + func (g *Gate) Enter() + func (g *Gate) Release() + type Latch struct + func NewLatch() *Latch + func (l *Latch) Signal() + func (l *Latch) Wait(tb testing.TB, timeout time.Duration)