[IR] Align captured receiver variable naming with old BE

This commit is contained in:
Kristoffer Andersen
2020-11-02 16:10:16 +01:00
committed by max-kammerer
parent 7732fc38e0
commit 5967e8295e
21 changed files with 176 additions and 46 deletions
@@ -67,6 +67,12 @@ public class IrLocalVariableTestGenerated extends AbstractIrLocalVariableTest {
runTest("compiler/testData/debug/localVariables/jvmOverloads.kt");
}
@Test
@TestMetadata("lambdaWithExtensionReceiver.kt")
public void testLambdaWithExtensionReceiver() throws Exception {
runTest("compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt");
}
@Test
@TestMetadata("localFun.kt")
public void testLocalFun() throws Exception {
@@ -85,6 +91,26 @@ public class IrLocalVariableTestGenerated extends AbstractIrLocalVariableTest {
runTest("compiler/testData/debug/localVariables/underscoreNames.kt");
}
@TestMetadata("compiler/testData/debug/localVariables/receiverMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(BlockJUnit4ClassRunner.class)
public static class ReceiverMangling extends AbstractIrLocalVariableTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
@Test
public void testAllFilesPresentInReceiverMangling() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/receiverMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/debug/localVariables/receiverMangling/simple.kt");
}
}
@TestMetadata("compiler/testData/debug/localVariables/suspend")
@TestDataPath("$PROJECT_ROOT")
@RunWith(BlockJUnit4ClassRunner.class)
@@ -67,6 +67,12 @@ public class LocalVariableTestGenerated extends AbstractLocalVariableTest {
runTest("compiler/testData/debug/localVariables/jvmOverloads.kt");
}
@Test
@TestMetadata("lambdaWithExtensionReceiver.kt")
public void testLambdaWithExtensionReceiver() throws Exception {
runTest("compiler/testData/debug/localVariables/lambdaWithExtensionReceiver.kt");
}
@Test
@TestMetadata("localFun.kt")
public void testLocalFun() throws Exception {
@@ -85,6 +91,26 @@ public class LocalVariableTestGenerated extends AbstractLocalVariableTest {
runTest("compiler/testData/debug/localVariables/underscoreNames.kt");
}
@TestMetadata("compiler/testData/debug/localVariables/receiverMangling")
@TestDataPath("$PROJECT_ROOT")
@RunWith(BlockJUnit4ClassRunner.class)
public static class ReceiverMangling extends AbstractLocalVariableTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@Test
public void testAllFilesPresentInReceiverMangling() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables/receiverMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/debug/localVariables/receiverMangling/simple.kt");
}
}
@TestMetadata("compiler/testData/debug/localVariables/suspend")
@TestDataPath("$PROJECT_ROOT")
@RunWith(BlockJUnit4ClassRunner.class)