Documentation
¶
Index ¶
- func AllocsPerRun(runs int, f func()) (avg float64)
- func CoverMode() string
- func Coverage() float64
- func Init()
- func RegisterCover(c testing.Cover)
- func RunExamples(matchString func(pat, str string) (bool, error), ...) (ok bool)
- func RunTests(matchString func(pat, str string) (bool, error), tests []testing.InternalTest) (ok bool)
- func Short() bool
- func Verbose() bool
- type B
- func (c *B) Cleanup(f func())
- func (b *B) Elapsed() time.Duration
- func (c *B) Error(args ...any)
- func (c *B) Errorf(format string, args ...any)
- func (c *B) Fail()
- func (c *B) FailNow()
- func (c *B) Failed() bool
- func (c *B) Fatal(args ...any)
- func (c *B) Fatalf(format string, args ...any)
- func (c *B) Helper()
- func (c *B) Log(args ...any)
- func (c *B) Logf(format string, args ...any)
- func (c *B) Name() string
- func (b *B) ReportAllocs()
- func (b *B) ReportMetric(n float64, unit string)
- func (b *B) ResetTimer()
- func (b *B) Run(name string, f func(b *B)) bool
- func (b *B) RunParallel(body func(*PB))
- func (b *B) SetBytes(n int64)
- func (b *B) SetParallelism(p int)
- func (c *B) Setenv(key, value string)
- func (c *B) Skip(args ...any)
- func (c *B) SkipNow()
- func (c *B) Skipf(format string, args ...any)
- func (c *B) Skipped() bool
- func (b *B) StartTimer()
- func (b *B) StopTimer()
- func (c *B) TempDir() string
- type F
- func (f *F) Add(args ...any)
- func (c *F) Cleanup(f func())
- func (f *F) CleanupTempDirs()
- func (c *F) Error(args ...any)
- func (c *F) Errorf(format string, args ...any)
- func (f *F) Fail()
- func (c *F) FailNow()
- func (c *F) Failed() bool
- func (c *F) Fatal(args ...any)
- func (c *F) Fatalf(format string, args ...any)
- func (f *F) Fuzz(ff any)
- func (f *F) Helper()
- func (c *F) Log(args ...any)
- func (c *F) Logf(format string, args ...any)
- func (c *F) Name() string
- func (c *F) Setenv(key, value string)
- func (c *F) Skip(args ...any)
- func (c *F) SkipNow()
- func (c *F) Skipf(format string, args ...any)
- func (f *F) Skipped() bool
- func (f *F) TempDir() string
- type M
- type PB
- type T
- func (t *T) Cleanup(f func())
- func (t *T) CleanupTempDirs()
- func (t *T) Deadline() (deadline time.Time, ok bool)
- func (t *T) Error(args ...any)
- func (t *T) Errorf(format string, args ...any)
- func (t *T) Fail()
- func (t *T) FailNow()
- func (t *T) Failed() bool
- func (t *T) Fatal(args ...any)
- func (t *T) Fatalf(format string, args ...any)
- func (t *T) Helper()
- func (t *T) Log(args ...any)
- func (t *T) Logf(format string, args ...any)
- func (t *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 (t *T) Skip(args ...any)
- func (t *T) SkipNow()
- func (t *T) Skipf(format string, args ...any)
- func (t *T) Skipped() bool
- func (t *T) TempDir() string
- type TB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocsPerRun ¶
func RegisterCover ¶
func RunExamples ¶
Types ¶
type B ¶
type B struct {
N int
}
func (*B) ReportAllocs ¶
func (b *B) ReportAllocs()
func (*B) ReportMetric ¶
func (*B) ResetTimer ¶
func (b *B) ResetTimer()
func (*B) RunParallel ¶
func (*B) SetParallelism ¶
func (*B) StartTimer ¶
func (b *B) StartTimer()
type F ¶
type F struct { TempDirs []string // contains filtered or unexported fields }
func (*F) CleanupTempDirs ¶
func (f *F) CleanupTempDirs()
type T ¶
type T struct {
TempDirs []string
}
T can be used to terminate the current fuzz iteration without terminating the whole fuzz run. To do so, simply panic with the text "GO-FUZZ-BUILD-PANIC" and the fuzzer will recover.
func (*T) CleanupTempDirs ¶
func (t *T) CleanupTempDirs()
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 }
Click to show internal directories.
Click to hide internal directories.