summaryrefslogtreecommitdiff
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
commitd4f4656470e56d7d4dc35ecef1841f989745b24f (patch)
tree9d0faf1d96579f8c9fb0321586cab7c5149ccdf1 /test/simassign.go
parentdf89d5ea8f7e8d7601dc176b6544206a68b1fe09 (diff)
downloadgo-d4f4656470e56d7d4dc35ecef1841f989745b24f.tar.gz
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 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");
// }
}