1
0
mirror of https://github.com/golang/go synced 2024-11-26 08:07:57 -07:00

test: recognize gccgo error message in index.go

When a floating point constant is used as an array/slice
index, gccgo prints "error: index must be integer"; gc prints
"constant 2.1 truncated to integer".

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/14044044
This commit is contained in:
Ian Lance Taylor 2013-09-27 20:38:52 -07:00
parent 9bd1f49e37
commit bdafe73ce4

View File

@ -164,7 +164,7 @@ func testExpr(b *bufio.Writer, expr string) {
if pass == 0 {
fmt.Fprintf(b, "\ttest(func(){use(%s)}, %q)\n", expr, expr)
} else {
fmt.Fprintf(b, "\tuse(%s) // ERROR \"index|overflow|truncated\"\n", expr)
fmt.Fprintf(b, "\tuse(%s) // ERROR \"index|overflow|truncated|must be integer\"\n", expr)
}
}