]> Cypherpunks.ru repositories - gostls13.git/commitdiff
Adjust expected errors to work with gccgo.
authorIan Lance Taylor <iant@golang.org>
Sun, 31 May 2009 18:18:52 +0000 (11:18 -0700)
committerIan Lance Taylor <iant@golang.org>
Sun, 31 May 2009 18:18:52 +0000 (11:18 -0700)
The change to assign.go is because the gcc testsuite fails to
handle .* in a normal way: it matches against the entire
compiler output, not just a single line.

assign.go:15:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:19:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:23:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')
assign.go:27:6: error: incompatible types in assignment (implicit assignment of 'sync.Mutex' hidden field 'key')

chan/perm.go:14:5: error: incompatible types in assignment
chan/perm.go:15:5: error: incompatible types in assignment
chan/perm.go:16:6: error: incompatible types in assignment
chan/perm.go:17:6: error: incompatible types in assignment
chan/perm.go:24:7: error: invalid send on receive-only channel
chan/perm.go:25:12: error: invalid send on receive-only channel
chan/perm.go:31:4: error: invalid receive on send-only channel
chan/perm.go:32:9: error: invalid receive on send-only channel
chan/perm.go:38:2: error: invalid send on receive-only channel
chan/perm.go:42:2: error: invalid receive on send-only channel

initializerr.go:14:17: error: reference to undefined variable 'X'
initializerr.go:14:19: error: mixture of field and value initializers
initializerr.go:15:26: error: duplicate value for field 'Y'
initializerr.go:16:10: error: too many values in struct composite literal
initializerr.go:18:19: error: index expression is not integer constant
initializerr.go:17:11: error: too many elements in composite literal

R=rsc
DELTA=12  (0 added, 0 deleted, 12 changed)
OCL=29657
CL=29665

test/assign.go
test/chan/perm.go
test/golden.out
test/initializerr.go

index a98b7b75a0726c52744401f356740ac16d176498..9fe9ea0791568102a494b669361005d94feb8346 100644 (file)
@@ -16,18 +16,18 @@ type T struct {
 func main() {
        {
                var x, y sync.Mutex;
-               x = y;  // ERROR "assignment.*Mutex"
+               x = y;  // ERROR "assignment\[ -~\]*Mutex"
        }
        {
                var x, y T;
-               x = y;  // ERROR "assignment.*Mutex"
+               x = y;  // ERROR "assignment\[ -~\]*Mutex"
        }
        {
                var x, y [2]sync.Mutex;
-               x = y;  // ERROR "assignment.*Mutex"
+               x = y;  // ERROR "assignment\[ -~\]*Mutex"
        }
        {
                var x, y [2]T;
-               x = y;  // ERROR "assignment.*Mutex"
+               x = y;  // ERROR "assignment\[ -~\]*Mutex"
        }
 }
index 31ab840085ad1ef636c4be20845dd1ae8ec82063..cdbef6246c92637d80f21ebe2a7378eb2c48d80e 100644 (file)
@@ -15,10 +15,10 @@ var (
 func main() {
        cr = c;         // ok
        cs = c;         // ok
-       c = cr;         // ERROR "illegal types"
-       c = cs;         // ERROR "illegal types"
-       cr = cs;        // ERROR "illegal types"
-       cs = cr;        // ERROR "illegal types"
+       c = cr;         // ERROR "illegal types|incompatible"
+       c = cs;         // ERROR "illegal types|incompatible"
+       cr = cs;        // ERROR "illegal types|incompatible"
+       cs = cr;        // ERROR "illegal types|incompatible"
 
        c <- 0;         // ok
        ok := c <- 0;   // ok
index b5dbddffe62148ed9bdc8144bd8d87d63cbc7e5f..131fc895b91021e2683bf5cbaceb49e8285abdc8 100644 (file)
@@ -27,7 +27,7 @@ panic PC=xxx
 hello, world
 
 =========== ./initializerr.go
-BUG: errchk: ./initializerr.go:17: missing expected error: 'index'
+BUG: errchk: ./initializerr.go:17: missing expected error: 'index|too many'
 
 =========== ./peano.go
 0! = 1
index 2700ba097b5e54a86f069db07dd3d8e3c0f036e8..b0366dddec69c88c3a7add6763e541f0f34966ea 100644 (file)
@@ -15,10 +15,10 @@ type T struct {
 }
 
 var x = 1
-var a1 = S { 0, X: 1 };        // ERROR "mixture"
+var a1 = S { 0, X: 1 };        // ERROR "mixture|undefined"
 var a2 = S { Y: 3, Z: 2, Y: 3 }; // ERROR "duplicate"
-var a3 = T { 1, 2, 3, 4, 5, 6 };       // ERROR "convert"
-var a4 = [5]byte{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }      // ERROR "index"
+var a3 = T { 1, 2, 3, 4, 5, 6 };       // ERROR "convert|too many"
+var a4 = [5]byte{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }      // ERROR "index|too many"
 var a5 = []byte { x: 2 }       // ERROR "index"
 
 var ok1 = S { }        // should be ok