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 NewDotReporter(out *printing.Printer) *dot
- func NewGoTestReporter() *gotestReporter
- func NewJsonReporter(out *printing.Printer) *jsonReporter
- func NewProblemReporter(out *printing.Printer) *problem
- func NewReporters(collection ...Reporter) *reporters
- func NewStatisticsReporter(out *printing.Printer) *statistics
- func NewStoryReporter(out *printing.Printer) *story
- func QuietMode()
- type AssertionResult
- type FailureView
- type Reporter
- type ScopeReport
- type ScopeResult
- type StoryReport
Constants ¶
View Source
const CloseJson = "<<<<<" // "⌫"
View Source
const OpenJson = ">>>>>" // "⌦"
Variables ¶
This section is empty.
Functions ¶
func NewDotReporter ¶
func NewGoTestReporter ¶
func NewGoTestReporter() *gotestReporter
func NewJsonReporter ¶
func NewProblemReporter ¶
func NewReporters ¶
func NewReporters(collection ...Reporter) *reporters
func NewStatisticsReporter ¶
func NewStoryReporter ¶
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 Reporter ¶
type Reporter interface { BeginStory(story *StoryReport) Enter(scope *ScopeReport) Report(r *AssertionResult) Exit() EndStory() }
func BuildDotReporter ¶
func BuildDotReporter() Reporter
func BuildJsonReporter ¶
func BuildJsonReporter() Reporter
func BuildStoryReporter ¶
func BuildStoryReporter() Reporter
type ScopeReport ¶
func NewScopeReport ¶
func NewScopeReport(title, name string) *ScopeReport
type ScopeResult ¶
type ScopeResult struct { Title string File string Line int Depth int Assertions []*AssertionResult }
type StoryReport ¶
func NewStoryReport ¶
func NewStoryReport(test gotest.T) *StoryReport
Click to show internal directories.
Click to hide internal directories.