diff --git a/src/encoding/binary/binary_test.go b/src/encoding/binary/binary_test.go index 3511a996a1..fc6ea9534a 100644 --- a/src/encoding/binary/binary_test.go +++ b/src/encoding/binary/binary_test.go @@ -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) } }