Support property accessor in compatibility mode

This commit is contained in:
Mikhael Bogdanov
2018-05-28 20:47:12 +02:00
parent 7f4bd549aa
commit 60f2dbeb8a
5 changed files with 94 additions and 1 deletions
@@ -518,6 +518,11 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg
runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/inheritedJvmDefault.kt");
}
@TestMetadata("propertyAnnotation.kt")
public void testPropertyAnnotation() throws Exception {
runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/propertyAnnotation.kt");
}
@TestMetadata("simpleFunction.kt")
public void testSimpleFunction() throws Exception {
runTest("compiler/testData/codegen/java8/box/jvm8/defaults/compatibility/simpleFunction.kt");
@@ -60,5 +60,33 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest {
public void testDefaultProperty() throws Exception {
runTest("compiler/testData/codegen/java8/writeFlags/defaults/defaultProperty.kt");
}
@TestMetadata("propertyAnnotation.kt")
public void testPropertyAnnotation() throws Exception {
runTest("compiler/testData/codegen/java8/writeFlags/defaults/propertyAnnotation.kt");
}
@TestMetadata("compiler/testData/codegen/java8/writeFlags/defaults/compatibility")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Compatibility extends AbstractWriteFlagsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInCompatibility() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/writeFlags/defaults/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("propertyAccessors.kt")
public void testPropertyAccessors() throws Exception {
runTest("compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAccessors.kt");
}
@TestMetadata("propertyAnnotation.kt")
public void testPropertyAnnotation() throws Exception {
runTest("compiler/testData/codegen/java8/writeFlags/defaults/compatibility/propertyAnnotation.kt");
}
}
}
}