improve coverage (#168)

This commit is contained in:
Alessandro Ros
2023-01-06 23:34:10 +01:00
committed by GitHub
parent a759ba9d01
commit 2e88705875
195 changed files with 535 additions and 63 deletions

View File

@@ -165,3 +165,21 @@ func TestDTSExtractor(t *testing.T) {
})
}
}
func FuzzDTSExtractor(f *testing.F) {
ex := NewDTSExtractor()
f.Fuzz(func(t *testing.T, b []byte, p uint64) {
if len(b) < 1 {
return
}
ex.Extract([][]byte{
{ // SPS
0x27, 0x64, 0x00, 0x20, 0xac, 0x52, 0x18, 0x0f,
0x01, 0x17, 0xef, 0xff, 0x00, 0x01, 0x00, 0x01,
0x6a, 0x02, 0x02, 0x03, 0x6d, 0x85, 0x6b, 0xde,
0xf8, 0x08,
},
b,
}, time.Duration(p))
})
}