testutil

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicTB

func PanicTB() *panicTB

PanicTB is an implementation for testing.TB that panics when an error is logged or FailNow is called. This is useful to inject into test helpers in example tests where no *testing.T is available.

Doesn't fully implement testing.TB. Functions where it's used should take the more streamlined TestingTB instead.

Types

type TestingTB

type TestingTB interface {
	Errorf(format string, args ...any)
	FailNow()
	Helper()
	Log(args ...any)
	Logf(format string, args ...any)
}

TestingT is an interface wrapper around *testing.T that's implemented by all of *testing.T, *testing.F, and *testing.B.

It's used internally to verify that River's test assertions are working as expected.

Jump to

Keyboard shortcuts

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