Documentation ¶
Overview ¶
Package testingp is a plus to standard "testing" package.
Index ¶
- Variables
- type WriterTB
- func (wtb *WriterTB) Error(args ...interface{})
- func (wtb *WriterTB) Errorf(format string, args ...interface{})
- func (wtb *WriterTB) Fail()
- func (wtb *WriterTB) FailNow()
- func (wtb *WriterTB) Failed() bool
- func (wtb *WriterTB) Fatal(args ...interface{})
- func (wtb *WriterTB) Fatalf(format string, args ...interface{})
- func (wtb *WriterTB) Log(args ...interface{})
- func (wtb *WriterTB) Logf(format string, args ...interface{})
- func (wtb *WriterTB) Skip(args ...interface{})
- func (wtb *WriterTB) SkipNow()
- func (wtb *WriterTB) Skipf(format string, args ...interface{})
- func (wtb *WriterTB) Skipped() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // error thrown when failed FailedErr = errors.New("FailedErr") // error thrown when skipped SkippedErr = errors.New("SkippedErr") )
Functions ¶
This section is empty.
Types ¶
type WriterTB ¶
type WriterTB struct { // this embeding implements private methods of testing.TB testing.TB // The destination of the logs io.Writer // The suffix for each log Suffix string // contains filtered or unexported fields }
*WriterTB implements the testing.TB interface. An io.Writer can be specified as the destination of logging. Skipped and failed status are also stored. FailedErr is thrown when FailNow is called and SkippedErr for SkipNow.
This type is especially useful for writing testcases of tools for testing.
Click to show internal directories.
Click to hide internal directories.