package testtrace
Import Path
internal/trace/testtrace (on go.dev)
Dependency Relation
imports 12 packages, and imported by 0 packages
Package-Level Type Names (total 2)
Expectation represents the expected result of some operation.
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.
func ExpectSuccess() *Expectation
func ParseExpectation(data []byte) (*Expectation, error)
func ParseFile(testPath string) (io.Reader, *Expectation, error)
Validator is a type used for validating a stream of trace.Events.
Go121 bool
Event validates ev as the next event in a stream of trace.Events.
Returns an error if validation fails.
func NewValidator() *Validator
Package-Level Functions (total 4)
ExpectSuccess returns an Expectation that trivially expects success.
NewValidator creates a new Validator.
ParseExpectation parses the serialized form of an Expectation.
ParseFile parses a test file generated by the testgen package.
The pages are generated with Golds v0.7.0-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |