]> Cypherpunks repositories - gostls13.git/commitdiff
testing: make the output of -v more uniform and aligned when using fixed-width fonts
authorRob Pike <r@golang.org>
Fri, 8 May 2015 18:00:17 +0000 (11:00 -0700)
committerRob Pike <r@golang.org>
Fri, 8 May 2015 18:38:25 +0000 (18:38 +0000)
Delete the colon from RUN: for examples, since it's not there for tests.
Add spaces to line up RUN and PASS: lines.

Before:
=== RUN TestCount
--- PASS: TestCount (0.00s)
=== RUN: ExampleFields
--- PASS: ExampleFields (0.00s)

After:
=== RUN   TestCount
--- PASS: TestCount (0.00s)
=== RUN   ExampleFields
--- PASS: ExampleFields (0.00s)

Fixes #10594.

Change-Id: I189c80a5d99101ee72d8c9c3a4639c07e640cbd8
Reviewed-on: https://go-review.googlesource.com/9846
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/testing/example.go
src/testing/testing.go

index 61339a6465f699b9cbb77472e6542657b883dfa0..30baf27030adb74728fac6be06a066c0956a7b2f 100644 (file)
@@ -43,7 +43,7 @@ func RunExamples(matchString func(pat, str string) (bool, error), examples []Int
 
 func runExample(eg InternalExample) (ok bool) {
        if *chatty {
-               fmt.Printf("=== RUN: %s\n", eg.Name)
+               fmt.Printf("=== RUN   %s\n", eg.Name)
        }
 
        // Capture stdout.
index 280d76a1aa41493b87d3a5a46c44dd44b5c9724d..35ab82d4218d33f9b3e54b7f60c9ebd829163203 100644 (file)
@@ -557,7 +557,7 @@ func RunTests(matchString func(pat, str string) (bool, error), tests []InternalT
                        }
                        t.self = t
                        if *chatty {
-                               fmt.Printf("=== RUN %s\n", t.name)
+                               fmt.Printf("=== RUN   %s\n", t.name)
                        }
                        go tRunner(t, &tests[i])
                        out := (<-t.signal).(*T)