diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala | 5 | ||||
-rw-r--r-- | test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala b/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala index 8bb003c8fb..f5f93fef5c 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala @@ -18,7 +18,8 @@ object IndyLambdaTest extends ClearAfterClass.Clearable { } } -class IndyLambdaTest { +class IndyLambdaTest extends ClearAfterClass { + ClearAfterClass.stateToClear = IndyLambdaTest val compiler = IndyLambdaTest.compiler @Test def boxingBridgeMethodUsedSelectively(): Unit = { @@ -35,7 +36,7 @@ class IndyLambdaTest { // This is because Scala's unboxing of null values gives zero, whereas Java's throw a NPE. // 1. Here we show that we are calling the boxing bridge (the lambda bodies here are compiled into - // methods of `(I)java/lang/Object;` / `(I)java/lang/Object;` respectively.) + // methods of `(I)Ljava/lang/Object;` / `(I)Ljava/lang/Object;` respectively.) assertEquals("(Ljava/lang/Object;)Ljava/lang/Object;", implMethodDescriptorFor("(x: Int) => new Object")) assertEquals("(Ljava/lang/Object;)Ljava/lang/Object;", implMethodDescriptorFor("(x: Object) => 0")) diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala index 57088bdd2f..5ccb940415 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala @@ -27,7 +27,9 @@ object InlineInfoTest extends ClearAfterClass.Clearable { } @RunWith(classOf[JUnit4]) -class InlineInfoTest { +class InlineInfoTest extends ClearAfterClass { + ClearAfterClass.stateToClear = InlineInfoTest + val compiler = InlineInfoTest.compiler def compile(code: String) = { |