mirror of
https://github.com/golang/go
synced 2024-11-26 07:47: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:
parent
9bd1f49e37
commit
bdafe73ce4
@ -164,7 +164,7 @@ func testExpr(b *bufio.Writer, expr string) {
|
|||||||
if pass == 0 {
|
if pass == 0 {
|
||||||
fmt.Fprintf(b, "\ttest(func(){use(%s)}, %q)\n", expr, expr)
|
fmt.Fprintf(b, "\ttest(func(){use(%s)}, %q)\n", expr, expr)
|
||||||
} else {
|
} 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user