1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:04:39 -07:00

gofmt: add else test

R=gri
CC=golang-dev
https://golang.org/cl/4978065
This commit is contained in:
Russ Cox 2011-09-14 11:29:18 -04:00
parent e81d72100a
commit b039883946
3 changed files with 18 additions and 0 deletions

View File

@ -73,6 +73,7 @@ var tests = []struct {
{"gofmt.go", ""},
{"gofmt_test.go", ""},
{"testdata/composites.input", "-s"},
{"testdata/old.input", ""},
{"testdata/rewrite1.input", "-r=Foo->Bar"},
{"testdata/rewrite2.input", "-r=int->bool"},
{"testdata/stdin*.input", "-stdin"},

9
src/cmd/gofmt/testdata/old.golden vendored Normal file
View File

@ -0,0 +1,9 @@
package P
func f() {
if x {
y
} else {
z
}
}

8
src/cmd/gofmt/testdata/old.input vendored Normal file
View File

@ -0,0 +1,8 @@
package P
func f() {
if x {
y
} else
z
}