Add test
#KT-44835 In Progress
This commit is contained in:
committed by
Space Team
parent
3ec4f2e0ee
commit
b27aef2c61
@@ -35,6 +35,7 @@ fun main(args: Array<String>) {
|
||||
model("incremental/inlineFunCallSite", extension = null, excludeParentDirs = true, targetBackend = targetBackend)
|
||||
model("incremental/withJava", extension = null, excludeParentDirs = true, targetBackend = targetBackend)
|
||||
model("incremental/incrementalJvmCompilerOnly", extension = null, excludeParentDirs = true, targetBackend = targetBackend)
|
||||
model("incremental/multiModule/withJavaUsedInKotlin", extension = null, excludeParentDirs = true, targetBackend = targetBackend)
|
||||
}
|
||||
|
||||
// IR
|
||||
|
||||
+31
@@ -2737,4 +2737,35 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class WithJavaUsedInKotlin extends AbstractIncrementalK2FirICLightTreeJvmJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInWithJavaUsedInKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("importedClassRemoved")
|
||||
public void testImportedClassRemoved() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ImportedClassRemoved extends AbstractIncrementalK2FirICLightTreeJvmJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInImportedClassRemoved() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+31
@@ -2737,4 +2737,35 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class WithJavaUsedInKotlin extends AbstractIncrementalK2JvmJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInWithJavaUsedInKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("importedClassRemoved")
|
||||
public void testImportedClassRemoved() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ImportedClassRemoved extends AbstractIncrementalK2JvmJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInImportedClassRemoved() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -2737,4 +2737,35 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class WithJavaUsedInKotlin extends AbstractIncrementalK2LightTreeJvmJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInWithJavaUsedInKotlin() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("importedClassRemoved")
|
||||
public void testImportedClassRemoved() throws Exception {
|
||||
runTest("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved/");
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ImportedClassRemoved extends AbstractIncrementalK2LightTreeJvmJpsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInImportedClassRemoved() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/multiModule/withJavaUsedInKotlin/importedClassRemoved"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
baseModule
|
||||
dependentModule
|
||||
|
||||
dependentModule->baseModule
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package packageInBase;
|
||||
public class JavaClass {
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package packageInBase
|
||||
|
||||
fun dummy() {}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/baseModule/packageInBase/JavaClass.class
|
||||
End of files
|
||||
Building baseModule
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Building dependentModule
|
||||
Cleaning output files:
|
||||
out/production/dependentModule/META-INF/dependentModule.kotlin_module
|
||||
out/production/dependentModule/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
dependentModule/src/Usage.kt
|
||||
End of files
|
||||
Exit code: ABORT
|
||||
------------------------------------------
|
||||
COMPILATION FAILED
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import packageInBase.JavaClass
|
||||
|
||||
class Usage {}
|
||||
Reference in New Issue
Block a user