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

@ -39,7 +39,7 @@ func benchmarkEndToEnd(r io.Reader, w io.Writer, b *testing.B) {
func BenchmarkEndToEndPipe(b *testing.B) {
r, w, err := os.Pipe()
if err != nil {
panic("can't get pipe:" + err.Error())
b.Fatal("can't get pipe:", err)
}
benchmarkEndToEnd(r, w, b)
}