Documentation ¶
Overview ¶
Package reporting contains internal functionality related to console reporting and output. Although this package has exported names is not intended for public consumption. See the examples package for how to use this project.
Index ¶
- Constants
- func NewConsole() io.Writer
- func NewDotReporter(out *Printer) *dot
- func NewGoTestReporter() *gotestReporter
- func NewProblemReporter(out *Printer) *problem
- func NewReporters(collection ...Reporter) *reporters
- func NewStatisticsReporter(out *Printer) *statistics
- func NewStoryReporter(out *Printer) *story
- func QuietMode()
- type AssertionResult
- type FailureView
- type JsonReporter
- func (self *JsonReporter) BeginStory(story *StoryReport)
- func (self *JsonReporter) EndStory()
- func (self *JsonReporter) Enter(scope *ScopeReport)
- func (self *JsonReporter) Exit()
- func (self *JsonReporter) Report(report *AssertionResult)
- func (self *JsonReporter) Write(content []byte) (written int, err error)
- type Printer
- type Reporter
- type ScopeReport
- type ScopeResult
- type StoryReport
- type T
Constants ¶
View Source
const CloseJson = "<-<-<-CLOSE-JSON<-<-<" // "⌫"
View Source
const OpenJson = ">->->OPEN-JSON->->->" // "⌦"
Variables ¶
This section is empty.
Functions ¶
func NewConsole ¶
func NewDotReporter ¶
func NewDotReporter(out *Printer) *dot
func NewGoTestReporter ¶
func NewGoTestReporter() *gotestReporter
func NewProblemReporter ¶
func NewProblemReporter(out *Printer) *problem
func NewReporters ¶
func NewReporters(collection ...Reporter) *reporters
func NewStatisticsReporter ¶
func NewStatisticsReporter(out *Printer) *statistics
func NewStoryReporter ¶
func NewStoryReporter(out *Printer) *story
Types ¶
type AssertionResult ¶
type AssertionResult struct { File string Line int Expected string Actual string Failure string Error interface{} StackTrace string Skipped bool }
func NewErrorReport ¶
func NewErrorReport(err interface{}) *AssertionResult
func NewFailureReport ¶
func NewFailureReport(failure string) *AssertionResult
func NewSkipReport ¶
func NewSkipReport() *AssertionResult
func NewSuccessReport ¶
func NewSuccessReport() *AssertionResult
type FailureView ¶
type JsonReporter ¶
type JsonReporter struct {
// contains filtered or unexported fields
}
func NewJsonReporter ¶
func NewJsonReporter(out *Printer) *JsonReporter
func (*JsonReporter) BeginStory ¶
func (self *JsonReporter) BeginStory(story *StoryReport)
func (*JsonReporter) EndStory ¶
func (self *JsonReporter) EndStory()
func (*JsonReporter) Enter ¶
func (self *JsonReporter) Enter(scope *ScopeReport)
func (*JsonReporter) Exit ¶
func (self *JsonReporter) Exit()
func (*JsonReporter) Report ¶
func (self *JsonReporter) Report(report *AssertionResult)
type Reporter ¶
type Reporter interface { BeginStory(story *StoryReport) Enter(scope *ScopeReport) Report(r *AssertionResult) Exit() EndStory() io.Writer }
func BuildDotReporter ¶
func BuildDotReporter() Reporter
func BuildJsonReporter ¶
func BuildJsonReporter() Reporter
func BuildSilentReporter ¶
func BuildSilentReporter() Reporter
func BuildStoryReporter ¶
func BuildStoryReporter() Reporter
type ScopeReport ¶
func NewScopeReport ¶
func NewScopeReport(title string) *ScopeReport
type ScopeResult ¶
type StoryReport ¶
func NewStoryReport ¶
func NewStoryReport(test T) *StoryReport
Click to show internal directories.
Click to hide internal directories.