]> Cypherpunks repositories - gostls13.git/commitdiff
test: Match gccgo error messages.
authorIan Lance Taylor <iant@golang.org>
Fri, 10 Sep 2010 19:44:37 +0000 (12:44 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 10 Sep 2010 19:44:37 +0000 (12:44 -0700)
undef.go:12:6: error: reference to undefined name ‘x’
undef.go:13:6: error: reference to undefined name ‘x’
undef.go:14:6: error: reference to undefined name ‘x’
undef.go:22:25: error: reference to undefined name ‘y’
undef.go:42:11: error: reference to undefined name ‘v’

R=rsc
CC=golang-dev
https://golang.org/cl/2152045

test/undef.go

index 70785675abb222012c4a271fc3087350671259fa..7ef07882aa298bcf152ad1b5c1a14879d143d59d 100644 (file)
@@ -9,9 +9,9 @@
 package main
 
 var (
-       _ = x   // ERROR "undefinedx"
-       _ = x   // ERROR "undefinedx"
-       _ = x   // ERROR "undefinedx"
+       _ = x   // ERROR "undefined.*x"
+       _ = x   // ERROR "undefined.*x"
+       _ = x   // ERROR "undefined.*x"
 )
 
 type T struct {
@@ -19,7 +19,7 @@ type T struct {
 }
 
 func foo() *T { return &T{y: 99} }
-func bar() int { return y }    // ERROR "undefinedy"
+func bar() int { return y }    // ERROR "undefined.*y"
 
 type T1 struct {
        y1 int
@@ -39,6 +39,6 @@ func f1(val interface{}) {
 func f2(val interface{}) {
        switch val.(type) {
        default:
-               println(v)      // ERROR "undefinedv"
+               println(v)      // ERROR "undefined.*v"
        }
 }