Commit 02cae293 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

gotest: generate gofmt-compliant code

R=r
CC=golang-dev
https://golang.org/cl/4400047
parent 6f921f22
...@@ -378,7 +378,7 @@ func writeTestmainGo() { ...@@ -378,7 +378,7 @@ func writeTestmainGo() {
fmt.Fprintf(b, "import %q\n", "./_xtest_") fmt.Fprintf(b, "import %q\n", "./_xtest_")
} }
fmt.Fprintf(b, "import %q\n", "testing") fmt.Fprintf(b, "import %q\n", "testing")
fmt.Fprintf(b, "import __os__ %q\n", "os") // rename in case tested package is called os fmt.Fprintf(b, "import __os__ %q\n", "os") // rename in case tested package is called os
fmt.Fprintf(b, "import __regexp__ %q\n", "regexp") // rename in case tested package is called regexp fmt.Fprintf(b, "import __regexp__ %q\n", "regexp") // rename in case tested package is called regexp
fmt.Fprintln(b) // for gofmt fmt.Fprintln(b) // for gofmt
...@@ -393,7 +393,7 @@ func writeTestmainGo() { ...@@ -393,7 +393,7 @@ func writeTestmainGo() {
fmt.Fprintln(b) fmt.Fprintln(b)
// Benchmarks. // Benchmarks.
fmt.Fprintln(b, "var benchmarks = []testing.InternalBenchmark{") fmt.Fprintf(b, "var benchmarks = []testing.InternalBenchmark{")
for _, f := range files { for _, f := range files {
for _, bm := range f.benchmarks { for _, bm := range f.benchmarks {
fmt.Fprintf(b, "\t{\"%s.%s\", %s.%s},\n", f.pkg, bm, notMain(f.pkg), bm) fmt.Fprintf(b, "\t{\"%s.%s\", %s.%s},\n", f.pkg, bm, notMain(f.pkg), bm)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment