Documentation
¶
Index ¶
- func AllocsPerRun(runs int, f func()) (avg float64)
- func CoverMode()
- func Coverage() float64
- func Entrypoint(match string, skip string, tests []gosimruntime.Test) bool
- func Init()
- func Main(matchString func(pat, str string) (bool, error), tests []InternalTest, ...)
- func RegisterCover(c Cover)
- func RunBenchmarks(matchString func(pat, str string) (bool, error), ...)
- func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool)
- func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool)
- func Short() bool
- func Testing() bool
- func Verbose() bool
- type B
- func (c *B) Cleanup(f func())
- func (c *B) Error(a ...any)
- func (c *B) Errorf(format string, a ...any)
- func (c *B) Fail()
- func (c *B) FailNow()
- func (c *B) Failed() bool
- func (c *B) Fatal(a ...any)
- func (c *B) Fatalf(format string, a ...any)
- func (c *B) Helper()
- func (c *B) Log(a ...any)
- func (c *B) Logf(format string, a ...any)
- func (c *B) Name() string
- func (b *B) Setenv(key, value string)
- func (c *B) Skip(a ...any)
- func (c *B) SkipNow()
- func (c *B) Skipf(format string, a ...any)
- func (c *B) Skipped() bool
- func (c *B) TempDir() string
- type Cover
- type CoverBlock
- type F
- type InternalBenchmark
- type InternalExample
- type InternalFuzzTarget
- type InternalTest
- type PB
- type T
- func (c *T) Cleanup(f func())
- func (t *T) Deadline() (time.Time, bool)
- func (c *T) Error(a ...any)
- func (c *T) Errorf(format string, a ...any)
- func (c *T) Fail()
- func (c *T) FailNow()
- func (c *T) Failed() bool
- func (c *T) Fatal(a ...any)
- func (c *T) Fatalf(format string, a ...any)
- func (c *T) Helper()
- func (c *T) Log(a ...any)
- func (c *T) Logf(format string, a ...any)
- func (c *T) Name() string
- func (t *T) Parallel()
- func (t *T) Run(name string, f func(t *T)) bool
- func (t *T) Setenv(key, value string)
- func (c *T) Skip(a ...any)
- func (c *T) SkipNow()
- func (c *T) Skipf(format string, a ...any)
- func (c *T) Skipped() bool
- func (c *T) TempDir() string
- type TB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocsPerRun ¶
func Entrypoint ¶
func Entrypoint(match string, skip string, tests []gosimruntime.Test) bool
func Main ¶
func Main(matchString func(pat, str string) (bool, error), tests []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample)
func RegisterCover ¶
func RegisterCover(c Cover)
func RunBenchmarks ¶
func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark)
func RunExamples ¶
func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool)
Types ¶
type CoverBlock ¶
type InternalBenchmark ¶
type InternalExample ¶
type InternalFuzzTarget ¶
type InternalTest ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
func (*T) Run ¶
Run runs f as a subtest of t called name. It runs f in a separate goroutine and blocks until f returns or calls t.Parallel to become a parallel test. Run reports whether f succeeded (or at least did not fail before calling t.Parallel).
Run may be called simultaneously from multiple goroutines, but all such calls must return before the outer test function for t returns.
type TB ¶
type TB interface { Cleanup(func()) Error(args ...any) Errorf(format string, args ...any) Fail() FailNow() Failed() bool Fatal(args ...any) Fatalf(format string, args ...any) Helper() Log(args ...any) Logf(format string, args ...any) Name() string Setenv(key, value string) Skip(args ...any) SkipNow() Skipf(format string, args ...any) Skipped() bool TempDir() string // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.