diff options
author | odersky <odersky@gmail.com> | 2017-04-12 09:08:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 09:08:10 +0200 |
commit | 741ee1645a13c94fbb7edfd064b4ec092a69b1bf (patch) | |
tree | 455ce71857af352371c555508fcdb598bb11ae30 /tests | |
parent | 4b33e362b438ee14abf52d1803db42383c9c4013 (diff) | |
parent | cc4045fb39d777785e315f3003959724ead13b88 (diff) | |
download | dotty-741ee1645a13c94fbb7edfd064b4ec092a69b1bf.tar.gz dotty-741ee1645a13c94fbb7edfd064b4ec092a69b1bf.tar.bz2 dotty-741ee1645a13c94fbb7edfd064b4ec092a69b1bf.zip |
Merge pull request #2229 from dotty-staging/sync-classfile-parser
Port some ClassfileParser changes from scalac
Diffstat (limited to 'tests')
-rw-r--r-- | tests/disabled/run/t5293.scala (renamed from tests/run/t5293.scala) | 0 | ||||
-rw-r--r-- | tests/run/t9915/C_1.java | 20 | ||||
-rw-r--r-- | tests/run/t9915/Test_2.scala | 12 |
3 files changed, 32 insertions, 0 deletions
diff --git a/tests/run/t5293.scala b/tests/disabled/run/t5293.scala index 8a99989c5..8a99989c5 100644 --- a/tests/run/t5293.scala +++ b/tests/disabled/run/t5293.scala diff --git a/tests/run/t9915/C_1.java b/tests/run/t9915/C_1.java new file mode 100644 index 000000000..4269cf74e --- /dev/null +++ b/tests/run/t9915/C_1.java @@ -0,0 +1,20 @@ +/* + * javac: -encoding UTF-8 + */ +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/tests/run/t9915/Test_2.scala b/tests/run/t9915/Test_2.scala new file mode 100644 index 000000000..afed667cc --- /dev/null +++ b/tests/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) +} |