Print events for debugging in tests

This commit is contained in:
Joël Stemmer 2019-10-06 18:52:46 +01:00
parent 02fb5c657b
commit cb92a4a6c8

View File

@ -1591,6 +1591,12 @@ func testNewParser(input, reportFile, packageName string, t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if *printEvents {
for _, event := range events {
t.Logf("Event: %+v", event)
}
}
actual := gtr.JUnit(gtr.FromEvents(events, packageName)) actual := gtr.JUnit(gtr.FromEvents(events, packageName))
expectedXML, err := loadTestReport(reportFile, "") expectedXML, err := loadTestReport(reportFile, "")