Make sure lateinit top-level properties work in JVM BE

This commit is contained in:
Dmitry Petrov
2017-06-01 15:21:39 +03:00
parent d951e957ea
commit 01cce59c35
9 changed files with 262 additions and 0 deletions
@@ -13419,6 +13419,45 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TopLevel extends AbstractBlackBoxCodegenTest {
@TestMetadata("accessorException.kt")
public void testAccessorException() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt");
doTest(fileName);
}
@TestMetadata("accessorForTopLevelLateinit.kt")
public void testAccessorForTopLevelLateinit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt");
doTest(fileName);
}
public void testAllFilesPresentInTopLevel() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/topLevel"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("topLevelLateinit.kt")
public void testTopLevelLateinit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt");
doTest(fileName);
}
@TestMetadata("uninitializedMemberAccess.kt")
public void testUninitializedMemberAccess() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt");
doTest(fileName);
}
@TestMetadata("uninitializedRead.kt")
public void testUninitializedRead() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt");
doTest(fileName);
}
}
}
}