[IC] Add test for potential sam change in kotlin-java interop

JPS tests were fixed on IJ side during implementation of JPS on graph

Relates to KT-21534
This commit is contained in:
Aleksei.Cherepanov
2023-12-12 15:45:32 +01:00
committed by Space Team
parent 49ae1b8d01
commit 5150812838
13 changed files with 186 additions and 1 deletions
@@ -1398,6 +1398,11 @@ public class IncrementalK1JvmCompilerRunnerTestGenerated extends AbstractIncreme
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/");
}
@TestMetadata("potentialSamAdapter")
public void testPotentialSamAdapter() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter/");
}
@TestMetadata("rawErrorTypeDuringSerialization")
public void testRawErrorTypeDuringSerialization() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/");
@@ -1668,6 +1673,19 @@ public class IncrementalK1JvmCompilerRunnerTestGenerated extends AbstractIncreme
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PotentialSamAdapter extends AbstractIncrementalK1JvmCompilerRunnerTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInPotentialSamAdapter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("((^javaToKotlin)|(^javaToKotlinAndBack)|(^kotlinToJava)|(^packageFileAdded)|(^changeNotUsedSignature))"), TargetBackend.JVM_IR, true);
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1398,6 +1398,11 @@ public class IncrementalK2FirICJvmCompilerRunnerTestGenerated extends AbstractIn
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/");
}
@TestMetadata("potentialSamAdapter")
public void testPotentialSamAdapter() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter/");
}
@TestMetadata("rawErrorTypeDuringSerialization")
public void testRawErrorTypeDuringSerialization() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/");
@@ -1668,6 +1673,19 @@ public class IncrementalK2FirICJvmCompilerRunnerTestGenerated extends AbstractIn
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PotentialSamAdapter extends AbstractIncrementalK2FirICJvmCompilerRunnerTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInPotentialSamAdapter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter"), Pattern.compile("^([^\\.]+)$"), Pattern.compile("(^classToPackageFacade)"), TargetBackend.JVM_IR, true);
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1398,6 +1398,11 @@ public class IncrementalK2JvmCompilerRunnerTestGenerated extends AbstractIncreme
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/");
}
@TestMetadata("potentialSamAdapter")
public void testPotentialSamAdapter() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter/");
}
@TestMetadata("rawErrorTypeDuringSerialization")
public void testRawErrorTypeDuringSerialization() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/");
@@ -1668,6 +1673,19 @@ public class IncrementalK2JvmCompilerRunnerTestGenerated extends AbstractIncreme
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PotentialSamAdapter extends AbstractIncrementalK2JvmCompilerRunnerTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInPotentialSamAdapter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1398,6 +1398,11 @@ public class IncrementalK2PsiJvmCompilerRunnerTestGenerated extends AbstractIncr
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/");
}
@TestMetadata("potentialSamAdapter")
public void testPotentialSamAdapter() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter/");
}
@TestMetadata("rawErrorTypeDuringSerialization")
public void testRawErrorTypeDuringSerialization() throws Exception {
runTest("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization/");
@@ -1668,6 +1673,19 @@ public class IncrementalK2PsiJvmCompilerRunnerTestGenerated extends AbstractIncr
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PotentialSamAdapter extends AbstractIncrementalK2PsiJvmCompilerRunnerTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInPotentialSamAdapter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, true);
}
}
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/rawErrorTypeDuringSerialization")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)