Set up tests for fun interfaces for JVM backend for now

This commit is contained in:
Mikhail Zarechenskiy
2020-01-17 14:01:20 +03:00
parent 39e0f101b1
commit 58c235e722
16 changed files with 36 additions and 6 deletions
@@ -1,4 +1,5 @@
// !LANGUAGE: +FunctionalInterfaceConversion // !LANGUAGE: +FunctionalInterfaceConversion
// TARGET_BACKEND: JVM
fun interface Foo { fun interface Foo {
fun invoke(): String fun invoke(): String
@@ -1,4 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
fun interface Foo { fun interface Foo {
fun invoke(): String fun invoke(): String
@@ -1,4 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
fun interface KRunnable { fun interface KRunnable {
fun invoke() fun invoke()
@@ -1,4 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME // WITH_RUNTIME
fun interface MyRunnable { fun interface MyRunnable {
@@ -1,5 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME // WITH_RUNTIME
fun interface KRunnable { fun interface KRunnable {
@@ -1,4 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME // WITH_RUNTIME
fun interface Fn<T, R> { fun interface Fn<T, R> {
@@ -1,6 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME // WITH_RUNTIME
fun interface KRunnable { fun interface KRunnable {
@@ -1,4 +1,7 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_COROUTINES // WITH_COROUTINES
// WITH_RUNTIME // WITH_RUNTIME
@@ -1,4 +1,5 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions // !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
// IGNORE_BACKEND: JVM_IR
// FILE: A.kt // FILE: A.kt
@@ -348,6 +348,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl
runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt");
} }
@TestMetadata("useDeserializedFunInterface.kt")
public void testUseDeserializedFunInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)
@@ -343,6 +343,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile
runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt"); runTest("compiler/testData/compileKotlinAgainstKotlin/unsignedTypesInAnnotations.kt");
} }
@TestMetadata("useDeserializedFunInterface.kt")
public void testUseDeserializedFunInterface() throws Exception {
runTest("compiler/testData/compileKotlinAgainstKotlin/useDeserializedFunInterface.kt");
}
@TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8") @TestMetadata("compiler/testData/compileKotlinAgainstKotlin/jvm8")
@TestDataPath("$PROJECT_ROOT") @TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class) @RunWith(JUnit3RunnerWithInners.class)