aboutsummaryrefslogtreecommitdiff
path: root/test/simassign.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-08-11 22:07:49 -0700
committerRob Pike <r@golang.org>2008-08-11 22:07:49 -0700
commitbc2f5f1dce1687d0aff0d51ea1b56a5d52aa3891 (patch)
tree9d0faf1d96579f8c9fb0321586cab7c5149ccdf1 /test/simassign.go
parent7293dab5a9e4d0fb4b66fd76bab2572bbebc050d (diff)
downloadgo-bc2f5f1dce1687d0aff0d51ea1b56a5d52aa3891.tar.gz
go-bc2f5f1dce1687d0aff0d51ea1b56a5d52aa3891.zip
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
Diffstat (limited to 'test/simassign.go')
-rw-r--r--test/simassign.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/simassign.go b/test/simassign.go
index 5b8c3f39fa..1e7d307aaf 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");
// }
}