[Tests] Check Java interop
This commit is contained in:
committed by
TeamCityServer
parent
f9e6365461
commit
bafd084094
+7
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
public static void test(C1 c1, C2 c2, R r, P1 p1, P2 p2) {
|
||||
SignatureKt.f(c1, c2, r, p1, p2);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
package test
|
||||
|
||||
interface C1
|
||||
interface C2
|
||||
interface R
|
||||
interface P1
|
||||
interface P2
|
||||
|
||||
context(C1, C2)
|
||||
fun R.f(p1: P1, p2: P2) {}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package test
|
||||
|
||||
public fun test.R.f(/*0*/ test.P1, /*1*/ test.P2): kotlin.Unit
|
||||
|
||||
public interface C1 {
|
||||
}
|
||||
|
||||
public interface C2 {
|
||||
}
|
||||
|
||||
public/*package*/ open class JavaClass {
|
||||
public/*package*/ constructor JavaClass()
|
||||
|
||||
// Static members
|
||||
public open fun test(/*0*/ test.C1!, /*1*/ test.C2!, /*2*/ test.R!, /*3*/ test.P1!, /*4*/ test.P2!): kotlin.Unit
|
||||
}
|
||||
|
||||
public interface P1 {
|
||||
}
|
||||
|
||||
public interface P2 {
|
||||
}
|
||||
|
||||
public interface R {
|
||||
}
|
||||
Generated
+26
@@ -339,6 +339,19 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
|
||||
runTest("compiler/testData/compileJavaAgainstKotlin/method/Void.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ContextualFunctions extends AbstractCompileJavaAgainstKotlinTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContextualFunctions() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -1002,6 +1015,19 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg
|
||||
runTest("compiler/testData/compileJavaAgainstKotlin/method/Void.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ContextualFunctions extends AbstractCompileJavaAgainstKotlinTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContextualFunctions() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
compiler/tests-gen/org/jetbrains/kotlin/jvm/compiler/ir/IrCompileJavaAgainstKotlinTestGenerated.java
Generated
+36
@@ -339,6 +339,24 @@ public class IrCompileJavaAgainstKotlinTestGenerated extends AbstractIrCompileJa
|
||||
runTest("compiler/testData/compileJavaAgainstKotlin/method/Void.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ContextualFunctions extends AbstractIrCompileJavaAgainstKotlinTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContextualFunctions() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Signature.kt")
|
||||
public void testSignature() throws Exception {
|
||||
runTest("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions/Signature.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -1002,6 +1020,24 @@ public class IrCompileJavaAgainstKotlinTestGenerated extends AbstractIrCompileJa
|
||||
runTest("compiler/testData/compileJavaAgainstKotlin/method/Void.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ContextualFunctions extends AbstractIrCompileJavaAgainstKotlinTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContextualFunctions() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("Signature.kt")
|
||||
public void testSignature() throws Exception {
|
||||
runTest("compiler/testData/compileJavaAgainstKotlin/method/contextualFunctions/Signature.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user