Documentation ¶
Overview ¶
Package extension contains the types for extending the core package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPanicError ¶
NewPanicError returns a new PanicError. Object o is the panicking error, skip is the magic number to skip noise entries of stack trace.
Types ¶
type PanicError ¶
type PanicError struct { Err error Stack []FuncPos SS []byte // TODO: if it is useful, parse it, otherwise, delete it. }
PanicError wraps an error from panicking and its call stack trace.
func (*PanicError) Error ¶
func (e *PanicError) Error() string
Error is the same as the panicking error.
type PendingError ¶
type PendingError struct{}
PendingError is used for marking a test group without a test closure.
func (*PendingError) Error ¶
func (*PendingError) Error() string
type Reporter ¶
type Reporter interface { Start() // Start should be called before all tests start. End(group *TestGroup) // End should be called after all tests end. Progress(g *TestGroup, s *Stats) // Progress should be called whenever the statistics change. }
Reporter is a interface to accept events from tests running.
type Stats ¶
type Stats struct { Total int // Total number of test cases. Ended int // Number of ended test cases. Failed int // Number of failed test cases. Pending int // Number of pending test cases. }
Stats contains statistics of tests running.
type TestGroup ¶
type TestGroup struct { ID string // ID of the test group, used for focus mode. Description string // Description of the test group. Error error // Error passed in during execution of the test group. Duration time.Duration // Time duration of running the test group, set only to leaf node (test case). Children TestGroups // Children nested within the test groups. }
A TestGroup contains a test group's related data.
Click to show internal directories.
Click to hide internal directories.