File: gotest_fuzz_test.go

package info (click to toggle)
golang-github-jstemmer-go-junit-report 2.1.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 696 kB
  • sloc: xml: 975; makefile: 24
file content (18 lines) | stat: -rw-r--r-- 339 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)
		}
	})
}