Commit 5556f733 authored by Rob Pike's avatar Rob Pike

gotest: generate correct gofmt-formatted _testmain.go

Fixes #1225.

R=adg
CC=golang-dev
https://golang.org/cl/2729041
parent ec8f8149
...@@ -149,24 +149,24 @@ importpath=$(gomake -s importpath) ...@@ -149,24 +149,24 @@ importpath=$(gomake -s importpath)
echo 'import "testing"' echo 'import "testing"'
# test array # test array
echo echo
echo 'var tests = []testing.Test {' echo 'var tests = []testing.Test{'
for i in $tests for i in $tests
do do
echo ' testing.Test{ "'$i'", '$i' },' echo ' testing.Test{"'$i'", '$i'},'
done done
echo '}' echo '}'
# benchmark array # benchmark array
echo 'var benchmarks = []testing.Benchmark {' echo 'var benchmarks = []testing.Benchmark{'
for i in $benchmarks for i in $benchmarks
do do
echo ' testing.Benchmark{ "'$i'", '$i' },' echo ' testing.Benchmark{"'$i'", '$i'},'
done done
echo '}' echo '}'
# body # body
echo echo
echo 'func main() {' echo 'func main() {'
echo ' testing.Main(tests);' echo ' testing.Main(tests)'
echo ' testing.RunBenchmarks(benchmarks)' echo ' testing.RunBenchmarks(benchmarks)'
echo '}' echo '}'
}>_testmain.go }>_testmain.go
......
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