Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expectation ¶
type Expectation struct {
// contains filtered or unexported fields
}
Expectation represents the expected result of some operation.
func ExpectSuccess ¶
func ExpectSuccess() *Expectation
ExpectSuccess returns an Expectation that trivially expects success.
func ParseExpectation ¶
func ParseExpectation(data []byte) (*Expectation, error)
ParseExpectation parses the serialized form of an Expectation.
func ParseFile ¶
func ParseFile(testPath string) (io.Reader, *Expectation, error)
ParseFile parses a test file generated by the testgen package.
func (*Expectation) Check ¶
func (e *Expectation) Check(err error) error
Check validates whether err conforms to the expectation. Returns an error if it does not conform.
Conformance means that if failure is true, then err must be non-nil. If err is non-nil, then it must match errorMatcher.
Click to show internal directories.
Click to hide internal directories.