mirror of https://github.com/golang/go.git
remove receclarations from tests
that are supposed to succeed SVN=124018
This commit is contained in:
parent
85785fe577
commit
a77f7b2497
|
|
@ -17,33 +17,33 @@ main()
|
||||||
a[i] = float(i);
|
a[i] = float(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
s := float(0);
|
s1 := float(0);
|
||||||
for i:=5; i<10; i=i+1 {
|
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 {
|
for i:=short(5); i<10; i=i+1 {
|
||||||
b[i] = float(i);
|
b[i] = float(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
s := float(0);
|
s2 := float(0);
|
||||||
for i:=5; i<10; i=i+1 {
|
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);
|
b := new([100]int);
|
||||||
for i:=0; i<100; i=i+1 {
|
for i:=0; i<100; i=i+1 {
|
||||||
b[i] = i;
|
b[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
s := 0;
|
s3 := 0;
|
||||||
for i:=0; i<100; i=i+1 {
|
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; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,15 @@ package main
|
||||||
func
|
func
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
s := vlong(0);
|
s1 := vlong(0);
|
||||||
for i:=short(0); i<10; i=i+1 {
|
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 {
|
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; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,21 +82,21 @@ main()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create string with byte array */
|
/* create string with byte array */
|
||||||
var z [3]byte;
|
var z1 [3]byte;
|
||||||
z[0] = 'a';
|
z1[0] = 'a';
|
||||||
z[1] = 'b';
|
z1[1] = 'b';
|
||||||
z[2] = 'c';
|
z1[2] = 'c';
|
||||||
c = string(z);
|
c = string(z1);
|
||||||
if c != "abc" {
|
if c != "abc" {
|
||||||
panic "create array ", c;
|
panic "create array ", c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create string with byte array pointer */
|
/* create string with byte array pointer */
|
||||||
z := new([3]byte);
|
z2 := new([3]byte);
|
||||||
z[0] = 'a';
|
z2[0] = 'a';
|
||||||
z[1] = 'b';
|
z2[1] = 'b';
|
||||||
z[2] = 'c';
|
z2[2] = 'c';
|
||||||
c = string(z);
|
c = string(z2);
|
||||||
if c != "abc" {
|
if c != "abc" {
|
||||||
panic "create array pointer ", c;
|
panic "create array pointer ", c;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue