From 9836f34dec5002c36672fdfcbcccc93df4652704 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 11 Aug 2008 22:07:49 -0700 Subject: fix bug depot: 1) fix print statements, panic statements (parentheses required) 2) len is now allowed as a var name (bug053) R=gri OCL=14106 CL=14106 --- test/simassign.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/simassign.go') diff --git a/test/simassign.go b/test/simassign.go index 5b8c3f39f..1e7d307aa 100644 --- a/test/simassign.go +++ b/test/simassign.go @@ -11,16 +11,16 @@ var a,b,c,d,e,f,g,h,i int; func printit() { - print a,b,c,d,e,f,g,h,i,"\n"; + print(a,b,c,d,e,f,g,h,i,"\n"); } func testit() bool { if a+b+c+d+e+f+g+h+i != 45 { - print "sum does not add to 45\n"; + print("sum does not add to 45\n"); printit(); - panic; + panic(); } return a == 1 && b == 2 && @@ -51,7 +51,7 @@ main() h = 8; i = 9; - if !testit() { panic "init val\n"; } + if !testit() { panic("init val\n"); } for z:=0; z<100; z++ { a,b,c,d, e,f,g,h,i = b,c,d,a, i,e,f,g,h; @@ -60,24 +60,24 @@ main() if z == 19 { break; } - print "on ", z, "th iteration\n"; + print("on ", z, "th iteration\n"); printit(); - panic; + panic(); } } if !testit() { - print "final val\n"; + print("final val\n"); printit(); - panic; + panic(); } a, b = swap(1, 2); if a != 2 || b != 1 { - panic "bad swap"; + panic("bad swap"); } //BUG a, b = swap(swap(a, b)); // if a != 2 || b != 1 { -// panic "bad swap"; +// panic("bad swap"); // } } -- cgit v1.2.3