From: Ian Lance Taylor Date: Fri, 13 Dec 2013 01:17:02 +0000 (-0800) Subject: test: add []rune case to string_lit.go X-Git-Tag: go1.3beta1~1248 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=936665f6414f0fa0e416f734bbe46571f1fc65ac;p=gostls13.git test: add []rune case to string_lit.go Gccgo managed to get this case wrong. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/41490044 --- diff --git a/test/string_lit.go b/test/string_lit.go index fea6f553d1..4751b82ccf 100644 --- a/test/string_lit.go +++ b/test/string_lit.go @@ -125,6 +125,11 @@ func main() { s = string(-1) assert(s, "\xef\xbf\xbd", "negative rune") + // the large rune tests yet again, with a slice. + rs := []rune{0x10ffff, 0x10ffff + 1, 0xD800, 0xDFFF, -1} + s = string(rs) + assert(s, "\xf4\x8f\xbf\xbf\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd", "large rune slice") + assert(string(gr1), gx1, "global ->[]rune") assert(string(gr2), gx2fix, "global invalid ->[]rune") assert(string(gb1), gx1, "->[]byte")