improve fuzz tests (#571)

This commit is contained in:
Alessandro Ros
2024-05-17 19:19:15 +02:00
committed by GitHub
parent f283abc2e7
commit ef60c8c755
20 changed files with 250 additions and 234 deletions

View File

@@ -55,6 +55,9 @@ func TestInterleavedFrameMarshal(t *testing.T) {
}
func FuzzInterleavedFrameUnmarshal(f *testing.F) {
for _, ca := range casesInterleavedFrame {
f.Add(ca.enc)
}
f.Fuzz(func(_ *testing.T, b []byte) {
var f InterleavedFrame
f.Unmarshal(bufio.NewReader(bytes.NewBuffer(b))) //nolint:errcheck