Add test for KT-31131

This commit is contained in:
Alexey Tsvetkov
2019-04-23 21:28:54 +03:00
committed by Alexander Udalov
parent bd87332b0c
commit 56d5846ef1
6 changed files with 60 additions and 0 deletions
@@ -2014,6 +2014,11 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement
runTest("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded/");
}
@TestMetadata("multifilePartsWithProperties")
public void testMultifilePartsWithProperties() throws Exception {
runTest("jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/");
}
@TestMetadata("optionalParameter")
public void testOptionalParameter() throws Exception {
runTest("jps-plugin/testData/incremental/withJava/other/optionalParameter/");
@@ -2322,6 +2327,19 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement
}
}
@TestMetadata("jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class MultifilePartsWithProperties extends AbstractIncrementalJvmCompilerRunnerTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInMultifilePartsWithProperties() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
}
}
@TestMetadata("jps-plugin/testData/incremental/withJava/other/optionalParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2192,6 +2192,11 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes
runTest("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded/");
}
@TestMetadata("multifilePartsWithProperties")
public void testMultifilePartsWithProperties() throws Exception {
runTest("jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties/");
}
@TestMetadata("optionalParameter")
public void testOptionalParameter() throws Exception {
runTest("jps-plugin/testData/incremental/withJava/other/optionalParameter/");
@@ -2500,6 +2505,19 @@ public class IncrementalJvmJpsTestGenerated extends AbstractIncrementalJvmJpsTes
}
}
@TestMetadata("jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class MultifilePartsWithProperties extends AbstractIncrementalJvmJpsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInMultifilePartsWithProperties() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifilePartsWithProperties"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
}
}
@TestMetadata("jps-plugin/testData/incremental/withJava/other/optionalParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -0,0 +1,12 @@
================ Step #1 =================
Cleaning output files:
out/production/module/META-INF/module.kotlin_module
out/production/module/Utils.class
out/production/module/Utils__PartBKt.class
End of files
Compiling files:
src/partB.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1,4 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
val aVal: Int get() = 0
@@ -0,0 +1,4 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
val bVal: Int get() = 0
@@ -0,0 +1,4 @@
@file:JvmName("Utils")
@file:JvmMultifileClass
val bVal: Int get() = 1