nilReporter.go 642 B

123456789101112131415
  1. package convey
  2. import (
  3. "github.com/smartystreets/goconvey/convey/reporting"
  4. )
  5. type nilReporter struct{}
  6. func (self *nilReporter) BeginStory(story *reporting.StoryReport) {}
  7. func (self *nilReporter) Enter(scope *reporting.ScopeReport) {}
  8. func (self *nilReporter) Report(report *reporting.AssertionResult) {}
  9. func (self *nilReporter) Exit() {}
  10. func (self *nilReporter) EndStory() {}
  11. func (self *nilReporter) Write(p []byte) (int, error) { return len(p), nil }
  12. func newNilReporter() *nilReporter { return &nilReporter{} }