rewrite fuzz tests of decoders in order to get deterministic results (#261)

This commit is contained in:
Alessandro Ros
2023-04-26 12:30:51 +02:00
committed by GitHub
parent d6a55f882a
commit d56ae1f600
63 changed files with 192 additions and 99 deletions

View File

@@ -31,14 +31,14 @@ func TestDecode(t *testing.T) {
}
func FuzzDecoder(f *testing.F) {
d := &Decoder{
BitDepth: 24,
SampleRate: 48000,
ChannelCount: 2,
}
d.Init()
f.Fuzz(func(t *testing.T, b []byte) {
d := &Decoder{
BitDepth: 24,
SampleRate: 48000,
ChannelCount: 2,
}
d.Init()
d.Decode(&rtp.Packet{
Header: rtp.Header{
Version: 2,