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
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue