diff options
author | Seth Tisue <seth@tisue.net> | 2016-11-14 07:49:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 07:49:24 -0800 |
commit | dde2cff7ddc19307f4ab9830a9d70d4d6651311b (patch) | |
tree | d6a9cde651d865e7607781f1bcbe031d292d4500 /test/files | |
parent | 71972e7c3fb719885bbff71c808d3ca4fe2019a1 (diff) | |
parent | 3c5990ce5839f4bdfca8fed7f2c415a72f6a8bd8 (diff) | |
download | scala-dde2cff7ddc19307f4ab9830a9d70d4d6651311b.tar.gz scala-dde2cff7ddc19307f4ab9830a9d70d4d6651311b.tar.bz2 scala-dde2cff7ddc19307f4ab9830a9d70d4d6651311b.zip |
Merge pull request #5384 from som-snytt/issue/9915
SI-9915 Utf8_info are modified UTF8
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t9915/C_1.java | 18 | ||||
-rw-r--r-- | test/files/run/t9915/Test_2.scala | 12 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/files/run/t9915/C_1.java b/test/files/run/t9915/C_1.java new file mode 100644 index 0000000000..cbd52606be --- /dev/null +++ b/test/files/run/t9915/C_1.java @@ -0,0 +1,18 @@ + +public class C_1 { + public static final String NULLED = "X\000ABC"; + public static final String SUPPED = "𐒈𐒝𐒑𐒛𐒐𐒘𐒕𐒖"; + + public String nulled() { + return C_1.NULLED; + } + public String supped() { + return C_1.SUPPED; + } + public int nulledSize() { + return C_1.NULLED.length(); + } + public int suppedSize() { + return C_1.SUPPED.length(); + } +} diff --git a/test/files/run/t9915/Test_2.scala b/test/files/run/t9915/Test_2.scala new file mode 100644 index 0000000000..afed667cc6 --- /dev/null +++ b/test/files/run/t9915/Test_2.scala @@ -0,0 +1,12 @@ + +object Test extends App { + val c = new C_1 + assert(c.nulled == "X\u0000ABC") // "X\000ABC" + assert(c.supped == "𐒈𐒝𐒑𐒛𐒐𐒘𐒕𐒖") + + assert(C_1.NULLED == "X\u0000ABC") // "X\000ABC" + assert(C_1.SUPPED == "𐒈𐒝𐒑𐒛𐒐𐒘𐒕𐒖") + + assert(C_1.NULLED.size == "XYABC".size) + assert(C_1.SUPPED.codePointCount(0, C_1.SUPPED.length) == 8) +} |