Documentation
¶
Index ¶
- func Each(t Testable, iteratee interface{}) (count int)
- type Assertion
- func (as Assertion) Eq(a, b interface{})
- func (as Assertion) Err(args ...interface{})
- func (as Assertion) False(a bool)
- func (as Assertion) Gt(a, b interface{})
- func (as Assertion) Gte(a, b interface{})
- func (as Assertion) Has(container, str string)
- func (as Assertion) Is(a, b interface{})
- func (as Assertion) Len(list interface{}, l int)
- func (as Assertion) Lt(a, b interface{})
- func (as Assertion) Lte(a, b interface{})
- func (as Assertion) Neq(a, b interface{})
- func (as Assertion) Nil(args ...interface{})
- func (as Assertion) NotNil(args ...interface{})
- func (as Assertion) Panic(fn func())
- func (as Assertion) Regex(pattern, str string)
- func (as Assertion) True(a bool)
- type Testable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Each ¶ added in v0.0.3
Each runs each exported method Fn on type Ctx as a subtest of t. The iteratee can be a struct Ctx or:
iteratee(t Testable) (ctx Ctx)
Each Fn will be called like:
ctx.Fn()
If iteratee is Ctx, its Assertion and T fields will be set to New(t) and t for each test. Any Fn that has the same name with the embedded one will be ignored.
Types ¶
type Assertion ¶ added in v0.0.3
type Assertion struct {
Testable
}
Assertion is the assertion context
func (Assertion) Err ¶ added in v0.0.3
func (as Assertion) Err(args ...interface{})
Err args[-1] is error and not nil
func (Assertion) Nil ¶ added in v0.0.3
func (as Assertion) Nil(args ...interface{})
Nil args[-1] == nil
func (Assertion) NotNil ¶ added in v0.0.3
func (as Assertion) NotNil(args ...interface{})
NotNil args[-1] != nil
Click to show internal directories.
Click to hide internal directories.