improve fuzz tests (#592)

This commit is contained in:
Alessandro Ros
2024-08-01 16:33:04 +02:00
committed by GitHub
parent e2d1e6dab4
commit 92cf812d01
30 changed files with 144 additions and 41 deletions

View File

@@ -162,6 +162,9 @@ func FuzzResponseUnmarshal(f *testing.F) {
f.Fuzz(func(_ *testing.T, b []byte) {
var res Response
res.Unmarshal(bufio.NewReader(bytes.NewBuffer(b))) //nolint:errcheck
err := res.Unmarshal(bufio.NewReader(bytes.NewBuffer(b)))
if err == nil {
res.Marshal() //nolint:errcheck
}
})
}