From 2b833666f13e851f1a83873ac249bfce1059df2c Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Fri, 8 May 2015 11:00:17 -0700 Subject: [PATCH] testing: make the output of -v more uniform and aligned when using fixed-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 #10594. Change-Id: I189c80a5d99101ee72d8c9c3a4639c07e640cbd8 Reviewed-on: https://go-review.googlesource.com/9846 Reviewed-by: Brad Fitzpatrick --- src/testing/example.go | 2 +- src/testing/testing.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testing/example.go b/src/testing/example.go index 61339a6465..30baf27030 100644 --- a/src/testing/example.go +++ b/src/testing/example.go @@ -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. diff --git a/src/testing/testing.go b/src/testing/testing.go index 280d76a1aa..35ab82d421 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -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) -- 2.48.1