]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: recognize gccgo error message in index.go
authorIan Lance Taylor <iant@golang.org>
Sat, 28 Sep 2013 03:38:52 +0000 (20:38 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 28 Sep 2013 03:38:52 +0000 (20:38 -0700)
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

test/index.go

index f9360c10285390f7d627308fb65f29e9d005e2ad..a8c471bb3bf647ee49203232894dc3f8c079ef2d 100644 (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)
        }
 }