summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
Diffstat (limited to 'test/junit')
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala
index 5ee52ff78f..ec063c6cb3 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala
@@ -161,7 +161,7 @@ class MethodLevelOptsTest extends ClearAfterClass {
| val b = (a, y) // Tuple2
| val c = (new Object, "krik", new String) // unused java/lang/Object, java/lang/String allocation and string constant is also eliminated
| val d = new java.lang.Integer(x)
- | val e = new String(new Array[Char](23))
+ | val e = new String(new Array[Char](23)) // array allocation not eliminated, as it may throw (negative size, SI-8601)
| val f = new scala.runtime.IntRef(11)
| x + y
| }
@@ -169,7 +169,7 @@ class MethodLevelOptsTest extends ClearAfterClass {
""".stripMargin
val List(c) = compileClasses(methodOptCompiler)(code)
assertEquals(getSingleMethod(c, "t").instructions.dropNonOp,
- List(VarOp(ILOAD, 1), VarOp(ILOAD, 2), Op(IADD), Op(IRETURN)))
+ List(IntOp(BIPUSH, 23), IntOp(NEWARRAY, 5), Op(POP), VarOp(ILOAD, 1), VarOp(ILOAD, 2), Op(IADD), Op(IRETURN)))
}
@Test