Support mixed compilation of new default with non-default or @JvmDefault

This commit is contained in:
Mikhael Bogdanov
2020-02-06 09:43:47 +01:00
committed by Mikhail Bogdanov
parent a3f930d2e4
commit e45a892499
8 changed files with 142 additions and 6 deletions
@@ -459,6 +459,29 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt");
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Interop extends AbstractCompileKotlinAgainstKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInInterop() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("newAndOldSchemes.kt")
public void testNewAndOldSchemes() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt");
}
@TestMetadata("newSchemeWithJvmDefault.kt")
public void testNewSchemeWithJvmDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt");
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6")
@@ -454,6 +454,29 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/allCompatibility/superPropAccessFromInterface2.kt");
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Interop extends AbstractIrCompileKotlinAgainstKotlinTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInInterop() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("newAndOldSchemes.kt")
public void testNewAndOldSchemes() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newAndOldSchemes.kt");
}
@TestMetadata("newSchemeWithJvmDefault.kt")
public void testNewSchemeWithJvmDefault() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/jvm8/defaults/interop/newSchemeWithJvmDefault.kt");
}
}
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8/jvm8against6")