diff options
| author | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
|---|---|---|
| committer | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
| commit | 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch) | |
| tree | 4449f2036cccf162e8417cc5841a35815b3e7ac5 /test/string_lit.go | |
| parent | c8bf49ef8a92e2337b69c14b9b88396efe498600 (diff) | |
| download | golang-8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1.tar.gz | |
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'test/string_lit.go')
| -rw-r--r-- | test/string_lit.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/string_lit.go b/test/string_lit.go index fea6f553d..4751b82cc 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") |
