]> Cypherpunks repositories - gostls13.git/commitdiff
remove receclarations from tests
authorKen Thompson <ken@golang.org>
Sat, 21 Jun 2008 22:08:04 +0000 (15:08 -0700)
committerKen Thompson <ken@golang.org>
Sat, 21 Jun 2008 22:08:04 +0000 (15:08 -0700)
that are supposed to succeed

SVN=124018

test/ken/simparray.go
test/ken/simpconv.go
test/ken/string.go

index e1b41058f1c0a4b3258e01f319d806c9a94db419..1cbde1bd475d9b8eb8e17a43901b4751c84c2d22 100644 (file)
@@ -17,33 +17,33 @@ main()
                a[i] = float(i);
        }
 
-       s := float(0);
+       s1 := float(0);
        for i:=5; i<10; i=i+1 {
-               s = s + a[i];
+               s1 = s1 + a[i];
        }
 
-       if s != 35 { panic s; }
+       if s1 != 35 { panic s1; }
 
        for i:=short(5); i<10; i=i+1 {
                b[i] = float(i);
        }
 
-       s := float(0);
+       s2 := float(0);
        for i:=5; i<10; i=i+1 {
-               s = s + b[i];
+               s2 = s2 + b[i];
        }
 
-       if s != 35 { panic s; }
+       if s2 != 35 { panic s2; }
 
        b := new([100]int);
        for i:=0; i<100; i=i+1 {
                b[i] = i;
        }
 
-       s := 0;
+       s3 := 0;
        for i:=0; i<100; i=i+1 {
-               s = s+b[i];
+               s3 = s3+b[i];
        }
 
-       if s != 4950 { panic s; }
+       if s3 != 4950 { panic s3; }
 }
index df8242ba351fa0b749639cf735ab851089f172e2..895024e5bfd6533d7b9e38e3b279f38faf29e391 100644 (file)
@@ -9,15 +9,15 @@ package main
 func
 main()
 {
-       s := vlong(0);
+       s1 := vlong(0);
        for i:=short(0); i<10; i=i+1 {
-               s = s + vlong(i);
+               s1 = s1 + vlong(i);
        }
-       if s != 45 { panic s; }
+       if s1 != 45 { panic s1; }
 
-       s := float(0);
+       s2 := float(0);
        for i:=0; i<10; i=i+1 {
-               s = s + float(i);
+               s2 = s2 + float(i);
        }
-       if s != 45 { panic s; }
+       if s2 != 45 { panic s2; }
 }
index 85cb83a645a762b0a484f223de275472cc82ee63..51da6a2301390d8eca5f8e22b4e9b5f6fc70c9e5 100644 (file)
@@ -82,21 +82,21 @@ main()
        }
 
        /* create string with byte array */
-       var z [3]byte;
-       z[0] = 'a';
-       z[1] = 'b';
-       z[2] = 'c';
-       c = string(z);
+       var z1 [3]byte;
+       z1[0] = 'a';
+       z1[1] = 'b';
+       z1[2] = 'c';
+       c = string(z1);
        if c != "abc" {
                panic "create array ", c;
        }
 
        /* create string with byte array pointer */
-       z := new([3]byte);
-       z[0] = 'a';
-       z[1] = 'b';
-       z[2] = 'c';
-       c = string(z);
+       z2 := new([3]byte);
+       z2[0] = 'a';
+       z2[1] = 'b';
+       z2[2] = 'c';
+       c = string(z2);
        if c != "abc" {
                panic "create array pointer ", c;
        }