improve fuzz tests (#3596)

This commit is contained in:
Alessandro Ros
2024-08-01 17:01:56 +02:00
committed by GitHub
parent 59ae3add7e
commit c9a938a501
5 changed files with 43 additions and 12 deletions

View File

@@ -322,6 +322,9 @@ func FuzzUnmarshal(f *testing.F) {
}
f.Fuzz(func(_ *testing.T, b []byte) {
Unmarshal(b) //nolint:errcheck
what, err := Unmarshal(b)
if err == nil {
Marshal(what) //nolint:errcheck
}
})
}