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.
If
F.Addis called with values with types that don't match the fuzz function's parameter types,f.Fuzzreports a fatal error and exits.The error message should point to the location where
F.Addwas called to make the error easy to correct.A vet check (#46218) should report errors for these calls at build time.