Documentation ¶
Overview ¶
Package errors provides all types of test error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Sprint is used by checker to format actual and expected variables to // strings. It has a default implementation and can be replaced with an // external function. Sprint = func(v interface{}) string { return fmt.Sprintf("%v", v) } // IndentString is the default value for a level of indent. IndentString = " " )
Functions ¶
Types ¶
type CompareError ¶
type CompareError struct { ExpectError Actual, Expected interface{} Name string }
CompareError is the error of comparing two values.
func (*CompareError) Error ¶
func (e *CompareError) Error() string
Error of CompareError formats an error message with the actual, expected value and the verb. When the actual value ends with break, it will add indent accordingly.
type ExpectError ¶
ExpectError is the base type of an expectation error.
func (*ExpectError) Error ¶
func (e *ExpectError) Error() string
Error of ExpectError print the Text field.
Click to show internal directories.
Click to hide internal directories.