mirror of
https://github.com/golang/go
synced 2024-11-25 00:37:57 -07:00
gotest: make _testmain.go conform to gofmt rules
Otherwise, running "gofmt -d ." after "gotest" gives some spurious changes. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5504101
This commit is contained in:
parent
e4d624b04d
commit
8e9e75f008
@ -401,7 +401,7 @@ func writeTestmainGo() {
|
||||
fmt.Fprintln(b) // for gofmt
|
||||
|
||||
// Tests.
|
||||
fmt.Fprintln(b, "var tests = []testing.InternalTest{")
|
||||
fmt.Fprintln(b, "var tests = []testing.InternalTest{\n")
|
||||
for _, f := range files {
|
||||
for _, t := range f.tests {
|
||||
fmt.Fprintf(b, "\t{\"%s.%s\", %s.%s},\n", f.pkg, t, renamedPackage(f.pkg), t)
|
||||
@ -411,7 +411,7 @@ func writeTestmainGo() {
|
||||
fmt.Fprintln(b)
|
||||
|
||||
// Benchmarks.
|
||||
fmt.Fprintf(b, "var benchmarks = []testing.InternalBenchmark{")
|
||||
fmt.Fprintf(b, "var benchmarks = []testing.InternalBenchmark{\n")
|
||||
for _, f := range files {
|
||||
for _, bm := range f.benchmarks {
|
||||
fmt.Fprintf(b, "\t{\"%s.%s\", %s.%s},\n", f.pkg, bm, renamedPackage(f.pkg), bm)
|
||||
|
Loading…
Reference in New Issue
Block a user