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)
echo 'import "testing"'
# test array
echo
echo 'var tests = []testing.Test {'
echo 'var tests = []testing.Test{'
for i in $tests
do
echo ' testing.Test{ "'$i'", '$i' },'
echo ' testing.Test{"'$i'", '$i'},'
done
echo '}'
# benchmark array
echo 'var benchmarks = []testing.Benchmark {'
echo 'var benchmarks = []testing.Benchmark{'
for i in $benchmarks
do
echo ' testing.Benchmark{ "'$i'", '$i' },'
echo ' testing.Benchmark{"'$i'", '$i'},'
done
echo '}'
# body
echo
echo 'func main() {'
echo ' testing.Main(tests);'
echo ' testing.Main(tests)'
echo ' testing.RunBenchmarks(benchmarks)'
echo '}'
}>_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