Documentation ¶
Index ¶
- type RuntimeT
- func (t *RuntimeT) Cleanup(func())
- func (t *RuntimeT) Error(args ...interface{})
- func (t *RuntimeT) Errorf(format string, args ...interface{})
- func (t *RuntimeT) Fail()
- func (t *RuntimeT) FailNow()
- func (t *RuntimeT) Failed() bool
- func (t *RuntimeT) Fatal(args ...interface{})
- func (t *RuntimeT) Fatalf(format string, args ...interface{})
- func (t *RuntimeT) Helper()
- func (t *RuntimeT) Log(args ...interface{})
- func (t *RuntimeT) Logf(format string, args ...interface{})
- func (t *RuntimeT) Name() string
- func (t *RuntimeT) Parallel()
- func (t *RuntimeT) Skip(args ...interface{})
- func (t *RuntimeT) SkipNow()
- func (t *RuntimeT) Skipf(format string, args ...interface{})
- func (t *RuntimeT) Skipped() bool
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuntimeT ¶
type RuntimeT struct {
// contains filtered or unexported fields
}
RuntimeT implements T and can be instantiated and run at runtime to mimic *testing.T behavior. Unlike *testing.T, this will simply panic for calls to Fatal. For calls to Error, you'll have to check the errors list to determine whether to exit yourself.
Cleanup does NOT work, so if you're using a helper that uses Cleanup, there may be dangling resources.
Parallel does not do anything.
type T ¶
type T interface { Cleanup(func()) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fail() FailNow() Failed() bool Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Helper() Log(args ...interface{}) Logf(format string, args ...interface{}) Name() string Parallel() Skip(args ...interface{}) SkipNow() Skipf(format string, args ...interface{}) Skipped() bool }
T is the interface that mimics the standard library *testing.T.
In unit tests you can just pass a *testing.T struct. At runtime, outside of tests, you can pass in a RuntimeT struct from this package.
Click to show internal directories.
Click to hide internal directories.