Documentation
¶
Overview ¶
Package testing provides some convenience functionality for testing.
Index ¶
- func Assert(condition bool, message string, t *T, arg ...interface{})
- type T
- func (t *T) Assert(condition bool, message string, arg ...interface{})
- func (t *T) AssertEquals(expected interface{}, actual interface{}, message string, arg ...interface{})
- func (t *T) AssertError(err error, message string, arg ...interface{})
- func (t *T) AssertNoError(err error, message string, arg ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T is a wrapper for testing.T, providing assertion functions.
func NewVerboseT ¶
NewVerboseT creates a new verbose instance of T, which wraps t. A verbose T will also print messages when assertions hold.
func (*T) AssertEquals ¶
func (t *T) AssertEquals(expected interface{}, actual interface{}, message string, arg ...interface{})
AssertEquals compares v1 and v2 and performs Assert(...) on the testing.T wrapped by t with the result of this comparison.
func (*T) AssertError ¶
AssertError performs Assert(...) on the testing.T wrapped by t, testing err for not being nil.
func (*T) AssertNoError ¶
AssertNoError performs Assert(...) on the testing.T wrapped by t, testing err for being nil.
Click to show internal directories.
Click to hide internal directories.