[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:
committed by
Space Team
parent
49ae1b8d01
commit
5150812838
+18
@@ -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)
|
||||
|
||||
+18
@@ -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)
|
||||
|
||||
+18
@@ -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)
|
||||
|
||||
+18
@@ -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)
|
||||
|
||||
Generated
+18
@@ -1586,6 +1586,11 @@ public class IncrementalK1JvmJpsTestGenerated extends AbstractIncrementalK1JvmJp
|
||||
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/");
|
||||
@@ -1856,6 +1861,19 @@ public class IncrementalK1JvmJpsTestGenerated extends AbstractIncrementalK1JvmJp
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class PotentialSamAdapter extends AbstractIncrementalK1JvmJpsTest {
|
||||
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)
|
||||
|
||||
+18
@@ -1408,6 +1408,11 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated 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/");
|
||||
@@ -1678,6 +1683,19 @@ public class IncrementalK2FirICLightTreeJvmJpsTestGenerated extends AbstractIncr
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class PotentialSamAdapter extends AbstractIncrementalK2FirICLightTreeJvmJpsTest {
|
||||
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)
|
||||
|
||||
Generated
+18
@@ -1408,6 +1408,11 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp
|
||||
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/");
|
||||
@@ -1678,6 +1683,19 @@ public class IncrementalK2JvmJpsTestGenerated extends AbstractIncrementalK2JvmJp
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class PotentialSamAdapter extends AbstractIncrementalK2JvmJpsTest {
|
||||
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)
|
||||
|
||||
+18
@@ -1408,6 +1408,11 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement
|
||||
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/");
|
||||
@@ -1678,6 +1683,19 @@ public class IncrementalK2LightTreeJvmJpsTestGenerated extends AbstractIncrement
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class PotentialSamAdapter extends AbstractIncrementalK2LightTreeJvmJpsTest {
|
||||
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)
|
||||
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
public class JavaClass {
|
||||
public void foo(Integer param) {
|
||||
System.out.println("member");
|
||||
}
|
||||
}
|
||||
jps/jps-plugin/testData/incremental/withJava/javaUsedInKotlin/potentialSamAdapter/JavaClass.java.new
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
public class JavaClass {
|
||||
public void foo(String param) {
|
||||
System.out.println("member");
|
||||
}
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
================ Step #1 =================
|
||||
|
||||
Cleaning output files:
|
||||
out/production/module/JavaClass.class
|
||||
End of files
|
||||
Exit code: NOTHING_DONE
|
||||
------------------------------------------
|
||||
Compiling files:
|
||||
src/JavaClass.java
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/META-INF/module.kotlin_module
|
||||
out/production/module/MainKt.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/main.kt
|
||||
End of files
|
||||
Exit code: OK
|
||||
------------------------------------------
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun JavaClass.foo(x: String) {
|
||||
println("extension")
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
JavaClass().foo("str")
|
||||
}
|
||||
//KT-21534
|
||||
@@ -96,4 +96,8 @@ org.jetbrains.kotlin.jps.build.IncrementalK2LightTreeJvmJpsTestGenerated.Increme
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2FirICLightTreeJvmJpsTestGenerated.IncrementalJvmCompilerOnly.testAddAnnotationToJavaClass, KT-55696,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2JvmJpsTestGenerated.PureKotlin.testAllConstants, test should be changed and fixed in next commits - KT-54991,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2LightTreeJvmJpsTestGenerated.PureKotlin.testAllConstants, test should be changed and fixed in next commits - KT-54991,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2FirICLightTreeJvmJpsTestGenerated.PureKotlin.testAllConstants, test should be changed and fixed in next commits - KT-54991,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2FirICLightTreeJvmJpsTestGenerated.PureKotlin.testAllConstants, test should be changed and fixed in next commits - KT-54991,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK1JvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testPotentialSamAdapter, fixed in new JPS graph impl on IJ side - KT-21534,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2FirICLightTreeJvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testPotentialSamAdapter, fixed in new JPS graph impl on IJ side - KT-21534,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2JvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testPotentialSamAdapter, fixed in new JPS graph impl on IJ side - KT-21534,,
|
||||
org.jetbrains.kotlin.jps.build.IncrementalK2LightTreeJvmJpsTestGenerated.WithJava.JavaUsedInKotlin.testPotentialSamAdapter, fixed in new JPS graph impl on IJ side - KT-21534,,
|
||||
|
Reference in New Issue
Block a user