Commit 004dd3d7 authored by Rémy Oudompheng's avatar Rémy Oudompheng

test: match gccgo error messages

R=iant, golang-dev
CC=golang-dev
https://golang.org/cl/10365052
parent 2f70ac19
......@@ -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"
}
......@@ -9,7 +9,7 @@
package flag
var commandLine = NewFlagSet() // ERROR "loop"
var commandLine = NewFlagSet() // ERROR "loop|depends upon itself"
type FlagSet struct {
}
......
......@@ -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"
......@@ -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"
}
......@@ -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"
......@@ -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"
}
......@@ -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
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment