Documentation
¶
Index ¶
- func Each(t Testable, iteratee interface{}) (count int)
- type Assertion
- func (as Assertion) Eq(a, b interface{}) (result Result)
- func (as Assertion) Err(args ...interface{}) (result Result)
- func (as Assertion) False(a bool) (result Result)
- func (as Assertion) Gt(a, b interface{}) (result Result)
- func (as Assertion) Gte(a, b interface{}) (result Result)
- func (as Assertion) Has(container, str string) (result Result)
- func (as Assertion) Is(a, b interface{}) (result Result)
- func (as Assertion) Len(list interface{}, l int) (result Result)
- func (as Assertion) Lt(a, b interface{}) (result Result)
- func (as Assertion) Lte(a, b interface{}) (result Result)
- func (as Assertion) Neq(a, b interface{}) (result Result)
- func (as Assertion) Nil(args ...interface{}) (result Result)
- func (as Assertion) NotNil(args ...interface{}) (result Result)
- func (as Assertion) Panic(fn func()) (result Result)
- func (as Assertion) Regex(pattern, str string) (result Result)
- func (as Assertion) True(a bool) (result Result)
- type Options
- type Result
- 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 // contains filtered or unexported fields }
Assertion is the assertion context
type Options ¶ added in v0.1.0
type Options struct { // Dump a value to human readable string Dump func(interface{}) string // Format keywords in the assertion message. // Such as color it for CLI output. Keyword func(string) string }
Options for Assertion
Click to show internal directories.
Click to hide internal directories.