Documentation ¶
Index ¶
- func RecoverAsFail(t *testing.T)
- func Repr(v interface{}) string
- type Assert
- func (a Assert) Eq(assertionfmt string, value1, value2 interface{}, v ...interface{}) bool
- func (a Assert) Err(assertionfmt, errsubstr string, err error, v ...interface{}) bool
- func (a Assert) NoErr(assertionfmt string, err error, v ...interface{}) bool
- func (a Assert) Ok(assertionfmt string, ok bool, v ...interface{}) bool
- func (a Assert) Panic(expectedPanicRegExp string, f func()) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoverAsFail ¶
RecoverAsFail catches a panic and converts it into a test failure. Example:
func TestThing(t *testing.T) { defer testutil.RecoverAsFail(t) somethingThatMayPanic() }
Types ¶
Click to show internal directories.
Click to hide internal directories.