Documentation
¶
Index ¶
- type RecorderTB
- func (rtb *RecorderTB) Cleanup(f func())
- func (rtb *RecorderTB) CleanupNow()
- func (rtb *RecorderTB) Error(args ...interface{})
- func (rtb *RecorderTB) Errorf(format string, args ...interface{})
- func (rtb *RecorderTB) Fail()
- func (rtb *RecorderTB) FailNow()
- func (rtb *RecorderTB) Failed() bool
- func (rtb *RecorderTB) Fatal(args ...interface{})
- func (rtb *RecorderTB) Fatalf(format string, args ...interface{})
- func (rtb *RecorderTB) Forward()
- func (rtb *RecorderTB) ForwardLogs()
- func (rtb *RecorderTB) Helper()
- func (rtb *RecorderTB) Log(args ...interface{})
- func (rtb *RecorderTB) Logf(format string, args ...interface{})
- func (rtb *RecorderTB) Pass()
- func (rtb *RecorderTB) Passes() int
- func (rtb *RecorderTB) Run(_ string, blk func(testing.TB)) bool
- func (rtb *RecorderTB) Setenv(key, value string)
- func (rtb *RecorderTB) Skip(args ...any)
- func (rtb *RecorderTB) SkipNow()
- func (rtb *RecorderTB) Skipped() bool
- type TB
- func (m *TB) Chdir(dir string)
- func (m *TB) Cleanup(f func())
- func (m *TB) Context() context.Context
- func (m *TB) Error(args ...any)
- func (m *TB) Errorf(format string, args ...any)
- func (m *TB) Fail()
- func (m *TB) FailNow()
- func (m *TB) Failed() bool
- func (m *TB) Fatal(args ...any)
- func (m *TB) Fatalf(format string, args ...any)
- func (m *TB) Finish()
- func (m *TB) Helper()
- func (m *TB) LastRunTB() (*TB, bool)
- func (m *TB) LastTB() *TB
- func (m *TB) Log(args ...any)
- func (m *TB) Logf(format string, args ...any)
- func (m *TB) Name() string
- func (m *TB) Pass()
- func (m *TB) Passes() int
- func (m *TB) Run(name string, blk func(tb testing.TB)) bool
- func (m *TB) Setenv(key, value string)
- func (m *TB) Skip(args ...any)
- func (m *TB) SkipNow()
- func (m *TB) Skipf(format string, args ...any)
- func (m *TB) Skipped() bool
- func (m *TB) TempDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecorderTB ¶
type RecorderTB struct { testing.TB // Passthrough is a flag that makes the recorder act as a passthrough proxy to the .TB field. Passthrough bool IsFailed bool IsSkipped bool // contains filtered or unexported fields }
func (*RecorderTB) Cleanup ¶
func (rtb *RecorderTB) Cleanup(f func())
func (*RecorderTB) CleanupNow ¶
func (rtb *RecorderTB) CleanupNow()
func (*RecorderTB) Error ¶
func (rtb *RecorderTB) Error(args ...interface{})
func (*RecorderTB) Errorf ¶
func (rtb *RecorderTB) Errorf(format string, args ...interface{})
func (*RecorderTB) Fail ¶
func (rtb *RecorderTB) Fail()
func (*RecorderTB) FailNow ¶
func (rtb *RecorderTB) FailNow()
func (*RecorderTB) Failed ¶
func (rtb *RecorderTB) Failed() bool
func (*RecorderTB) Fatal ¶
func (rtb *RecorderTB) Fatal(args ...interface{})
func (*RecorderTB) Fatalf ¶
func (rtb *RecorderTB) Fatalf(format string, args ...interface{})
func (*RecorderTB) Forward ¶
func (rtb *RecorderTB) Forward()
func (*RecorderTB) ForwardLogs ¶ added in v0.181.0
func (rtb *RecorderTB) ForwardLogs()
func (*RecorderTB) Helper ¶
func (rtb *RecorderTB) Helper()
func (*RecorderTB) Log ¶
func (rtb *RecorderTB) Log(args ...interface{})
func (*RecorderTB) Logf ¶
func (rtb *RecorderTB) Logf(format string, args ...interface{})
func (*RecorderTB) Pass ¶ added in v0.181.0
func (rtb *RecorderTB) Pass()
Pass is an API to communicate with the TB that an assertion passed
func (*RecorderTB) Passes ¶ added in v0.181.0
func (rtb *RecorderTB) Passes() int
func (*RecorderTB) Setenv ¶
func (rtb *RecorderTB) Setenv(key, value string)
func (*RecorderTB) Skip ¶ added in v0.181.0
func (rtb *RecorderTB) Skip(args ...any)
func (*RecorderTB) SkipNow ¶ added in v0.181.0
func (rtb *RecorderTB) SkipNow()
func (*RecorderTB) Skipped ¶ added in v0.181.0
func (rtb *RecorderTB) Skipped() bool
type TB ¶
type TB struct { // TB is an optional value here. // If provided, some default behaviour might be taken from it, like TempDir. // // It also helps implement testing.TB interface's with embedding. testing.TB IsFailed bool IsSkipped bool Logs bytes.Buffer StubName string StubNameFunc func() string StubTempDir string OnFailNow func() OnSkipNow func() Tests []*TB // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.