diff options
| author | Marcel van Lohuizen <mpvl@golang.org> | 2016-03-18 14:27:29 +0100 |
|---|---|---|
| committer | Marcel van Lohuizen <mpvl@golang.org> | 2016-03-18 15:38:58 +0000 |
| commit | 705be76b6fde0f490d089338f06e27569b5abc28 (patch) | |
| tree | 28f40069a53d1fe26fcc68282ed1e61fed999be5 /src/encoding | |
| parent | b2dc1f82a5b2aa3132cb1fb0135efe1202a1e837 (diff) | |
| download | go-705be76b6fde0f490d089338f06e27569b5abc28.tar.xz | |
encoding/binary: improve error messages for benchmarks
Change-Id: I0f4b6752ecc8b4945ecfde627cdec13fc4bb6a69
Reviewed-on: https://go-review.googlesource.com/20850
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/binary/binary_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } } |
