| 1 | package reportingscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/ |
| 2 | |
| 3 | import "testingscip-go gomod github.com/golang/go/src go1.16 testing/" |
| 4 | |
| 5 | func TestReporterReceivesSuccessfulReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/TestReporterReceivesSuccessfulReport().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 6 | reporter := NewGoTestReporterscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewGoTestReporter().() |
| 7 | test := new(fakeTestscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#) |
| 8 | reporter.BeginStoryscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#BeginStory().(NewStoryReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewStoryReport().(test)) |
| 9 | reporter.Reportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#Report().(NewSuccessReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewSuccessReport().()) |
| 10 | |
| 11 | if test.failedscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#failed. { |
| 12 | t.Errorfscip-go gomod github.com/golang/go/src go1.16 testing/common#Errorf().("Should have have marked test as failed--the report reflected success.") |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | func TestReporterReceivesFailureReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/TestReporterReceivesFailureReport().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 17 | reporter := NewGoTestReporterscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewGoTestReporter().() |
| 18 | test := new(fakeTestscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#) |
| 19 | reporter.BeginStoryscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#BeginStory().(NewStoryReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewStoryReport().(test)) |
| 20 | reporter.Reportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#Report().(NewFailureReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewFailureReport().("This is a failure.")) |
| 21 | |
| 22 | if !test.failedscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#failed. { |
| 23 | t.Errorfscip-go gomod github.com/golang/go/src go1.16 testing/common#Errorf().("Test should have been marked as failed (but it wasn't).") |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func TestReporterReceivesErrorReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/TestReporterReceivesErrorReport().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 28 | reporter := NewGoTestReporterscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewGoTestReporter().() |
| 29 | test := new(fakeTestscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#) |
| 30 | reporter.BeginStoryscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#BeginStory().(NewStoryReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewStoryReport().(test)) |
| 31 | reporter.Reportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#Report().(NewErrorReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewErrorReport().("This is an error.")) |
| 32 | |
| 33 | if !test.failedscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#failed. { |
| 34 | t.Errorfscip-go gomod github.com/golang/go/src go1.16 testing/common#Errorf().("Test should have been marked as failed (but it wasn't).") |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | func TestReporterIsResetAtTheEndOfTheStoryscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/TestReporterIsResetAtTheEndOfTheStory().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 39 | defer catchscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/catch().(t) |
| 40 | reporter := NewGoTestReporterscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewGoTestReporter().() |
| 41 | test := new(fakeTestscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#) |
| 42 | reporter.BeginStoryscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#BeginStory().(NewStoryReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewStoryReport().(test)) |
| 43 | reporter.EndStoryscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#EndStory().() |
| 44 | |
| 45 | reporter.Reportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#Report().(NewSuccessReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewSuccessReport().()) |
| 46 | } |
| 47 | |
| 48 | func TestReporterNoopMethodsscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/TestReporterNoopMethods().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 49 | reporter := NewGoTestReporterscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewGoTestReporter().() |
| 50 | reporter.Enterscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#Enter().(NewScopeReportscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/NewScopeReport().("title")) |
| 51 | reporter.Exitscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/gotestReporter#Exit().() |
| 52 | } |
| 53 | |
| 54 | func catchscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/catch().(t *testingscip-go gomod github.com/golang/go/src go1.16 testing/.Tscip-go gomod github.com/golang/go/src go1.16 testing/T#) { |
| 55 | if r := recover(); r != nil { |
| 56 | t.Logscip-go gomod github.com/golang/go/src go1.16 testing/common#Log().("Getting to this point means we've passed (because we caught a panic appropriately).") |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | type fakeTestscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest# struct { |
| 61 | failedscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#failed. bool |
| 62 | } |
| 63 | |
| 64 | func (self *fakeTestscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#) Failscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#Fail().() { |
| 65 | self.failedscip-go gomod github.com/smartystreets/goconvey . `github.com/smartystreets/goconvey/convey/reporting`/fakeTest#failed. = true |
| 66 | } |