Documentation ¶
Index ¶
- type T
- func (t *T) Assert(cond bool)
- func (t *T) AssertDeepEqual(val, ref interface{})
- func (t *T) AssertEqual(val, ref interface{})
- func (t *T) Check(cond bool)
- func (t *T) CheckContains(s, substr string)
- func (t *T) CheckDeepEqual(val, ref interface{})
- func (t *T) CheckEqual(val, ref interface{})
- func (t *T) CheckRegexpEqual(val, regexs string)
- func (t *T) CheckStringEqual(val, ref string)
- func (t *T) Run(testName string, testFn func(t T))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
T is a wrapper around testing.T which provides additional methods defined in this package. See below for details.
func (*T) Assert ¶
Assert calls t.Fatal if the condition is false. Also the text of the assertion is printed.
func (*T) AssertDeepEqual ¶
func (t *T) AssertDeepEqual(val, ref interface{})
AssertDeepEqual asserts that the value is equal to some reference.
func (*T) AssertEqual ¶
func (t *T) AssertEqual(val, ref interface{})
AssertEqual asserts that the value is equal to some reference.
func (*T) Check ¶
Check calls t.Error if the condition is false. Also the text of the condition is printed.
func (*T) CheckContains ¶ added in v1.10.1
func (*T) CheckDeepEqual ¶
func (t *T) CheckDeepEqual(val, ref interface{})
CheckDeepEqual checks that the value is equal to some reference.
func (*T) CheckEqual ¶
func (t *T) CheckEqual(val, ref interface{})
CheckEqual checks that the value is equal to some reference.
func (*T) CheckRegexpEqual ¶
CheckRegexpEqual checks that the value is matched by some regular expression.
func (*T) CheckStringEqual ¶ added in v1.4.0
CheckEqual checks that the string value is equal to some reference.