mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
panics: use the new facilities of testing.B instead
Lots of panics go away. Also fix a name error in html/template. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5498045
This commit is contained in:
parent
b9697d4a58
commit
6b772462e4
18 changed files with 54 additions and 73 deletions
|
|
@ -673,7 +673,7 @@ func benchmark(b *testing.B, re string, n int) {
|
|||
b.SetBytes(int64(n))
|
||||
for i := 0; i < b.N; i++ {
|
||||
if r.Match(t) {
|
||||
panic("match!")
|
||||
b.Fatal("match!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue