diff --git a/parser/gotest/gotest_fuzz_test.go b/parser/gotest/gotest_fuzz_test.go new file mode 100644 index 0000000..983af9f --- /dev/null +++ b/parser/gotest/gotest_fuzz_test.go @@ -0,0 +1,18 @@ +//go:build go1.18 +// +build go1.18 + +package gotest + +import "testing" + +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) + } + }) +} diff --git a/parser/gotest/gotest_test.go b/parser/gotest/gotest_test.go index b2580d6..e4ec5a5 100644 --- a/parser/gotest/gotest_test.go +++ b/parser/gotest/gotest_test.go @@ -221,15 +221,3 @@ 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) - } - }) -}