Commit c54a5739 authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Kamil Kisiel

fixup! fuzz: Add more details when reporting failures

Appologize for the breakage there.
parent b429839d
...@@ -40,11 +40,11 @@ func Fuzz(data []byte) int { ...@@ -40,11 +40,11 @@ func Fuzz(data []byte) int {
} }
encoded := buf.String() encoded := buf.String()
dec = NewDecoder(bytes.NewStringReader(encoded)) dec = NewDecoder(bytes.NewBufferString(encoded))
obj2, err := dec.Decode() obj2, err := dec.Decode()
if err != nil { if err != nil {
// must succeed, as buf should contain valid pickle from encoder // must succeed, as buf should contain valid pickle from encoder
panic(fmt.Sprintf("protocol %d: decode back error: err\npickle: %q", proto, encoded) panic(fmt.Sprintf("protocol %d: decode back error: err\npickle: %q", proto, encoded))
} }
if !reflect.DeepEqual(obj, obj2) { if !reflect.DeepEqual(obj, obj2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment