testing: shorten some tests.

These are the top runners.  More to come.
Also print two digits of timing info under -test.v.

R=rsc
CC=golang-dev
https://golang.org/cl/4317044
This commit is contained in:
Rob Pike 2011-03-25 16:31:10 -07:00
parent 4cb660aad8
commit f0cf7d296c
11 changed files with 77 additions and 31 deletions

View file

@ -186,7 +186,7 @@ func RunTests(matchString func(pat, str string) (bool, os.Error), tests []Intern
go tRunner(t, &tests[i])
<-t.ch
ns += time.Nanoseconds()
tstr := fmt.Sprintf("(%.1f seconds)", float64(ns)/1e9)
tstr := fmt.Sprintf("(%.2f seconds)", float64(ns)/1e9)
if t.failed {
println("--- FAIL:", tests[i].Name, tstr)
print(t.errors)