mirror of
https://github.com/golang/go
synced 2024-11-12 08:40:21 -07:00
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>
This commit is contained in:
parent
b2dc1f82a5
commit
705be76b6f
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user