diff options
author | Rob Pike <r@golang.org> | 2010-10-25 17:03:25 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2010-10-25 17:03:25 -0700 |
commit | bf05841aa821050c0200b6648c6a3da60849b655 (patch) | |
tree | ac1f1206a4aa6bfb2a0c134dd7ae6893bcac4f2d | |
parent | 042c5defccea69f1a23d56f444e62c4aa0d20968 (diff) | |
download | go-bf05841aa821050c0200b6648c6a3da60849b655.tar.gz |
gotest: generate correct gofmt-formatted _testmain.go
Fixes issue 1225.
R=adg
CC=golang-dev
http://codereview.appspot.com/2729041
-rwxr-xr-x | src/cmd/gotest/gotest | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest index e634a1108..32b4aa538 100755 --- a/src/cmd/gotest/gotest +++ b/src/cmd/gotest/gotest @@ -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 |