JVM_IR KT-45697 reference classes from sources before IR generation

This commit is contained in:
Dmitry Petrov
2021-03-30 17:46:21 +03:00
committed by TeamCityServer
parent 7d211d0d9a
commit 9bf7f3af04
20 changed files with 737 additions and 2 deletions
@@ -25623,6 +25623,59 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
}
}
@TestMetadata("compiler/testData/codegen/box/sameFileInSourceAndDependencies")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SameFileInSourceAndDependencies extends AbstractIrJsCodegenBoxES6Test {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
}
public void testAllFilesPresentInSameFileInSourceAndDependencies() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sameFileInSourceAndDependencies"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@TestMetadata("classDeclaration.kt")
public void testClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/classDeclaration.kt");
}
@TestMetadata("functionDeclaration.kt")
public void testFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/functionDeclaration.kt");
}
@TestMetadata("lateinitMemberPropertyDeclaration.kt")
public void testLateinitMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/lateinitMemberPropertyDeclaration.kt");
}
@TestMetadata("memberFunctionDeclaration.kt")
public void testMemberFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionDeclaration.kt");
}
@TestMetadata("memberFunctionWithDefaultArgumentsDeclaration.kt")
public void testMemberFunctionWithDefaultArgumentsDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionWithDefaultArgumentsDeclaration.kt");
}
@TestMetadata("memberPropertyDeclaration.kt")
public void testMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberPropertyDeclaration.kt");
}
@TestMetadata("nestedClassDeclaration.kt")
public void testNestedClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/nestedClassDeclaration.kt");
}
@TestMetadata("propertyDeclaration.kt")
public void testPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/propertyDeclaration.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/sealed")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -25044,6 +25044,59 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/sameFileInSourceAndDependencies")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SameFileInSourceAndDependencies extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInSameFileInSourceAndDependencies() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sameFileInSourceAndDependencies"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("classDeclaration.kt")
public void testClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/classDeclaration.kt");
}
@TestMetadata("functionDeclaration.kt")
public void testFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/functionDeclaration.kt");
}
@TestMetadata("lateinitMemberPropertyDeclaration.kt")
public void testLateinitMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/lateinitMemberPropertyDeclaration.kt");
}
@TestMetadata("memberFunctionDeclaration.kt")
public void testMemberFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionDeclaration.kt");
}
@TestMetadata("memberFunctionWithDefaultArgumentsDeclaration.kt")
public void testMemberFunctionWithDefaultArgumentsDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionWithDefaultArgumentsDeclaration.kt");
}
@TestMetadata("memberPropertyDeclaration.kt")
public void testMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberPropertyDeclaration.kt");
}
@TestMetadata("nestedClassDeclaration.kt")
public void testNestedClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/nestedClassDeclaration.kt");
}
@TestMetadata("propertyDeclaration.kt")
public void testPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/propertyDeclaration.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/sealed")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -25004,6 +25004,59 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@TestMetadata("compiler/testData/codegen/box/sameFileInSourceAndDependencies")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SameFileInSourceAndDependencies extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInSameFileInSourceAndDependencies() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sameFileInSourceAndDependencies"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("classDeclaration.kt")
public void testClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/classDeclaration.kt");
}
@TestMetadata("functionDeclaration.kt")
public void testFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/functionDeclaration.kt");
}
@TestMetadata("lateinitMemberPropertyDeclaration.kt")
public void testLateinitMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/lateinitMemberPropertyDeclaration.kt");
}
@TestMetadata("memberFunctionDeclaration.kt")
public void testMemberFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionDeclaration.kt");
}
@TestMetadata("memberFunctionWithDefaultArgumentsDeclaration.kt")
public void testMemberFunctionWithDefaultArgumentsDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionWithDefaultArgumentsDeclaration.kt");
}
@TestMetadata("memberPropertyDeclaration.kt")
public void testMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberPropertyDeclaration.kt");
}
@TestMetadata("nestedClassDeclaration.kt")
public void testNestedClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/nestedClassDeclaration.kt");
}
@TestMetadata("propertyDeclaration.kt")
public void testPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/propertyDeclaration.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/sealed")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -13586,6 +13586,59 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/sameFileInSourceAndDependencies")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class SameFileInSourceAndDependencies extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInSameFileInSourceAndDependencies() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/sameFileInSourceAndDependencies"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("classDeclaration.kt")
public void testClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/classDeclaration.kt");
}
@TestMetadata("functionDeclaration.kt")
public void testFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/functionDeclaration.kt");
}
@TestMetadata("lateinitMemberPropertyDeclaration.kt")
public void testLateinitMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/lateinitMemberPropertyDeclaration.kt");
}
@TestMetadata("memberFunctionDeclaration.kt")
public void testMemberFunctionDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionDeclaration.kt");
}
@TestMetadata("memberFunctionWithDefaultArgumentsDeclaration.kt")
public void testMemberFunctionWithDefaultArgumentsDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberFunctionWithDefaultArgumentsDeclaration.kt");
}
@TestMetadata("memberPropertyDeclaration.kt")
public void testMemberPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/memberPropertyDeclaration.kt");
}
@TestMetadata("nestedClassDeclaration.kt")
public void testNestedClassDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/nestedClassDeclaration.kt");
}
@TestMetadata("propertyDeclaration.kt")
public void testPropertyDeclaration() throws Exception {
runTest("compiler/testData/codegen/box/sameFileInSourceAndDependencies/propertyDeclaration.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/sealed")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)