aboutsummaryrefslogtreecommitdiff
path: root/test/index.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2013-09-27 20:38:52 -0700
committerIan Lance Taylor <iant@golang.org>2013-09-27 20:38:52 -0700
commitbdafe73ce4f4910efd71eb5fdd7a5fc4614a9afe (patch)
tree7de871b6d712ec65f95c5845de43aee96f20fea2 /test/index.go
parent9bd1f49e377d86c935d13d0bd0a8e8c3d986c18c (diff)
downloadgo-bdafe73ce4f4910efd71eb5fdd7a5fc4614a9afe.tar.gz
go-bdafe73ce4f4910efd71eb5fdd7a5fc4614a9afe.zip
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
Diffstat (limited to 'test/index.go')
-rw-r--r--test/index.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/index.go b/test/index.go
index f9360c1028..a8c471bb3b 100644
--- a/test/index.go
+++ b/test/index.go
@@ -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)
}
}