JVM_IR: Minor. Unmute test.

This commit is contained in:
Ilmir Usmanov
2019-09-18 22:17:40 +03:00
parent 63f6d515bc
commit 2bfd17d8fb
7 changed files with 85 additions and 10 deletions
@@ -0,0 +1,27 @@
// WITH_RUNTIME
// WITH_COROUTINES
// CHECK_BYTECODE_LISTING
// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM
import helpers.*
import kotlin.coroutines.*
fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
}
suspend fun call(c: suspend Long.() -> String): String {
return 1000L.c()
}
fun box(): String {
var res = ""
builder {
res = call { ->
"OK$this"
}
}
if (res != "OK1000") return res
return "OK"
}
@@ -0,0 +1,43 @@
@kotlin.Metadata
final class LambdaWithLongReceiver_irKt$$call$Continuation {
field label: int
@org.jetbrains.annotations.NotNull field result: java.lang.Object
public method <init>(@org.jetbrains.annotations.Nullable p0: kotlin.coroutines.Continuation): void
public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object
}
@kotlin.coroutines.jvm.internal.DebugMetadata
@kotlin.Metadata
final class LambdaWithLongReceiver_irKt$box$1$1 {
private field $p: long
private field label: int
inner class LambdaWithLongReceiver_irKt$box$1$1
public method <init>(): void
public method <init>(@org.jetbrains.annotations.Nullable p0: kotlin.coroutines.Continuation): void
public final @org.jetbrains.annotations.NotNull method create(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): kotlin.coroutines.Continuation
public final method invoke(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object
public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object
}
@kotlin.coroutines.jvm.internal.DebugMetadata
@kotlin.Metadata
final class LambdaWithLongReceiver_irKt$box$1 {
private field $res: kotlin.jvm.internal.Ref$ObjectRef
field L$0: java.lang.Object
private field label: int
inner class LambdaWithLongReceiver_irKt$box$1
public method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.internal.Ref$ObjectRef): void
public method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.internal.Ref$ObjectRef, @org.jetbrains.annotations.Nullable p1: kotlin.coroutines.Continuation): void
public final @org.jetbrains.annotations.NotNull method create(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): kotlin.coroutines.Continuation
public final method invoke(p0: java.lang.Object): java.lang.Object
public final @org.jetbrains.annotations.Nullable method invokeSuspend(@org.jetbrains.annotations.NotNull p0: java.lang.Object): java.lang.Object
}
@kotlin.Metadata
public final class LambdaWithLongReceiver_irKt {
inner class LambdaWithLongReceiver_irKt$box$1
inner class LambdaWithLongReceiver_irKt$box$1$1
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static method builder(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function1): void
public final static @org.jetbrains.annotations.Nullable method call(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function2, @org.jetbrains.annotations.NotNull p1: kotlin.coroutines.Continuation): java.lang.Object
}
@@ -6630,6 +6630,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver.kt", "kotlin.coroutines");
}
@TestMetadata("lambdaWithLongReceiver_ir.kt")
public void testLambdaWithLongReceiver_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver_ir.kt");
}
@TestMetadata("lambdaWithMultipleParameters.kt")
public void testLambdaWithMultipleParameters_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/bridges/lambdaWithMultipleParameters.kt", "kotlin.coroutines.experimental");
@@ -6608,6 +6608,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Bridges extends AbstractLightAnalysisModeTest {
@TestMetadata("lambdaWithLongReceiver_ir.kt")
public void ignoreLambdaWithLongReceiver_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver_ir.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -6180,6 +6180,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver.kt", "kotlin.coroutines");
}
@TestMetadata("lambdaWithLongReceiver_ir.kt")
public void testLambdaWithLongReceiver_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/bridges/lambdaWithLongReceiver_ir.kt");
}
@TestMetadata("lambdaWithMultipleParameters.kt")
public void testLambdaWithMultipleParameters_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/bridges/lambdaWithMultipleParameters.kt", "kotlin.coroutines");
@@ -6219,11 +6219,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines");
}
@TestMetadata("inlineWithoutStateMachine_ir.kt")
public void testInlineWithoutStateMachine_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine_ir.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines");
@@ -7239,11 +7239,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt", "kotlin.coroutines");
}
@TestMetadata("inlineWithoutStateMachine_ir.kt")
public void testInlineWithoutStateMachine_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine_ir.kt");
}
@TestMetadata("innerObjectRetransformation.kt")
public void testInnerObjectRetransformation_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/tailCallOptimizations/innerObjectRetransformation.kt", "kotlin.coroutines.experimental");