Commit 705be76b authored by Marcel van Lohuizen's avatar Marcel van Lohuizen

encoding/binary: improve error messages for benchmarks

Change-Id: I0f4b6752ecc8b4945ecfde627cdec13fc4bb6a69
Reviewed-on: https://go-review.googlesource.com/20850Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent b2dc1f82
......@@ -374,7 +374,7 @@ func BenchmarkReadStruct(b *testing.B) {
}
b.StopTimer()
if !reflect.DeepEqual(s, t) {
b.Fatal("no match")
b.Fatalf("struct doesn't match:\ngot %v;\nwant %v", t, s)
}
}
......@@ -406,7 +406,7 @@ func BenchmarkReadInts(b *testing.B) {
}
b.StopTimer()
if !reflect.DeepEqual(ls, want) {
panic("no match")
b.Fatalf("struct doesn't match:\ngot %v;\nwant %v", ls, want)
}
}
......
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