mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-04 05:02:47 -05:00
parser/gotest: Add fuzzing test for parseLine
This commit is contained in:
@ -221,3 +221,15 @@ func TestParseLine(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func FuzzParseLine(f *testing.F) {
|
||||
for _, test := range parseLineTests {
|
||||
f.Add(test.input)
|
||||
}
|
||||
f.Fuzz(func(t *testing.T, in string) {
|
||||
events := NewParser().parseLine(in)
|
||||
if len(events) == 0 {
|
||||
t.Fatalf("parseLine(%q) did not return any results", in)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user