Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
encoding/binary: improve error messages for benchmarks
Browse files Browse the repository at this point in the history
Change-Id: I0f4b6752ecc8b4945ecfde627cdec13fc4bb6a69
Reviewed-on: https://go-review.googlesource.com/20850
Reviewed-by: Russ Cox <[email protected]>
  • Loading branch information
mpvl committed Mar 18, 2016
1 parent b2dc1f8 commit 705be76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/encoding/binary/binary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 705be76

Please sign in to comment.