test: gofmt a few tests

I'm planning to change these tests, but the gofmt changes are
fairly extensive, so I'm separating the gofmt changes from the
substantive changes.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/5557052
This commit is contained in:
Ian Lance Taylor 2012-01-18 13:20:55 -08:00
parent 20812c4907
commit 6b3462820f
8 changed files with 242 additions and 248 deletions

View file

@ -7,19 +7,23 @@
package main
func main() {
var i, k int;
outer:
for k=0; k<2; k++ {
print("outer loop top k ", k, "\n");
if k != 0 { panic("k not zero") } // inner loop breaks this one every time
for i=0; i<2; i++ {
if i != 0 { panic("i not zero") } // loop breaks every time
print("inner loop top i ", i, "\n");
var i, k int
outer:
for k = 0; k < 2; k++ {
print("outer loop top k ", k, "\n")
if k != 0 {
panic("k not zero")
} // inner loop breaks this one every time
for i = 0; i < 2; i++ {
if i != 0 {
panic("i not zero")
} // loop breaks every time
print("inner loop top i ", i, "\n")
if true {
print("do break\n");
break outer;
print("do break\n")
break outer
}
}
}
print("broke\n");
print("broke\n")
}