summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-06-16 10:15:56 -0700
committerSom Snytt <som.snytt@gmail.com>2016-06-16 16:33:31 -0700
commit0eac3cb85dd4720b015a0d060691f68b63032b85 (patch)
tree66e51e2f43ec4ab797049f8be744e6b8253db7fd /test/junit
parent14d3b9e7062662ae55cca02ad653a68aa6aef78d (diff)
downloadscala-0eac3cb85dd4720b015a0d060691f68b63032b85.tar.gz
scala-0eac3cb85dd4720b015a0d060691f68b63032b85.tar.bz2
scala-0eac3cb85dd4720b015a0d060691f68b63032b85.zip
Constant print control in unicode
Since octal escape is deprecated, use unicode escape for string representation of constants.
Diffstat (limited to 'test/junit')
-rw-r--r--test/junit/scala/reflect/internal/PrintersTest.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/junit/scala/reflect/internal/PrintersTest.scala b/test/junit/scala/reflect/internal/PrintersTest.scala
index 38fe205af7..d581ca8cf4 100644
--- a/test/junit/scala/reflect/internal/PrintersTest.scala
+++ b/test/junit/scala/reflect/internal/PrintersTest.scala
@@ -87,7 +87,11 @@ class BasePrintTest {
@Test def testConstantFormfeed = assertTreeCode(Literal(Constant("hello\fworld")))(s"${sq}hello\\fworld${sq}")
- @Test def testConstantControl = assertTreeCode(Literal(Constant("hello\u0003world")))(s"${sq}hello\\03world${sq}")
+ @Test def testConstantControl = assertTreeCode(Literal(Constant("hello\u0003world")))(s"${sq}hello\\u0003world${sq}")
+
+ @Test def testConstantFormfeedChar = assertTreeCode(Literal(Constant('\f')))("'\\f'")
+
+ @Test def testConstantControlChar = assertTreeCode(Literal(Constant(3.toChar)))("'\\u0003'")
@Test def testConstantEmbeddedTriple = assertTreeCode(Literal(Constant(s"${tq}hello${tq}\nworld")))(s"${tq}${teq}hello${teq}\nworld${tq}")