test

package
v0.0.0-...-8610112 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeReport

type FakeReport struct {
	Failed  bool
	Fatally bool
	Errors  []string
}

FakeReport is the result of an execution with a fake T.

func WithFake

func WithFake(t T, f func(T)) FakeReport

WithFake runs the given function with a fake T. Failures reported to the fake will not affect the current test. When the given function finishes running, WithFake produces a report of the test run.

type T

type T interface {
	Cleanup(func())
	Errorf(string, ...any)
	FailNow()
	Helper()
	Logf(string, ...any)
	Name() string
}

T is an interface defining a subset of the *testing.T type's API.

Jump to

Keyboard shortcuts

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