Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FAIL ¶
type FAIL struct { D string // test case description A interface{} }
FAIL expects a function under test to return an error.
func (FAIL) Actual ¶
func (f FAIL) Actual() interface{}
Actual returns the actual error return value for a function under test.
func (FAIL) Description ¶
Description returns the description for a function under test.
type PASS ¶
type PASS FAIL
PASS is just another type of FAIL, after all. (No, this hasn't been ripped off straight from one of Nico Semsrott's satirical revues.)
func (PASS) Actual ¶
func (p PASS) Actual() interface{}
Actual returns the actual error return value for a function under test.
func (PASS) Description ¶
Description returns the description for a function under test.
type PASSFAIL ¶
type PASSFAIL interface { Description() string Actual() interface{} }
PASSFAIL is an expectation for a function to either return no error and thus PASS or to return an error and thus FAIL.
type PASSFAILS ¶
type PASSFAILS []PASSFAIL
PASSFAILS is a list of PASS and FAIL expectations for function calls returning errors.
type TestWriter ¶
type TestWriter struct {
// contains filtered or unexported fields
}
TestWriter chains to another io.Writer and replaces certain characters as they pass through it for writing.
func NewTestWriter ¶
func NewTestWriter(w io.Writer) *TestWriter
NewTestWriter returns a new io.Writer which translates spaces into underscores and adornes new lines with a down-leftwards pointing arrow, and finally writing the result to a chained io.Writer.