Commit 8b9c271e authored by Kirill Smelkov's avatar Kirill Smelkov

decoder: tests: When decode result is unexpected - report it with full details

that is with %#v instead of %q. Because e.g. %q for nil []byte will be
printing still as "", not nil etc. When some decode test fails here we
want to get full information, not some pretty one.
parent 6d5eaca2
...@@ -79,7 +79,7 @@ func TestDecode(t *testing.T) { ...@@ -79,7 +79,7 @@ func TestDecode(t *testing.T) {
} }
if !reflect.DeepEqual(v, test.expected) { if !reflect.DeepEqual(v, test.expected) {
t.Errorf("%s: got\n%q\n expected\n%q", test.name, v, test.expected) t.Errorf("%s: decode:\nhave: %#v\nwant: %#v", test.name, v, test.expected)
} }
v, err = dec.Decode() v, err = dec.Decode()
......
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