If F.Add is called with values with types that don't match the fuzz function's parameter types, f.Fuzz reports a fatal error and exits.
func Fuzz(f *testing.F) {
f.Add("string not bytes")
f.Fuzz(func(t *testing.T, b []byte) { ... })
}
The error message should point to the location where F.Add was called to make the error easy to correct.
A vet check (#46218) should report errors for these calls at build time.
The text was updated successfully, but these errors were encountered:
jayconrod
added
NeedsFix
The path to resolution is known, but the work has not been done.
fuzz
Issues related to native fuzzing support
labels
Sep 9, 2021
rsc
changed the title
[dev.fuzz] testing: report line number for F.Add call with mismatched type
testing: report line number for F.Add call with mismatched type
Sep 21, 2021
If
F.Add
is called with values with types that don't match the fuzz function's parameter types,f.Fuzz
reports a fatal error and exits.The error message should point to the location where
F.Add
was called to make the error easy to correct.A vet check (#46218) should report errors for these calls at build time.
The text was updated successfully, but these errors were encountered: