Documentation ¶
Index ¶
- func NewRng(seed int64) *rand.Rand
- func RngSeed() int64
- type T
- func (t *T) Failed() bool
- func (t *T) Fatal(v ...interface{})
- func (t *T) FatalOnError(err error, msgAndArgs ...interface{})
- func (t *T) Log(vs ...interface{})
- func (t *T) Logf(fmt string, vs ...interface{})
- func (t *T) QuickCheck(fns ...interface{})
- func (t *T) Run(name string, fn func(t *T)) bool
- func (t *T) SetDefaultGenerators(fns ...interface{})
- func (t *T) Skip(args ...interface{})
- type TestLogTracer
- type Wrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type T ¶
type T struct { T *testing.T *assert.Assertions // contains filtered or unexported fields }
T wraps the testing, assert, and quick packages in order to provide some unified functionality.
func (*T) FatalOnError ¶
func (*T) QuickCheck ¶
func (t *T) QuickCheck(fns ...interface{})
QuickCheck runs a quick/check test. The last function passed specifies the test to be run. The test function can accept any parameters, but must return a bool value. The arguments are generated by random. Custom typed generator function of type `func(*rand.Rand) T` can be passed before the function under test. A generator with return value T will be used for every argument of type T. By default the random number generators seed is based on the current timestamp. Use the TEST_SEED environment value to configure a static seed value to be used by every test. The random number generator is not shared between tests.
func (*T) SetDefaultGenerators ¶
func (t *T) SetDefaultGenerators(fns ...interface{})
SetDefaultGenerators sets default generators for use with QuickCheck.
type TestLogTracer ¶
type TestLogTracer struct {
// contains filtered or unexported fields
}
func NewTestLogTracer ¶
func NewTestLogTracer(loggers ...interface{}) *TestLogTracer
func (*TestLogTracer) Printf ¶
func (t *TestLogTracer) Printf(fmt string, vs ...interface{})
func (*TestLogTracer) Println ¶
func (t *TestLogTracer) Println(vs ...interface{})