]> Cypherpunks repositories - gostls13.git/commitdiff
update tests for new reflect
authorRuss Cox <rsc@golang.org>
Tue, 7 Jul 2009 18:04:51 +0000 (11:04 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 7 Jul 2009 18:04:51 +0000 (11:04 -0700)
R=r
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=31240
CL=31290

test/golden.out
test/interface/fake.go

index 9b4bf471723858fe3def84ff75d78009c8edab49..28083668a0c6a7fde7c16bec29daf374cd71c1b7 100644 (file)
@@ -74,13 +74,13 @@ abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz
 PASS
 
 =========== interface/fail.go
-cannot convert type *main.S to interface main.I: missing method Foo
+*main.S is not main.I: missing method Foo
 throw: interface conversion
 
 panic PC=xxx
 
 =========== interface/returntype.go
-cannot convert type *main.S to interface main.I2: missing method Name
+*main.S is not main.I2: missing method Name
 throw: interface conversion
 
 panic PC=xxx
index a52d7a5a118eb02e332dcd130cc521293e874eaf..687b3ff0cb90b27e829da695e3f5e2f19240dbca 100644 (file)
@@ -53,27 +53,27 @@ func main() {
 
        // check mem and string
        v := reflect.NewValue(x);
-       i := v.(reflect.StructValue).Field(0);
-       j := v.(reflect.StructValue).Field(1);
+       i := v.(*reflect.StructValue).Field(0);
+       j := v.(*reflect.StructValue).Field(1);
        assert(i.Interface() == j.Interface());
 
-       s := v.(reflect.StructValue).Field(2);
-       t := v.(reflect.StructValue).Field(3);
+       s := v.(*reflect.StructValue).Field(2);
+       t := v.(*reflect.StructValue).Field(3);
        assert(s.Interface() == t.Interface());
 
        // make sure different values are different.
        // make sure whole word is being compared,
        // not just a single byte.
-       i = v.(reflect.StructValue).Field(4);
-       j = v.(reflect.StructValue).Field(5);
+       i = v.(*reflect.StructValue).Field(4);
+       j = v.(*reflect.StructValue).Field(5);
        assert(i.Interface() != j.Interface());
 
-       i = v.(reflect.StructValue).Field(6);
-       j = v.(reflect.StructValue).Field(7);
+       i = v.(*reflect.StructValue).Field(6);
+       j = v.(*reflect.StructValue).Field(7);
        assert(i.Interface() != j.Interface());
 
-       i = v.(reflect.StructValue).Field(8);
-       j = v.(reflect.StructValue).Field(9);
+       i = v.(*reflect.StructValue).Field(8);
+       j = v.(*reflect.StructValue).Field(9);
        assert(i.Interface() == j.Interface());
 }