Skip to content

Commit

Permalink
testing: make the output of -v more uniform and aligned when using fi…
Browse files Browse the repository at this point in the history
…xed-width fonts

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 golang#10594.

Change-Id: I189c80a5d99101ee72d8c9c3a4639c07e640cbd8
Reviewed-on: https://go-review.googlesource.com/9846
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
robpike committed May 8, 2015
1 parent 91d989e commit 2b83366
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/testing/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2b83366

Please sign in to comment.