From 65f438e56b88843fd91287ca60b2e5bdd3af9cb7 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Tue, 11 Apr 2017 19:16:44 +0200 Subject: SI-9915 Utf8_info are modified UTF8 Adapted from scalac commit 3c5990ce5839f4bdfca8fed7f2c415a72f6a8bd8 by Som Snytt: Use DataInputStream.readUTF to read CONSTANT_Utf8_info. This fixes reading embedded null char and supplementary chars. --- tests/run/t9915/Test_2.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/run/t9915/Test_2.scala (limited to 'tests/run/t9915/Test_2.scala') 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) +} -- cgit v1.2.3