]> Cypherpunks repositories - gostls13.git/commitdiff
test: match gccgo error messages
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Thu, 20 Jun 2013 06:21:14 +0000 (08:21 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Thu, 20 Jun 2013 06:21:14 +0000 (08:21 +0200)
R=iant, golang-dev
CC=golang-dev
https://golang.org/cl/10365052

test/fixedbugs/bug205.go
test/fixedbugs/bug459.go
test/fixedbugs/issue3783.go
test/fixedbugs/issue3925.go
test/fixedbugs/issue4097.go
test/fixedbugs/issue4458.go
test/fixedbugs/issue4545.go

index 769837d04ee4c894d4750fb7529ed355ee6b1c7c..1e0d9d1f34d62f554d4ab1c4413da85be2259af0 100644 (file)
@@ -11,8 +11,8 @@ var s string;
 var m map[string]int;
 
 func main() {
-       println(t["hi"]);       // ERROR "non-integer slice index"
-       println(s["hi"]);       // ERROR "non-integer string index"
-       println(m[0]);  // ERROR "as type string in map index"
+       println(t["hi"]); // ERROR "non-integer slice index|must be integer"
+       println(s["hi"]); // ERROR "non-integer string index|must be integer"
+       println(m[0]);    // ERROR "cannot use.*as type string"
 }
 
index 80abe5d51840a2091f63eae23ab306101874d902..014f2ef01f77caf3556886b727c24760bbc05fdc 100644 (file)
@@ -9,7 +9,7 @@
 
 package flag
 
-var commandLine = NewFlagSet() // ERROR "loop"
+var commandLine = NewFlagSet() // ERROR "loop|depends upon itself"
 
 type FlagSet struct {
 }
index 35df5d8f65140ed5735d610774e213ac4960487c..d7a4a2e8f3cc667ece3858887d36f2a1d6dc3f35 100644 (file)
@@ -8,5 +8,5 @@ package foo
 
 var i int
 
-func (*i) bar() // ERROR "not a type"
+func (*i) bar() // ERROR "not a type|expected type"
 
index 2f8786fc7847661eaa208c18c24c7f89ef517fb8..a62d4392e6ff66c7198d6d9cec4bca84d370c361 100644 (file)
@@ -12,12 +12,12 @@ package foo
 
 var _ = map[string]string{
        "1": "2",
-       "3", "4", // ERROR "missing key"
+       "3", "4", // ERROR "missing key|must have keys"
 }
 
 var _ = []string{
        "foo",
        "bar",
-       20, // ERROR "cannot use"
+       20, // ERROR "cannot use|incompatible type"
 }
 
index fa942c9db74acc972318d9138e60540a7c9b15cb..c2b7d9b4fbf5fbb1c67a5d20970ca6e00bd23edb 100644 (file)
@@ -7,5 +7,5 @@
 package foo
 
 var s [][10]int
-const m = len(s[len(s)-1]) // ERROR "is not a constant" 
+const m = len(s[len(s)-1]) // ERROR "is not a constant|is not constant
 
index 8ee3e879eab9f6493db922e3cb3b68e0764c5990..820f18cb8d7853baf283d055b5b614274465dc69 100644 (file)
@@ -16,5 +16,5 @@ func (T) foo() {}
 func main() {
        av := T{}
        pav := &av
-       (**T).foo(&pav) // ERROR "no method foo"
+       (**T).foo(&pav) // ERROR "no method foo|requires named type or pointer to named"
 }
index 3f2de16d200f1df049296e3b5fb9d7b9ddb1e1c6..501caadb0f816d1a4957cb0758571c1059d46ff7 100644 (file)
@@ -13,7 +13,7 @@ import "fmt"
 
 func main() {
        var s uint
-       fmt.Println(1.0 + 1<<s) // ERROR "invalid operation"
-       x := 1.0 + 1<<s         // ERROR "invalid operation"
+       fmt.Println(1.0 + 1<<s) // ERROR "invalid operation|non-integer type"
+       x := 1.0 + 1<<s         // ERROR "invalid operation|non-integer type"
        _ = x
 }