Documentation ¶
Index ¶
- func Because(t *testing.T, context string, wrapper func(*testing.T))
- func Log(args ...interface{})
- func When(t *testing.T, context string, wrapper func(*testing.T))
- type Comparer
- type Mint
- type Result
- type Testee
- func (testee *Testee) Deeply() *Testee
- func (testee *Testee) Dry() *Testee
- func (testee *Testee) Exit(expectedCode int) Result
- func (testee *Testee) In(expecteds ...interface{}) Result
- func (testee *Testee) Log(args ...interface{})
- func (testee *Testee) Match(expression string) Result
- func (testee *Testee) Not() *Testee
- func (testee *Testee) ToBe(expected interface{}) Result
- func (testee *Testee) TypeOf(typeName string) Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mint ¶
type Mint struct {
// contains filtered or unexported fields
}
Mint (mint.Mint) is wrapper for *testing.T blending testing type to omit repeated `t`.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result provide the results of assertion for `Dry` option.
type Testee ¶
type Testee struct {
// contains filtered or unexported fields
}
Testee is holder of interfaces which user want to assert and also has its result.
func (*Testee) Deeply ¶
Deeply makes following assertions use `reflect.DeepEqual`. You had better use this to compare reference type objects.
func (*Testee) Dry ¶
Dry makes the testee NOT to call "Fail()". Use this if you want to fail test in a purpose.
func (*Testee) Log ¶
func (testee *Testee) Log(args ...interface{})
Log only output if -v flag is given. This is because the standard "t.Testing.Log" method decorates its caller: runtime.Caller(3) automatically.
func (*Testee) Match ¶
Match can assert the testee to match with specified regular expression. It uses `regexp.MustCompile`, it's due to caller to make sure it's valid regexp. OS will exit with code 1, when the assertion fail. If you don't want to exit, see "Dry()".