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:
Rob Pike 2011-12-20 10:36:25 -08:00
parent b9697d4a58
commit 6b772462e4
18 changed files with 54 additions and 73 deletions

View file

@ -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!")
}
}
}