Fix some coroutine tests

This commit is contained in:
Roman Artemev
2020-02-28 17:11:25 +03:00
committed by romanart
parent 4e002a41e6
commit adc022fde8
12 changed files with 217 additions and 90 deletions
@@ -6056,8 +6056,8 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
public void testCreateCoroutinesOnManualInstances_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines");
}
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
@@ -6786,13 +6786,17 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt");
public void testBigArity_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines");
}
@TestMetadata("fromJava.kt")
@@ -7176,13 +7180,17 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInAnonymous() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt");
public void testSimple_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines");
}
}
@@ -7355,6 +7363,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/bigArity.kt");
}
@TestMetadata("callSuspend.kt")
public void testCallSuspend() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt");
@@ -1,10 +1,13 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// IGNORE_BACKEND: JS_IR
// WITH_RUNTIME
// WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.*
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
import helpers.ContinuationAdapter
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED
fun runCustomLambdaAsCoroutine(e: Throwable? = null, x: (Continuation<String>) -> Any?): String {
var result = "fail"
@@ -1,21 +1,13 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR, JS, NATIVE
// WITH_REFLECT
// IGNORE_BACKEND: NATIVE
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
// WITH_COROUTINES
import kotlin.reflect.full.*
// COMMON_COROUTINES_TEST
import helpers.*
import kotlin.coroutines.*
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class A {
suspend fun foo(
p00: Long = 0, p01: A = A(), p02: A = A(), p03: A = A(), p04: A = A(), p05: A = A(), p06: A = A(), p07: A = A(), p08: A = A(), p09: A = A(),
p10: A = A(), p11: A = A(), p12: A = A(), p13: A = A(), p14: A = A(), p15: A = A(), p16: A = A(), p17: A = A(), p18: A = A(), p19: A = A(),
p20: A = A(), p21: A = A(), p22: A = A(), p23: A = A(), p24: A = A(), p25: A = A(), p26: A = A(), p27: A = A(), p28: A = A(), p29: String
): String {
return p29 + p00
}
}
fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
@@ -42,30 +34,19 @@ suspend fun expectsLambdaWithArity22(c: suspend (Int, Int, Int, Int, Int, Int, I
}
fun box(): String {
val a = A()
var res = "FAIL 1"
builder {
res = A::foo.callSuspend(a, 1L, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, "OK")
}
if (res != "OK1") return res
res = "FAIL 2"
builder {
res = A::foo.callSuspendBy(mapOf(A::foo.parameters.first() to A(), A::foo.parameters.last() to "OK")) as String
}
if (res != "OK0") return res
res = "FAIL 3"
builder {
res = expectsLambdaWithBigArity { _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, s -> s }
}
if (res != "OK") return res
res = "FAIL 4"
res = "FAIL 2"
builder {
res = expectsLambdaWithArity21 {
i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, s -> s
}
}
if (res != "OK") return res
res = "FAIL 5"
res = "FAIL 3"
builder {
res = expectsLambdaWithArity22 {
i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, s -> s
@@ -1,12 +1,18 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: JS_IR, JS
// IGNORE_BACKEND: JS
// WITH_RUNTIME
// WITH_COROUTINES
import helpers.*
import kotlin.coroutines.*
fun check(condition: Boolean, msg: () -> Unit) {
if (!condition) {
throw AssertionError(msg())
}
}
fun fn1(x: Any) {}
suspend fun suspendFn0() {}
@@ -41,25 +47,25 @@ fun box(): String {
val localFun1 = ::local1 as Any
val suspendLocalFun0 = ::suspendLocal0 as Any
assert(f1 !is SuspendFunction0<*>) { "Failed: f1 !is SuspendFunction0<*>" }
assert(sf0 is SuspendFunction0<*>) { "Failed: f1 is SuspendFunction0<*>" }
assert(sf0 is Function1<*, *>) { "Failed: suspendF0 is Function1<*, *>" }
check(f1 !is SuspendFunction0<*>) { "Failed: f1 !is SuspendFunction0<*>" }
check(sf0 is SuspendFunction0<*>) { "Failed: f1 is SuspendFunction0<*>" }
check(sf0 is Function1<*, *>) { "Failed: suspendF0 is Function1<*, *>" }
assert(lambda1 !is SuspendFunction0<*>) { "Failed: lambda1 !is SuspendFunction0<*>" }
assert(suspendLambda0 is Function1<*, *>) { "Failed: suspendLambda0 is Function1<*, *>" }
assert(suspendLambda0 is SuspendFunction0<*>) { "Failed: suspendLambda0 is SuspendFunction0<*>" }
check(lambda1 !is SuspendFunction0<*>) { "Failed: lambda1 !is SuspendFunction0<*>" }
check(suspendLambda0 is Function1<*, *>) { "Failed: suspendLambda0 is Function1<*, *>" }
check(suspendLambda0 is SuspendFunction0<*>) { "Failed: suspendLambda0 is SuspendFunction0<*>" }
assert(localFun1 !is SuspendFunction0<*>) { "Failed: localFun1 !is SuspendFunction0<*, *>" }
assert(suspendLocalFun0 is Function1<*, *>) { "Failed: suspendLocalFun0 is Function1<*, *>" }
assert(suspendLocalFun0 is SuspendFunction0<*>) { "Failed: suspendLocalFun0 is SuspendFunction0<*>" }
check(localFun1 !is SuspendFunction0<*>) { "Failed: localFun1 !is SuspendFunction0<*, *>" }
check(suspendLocalFun0 is Function1<*, *>) { "Failed: suspendLocalFun0 is Function1<*, *>" }
check(suspendLocalFun0 is SuspendFunction0<*>) { "Failed: suspendLocalFun0 is SuspendFunction0<*>" }
assert(ef !is SuspendFunction1<*, *>) { "Failed: ef !is SuspendFunction1<*, *>" }
assert(sef is SuspendFunction1<*, *>) { "Failed: sef is SuspendFunction1<*, *>" }
assert(sef is Function2<*, *, *>) { "Failed: sef is Function2<*, *, *>" }
check(ef !is SuspendFunction1<*, *>) { "Failed: ef !is SuspendFunction1<*, *>" }
check(sef is SuspendFunction1<*, *>) { "Failed: sef is SuspendFunction1<*, *>" }
check(sef is Function2<*, *, *>) { "Failed: sef is Function2<*, *, *>" }
assert(afoo !is SuspendFunction1<*, *>) { "afoo !is SuspendFunction1<*, *>" }
assert(safoo is Function2<*, *, *>) { "safoo is Function2<*, *, *>" }
assert(safoo is SuspendFunction1<*, *>) { "asfoo is SuspendFunction1<*, *>" }
check(afoo !is SuspendFunction1<*, *>) { "afoo !is SuspendFunction1<*, *>" }
check(safoo is Function2<*, *, *>) { "safoo is Function2<*, *, *>" }
check(safoo is SuspendFunction1<*, *>) { "asfoo is SuspendFunction1<*, *>" }
checkReified<suspend () -> Unit> {}
@@ -1,12 +1,12 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JVM_IR, JS_IR
// IGNORE_BACKEND: JVM, JS, NATIVE
// WITH_RUNTIME
// WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.*
import kotlin.coroutines.experimental.*
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
suspend fun callLocal(): String {
val local = suspend fun() = "OK"
@@ -0,0 +1,40 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
// WITH_COROUTINES
import helpers.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
import kotlin.reflect.full.*
fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
}
class A {
suspend fun foo(
p00: Long = 0, p01: A = A(), p02: A = A(), p03: A = A(), p04: A = A(), p05: A = A(), p06: A = A(), p07: A = A(), p08: A = A(), p09: A = A(),
p10: A = A(), p11: A = A(), p12: A = A(), p13: A = A(), p14: A = A(), p15: A = A(), p16: A = A(), p17: A = A(), p18: A = A(), p19: A = A(),
p20: A = A(), p21: A = A(), p22: A = A(), p23: A = A(), p24: A = A(), p25: A = A(), p26: A = A(), p27: A = A(), p28: A = A(), p29: String
): String {
return p29 + p00
}
}
fun box(): String {
val a = A()
var res = "FAIL 1"
builder {
res = A::foo.callSuspend(a, 1L, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, "OK")
}
if (res != "OK1") return res
res = "FAIL 2"
builder {
res = A::foo.callSuspendBy(mapOf(A::foo.parameters.first() to A(), A::foo.parameters.last() to "OK")) as String
}
if (res != "OK0") return res
return "OK"
}
@@ -4,7 +4,6 @@
// WITH_RUNTIME
// WITH_COROUTINES
// COMMON_COROUTINES_TEST
// KJS_WITH_FULL_RUNTIME
import helpers.*
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
@@ -6151,8 +6151,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
public void testCreateCoroutinesOnManualInstances_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines");
}
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
@@ -7411,13 +7416,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt");
public void testBigArity_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("bigArity.kt")
public void testBigArity_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines");
}
@TestMetadata("fromJava.kt")
@@ -8001,13 +8015,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInAnonymous() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt");
public void testSimple_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("simple.kt")
public void testSimple_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines");
}
}
@@ -8275,6 +8298,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/bigArity.kt");
}
@TestMetadata("callSuspend.kt")
public void testCallSuspend() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt");
@@ -6151,8 +6151,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
public void testCreateCoroutinesOnManualInstances_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines");
}
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
@@ -7411,13 +7416,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt");
public void testBigArity_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("bigArity.kt")
public void testBigArity_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines");
}
@TestMetadata("fromJava.kt")
@@ -7998,14 +8012,23 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@RunWith(JUnit3RunnerWithInners.class)
public static class Anonymous extends AbstractLightAnalysisModeTest {
@TestMetadata("simple.kt")
public void ignoreSimple() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt");
public void ignoreSimple_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("simple.kt")
public void ignoreSimple_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInAnonymous() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@@ -8275,6 +8298,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/bigArity.kt");
}
@TestMetadata("callSuspend.kt")
public void testCallSuspend() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt");
@@ -6056,8 +6056,8 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
public void testCreateCoroutinesOnManualInstances_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines");
}
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
@@ -6786,13 +6786,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt");
public void testBigArity_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines");
}
@TestMetadata("fromJava.kt")
@@ -7176,13 +7180,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInAnonymous() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt");
public void testSimple_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines");
}
}
@@ -7355,6 +7363,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/reflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/bigArity.kt");
}
@TestMetadata("callSuspend.kt")
public void testCallSuspend() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/reflect/callSuspend.kt");
@@ -5111,8 +5111,8 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
public void testCreateCoroutinesOnManualInstances_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines");
}
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
@@ -5729,8 +5729,8 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
@TestMetadata("suspendFunctionIsAs.kt")
public void testSuspendFunctionIsAs() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendFunctionIsAs.kt");
public void testSuspendFunctionIsAs_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/suspendFunctionIsAs.kt", "kotlin.coroutines");
}
@TestMetadata("suspendInlineSuspendFinally.kt")
@@ -5761,13 +5761,17 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt");
public void testBigArity_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines");
}
@TestMetadata("longArgs.kt")
@@ -6101,13 +6105,17 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInAnonymous() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt");
public void testSimple_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines");
}
}
@@ -5111,8 +5111,8 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
@TestMetadata("createCoroutinesOnManualInstances.kt")
public void testCreateCoroutinesOnManualInstances() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt");
public void testCreateCoroutinesOnManualInstances_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt", "kotlin.coroutines");
}
@TestMetadata("crossInlineWithCapturedOuterReceiver.kt")
@@ -5729,8 +5729,8 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
@TestMetadata("suspendFunctionIsAs.kt")
public void testSuspendFunctionIsAs() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendFunctionIsAs.kt");
public void testSuspendFunctionIsAs_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/suspendFunctionIsAs.kt", "kotlin.coroutines");
}
@TestMetadata("suspendInlineSuspendFinally.kt")
@@ -5761,13 +5761,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInCallableReference() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt");
public void testBigArity_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/featureIntersection/callableReference/bigArity.kt", "kotlin.coroutines");
}
@TestMetadata("longArgs.kt")
@@ -6101,13 +6105,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
KotlinTestUtils.runTest0(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInAnonymous() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/anonymous"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt");
public void testSimple_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt", "kotlin.coroutines");
}
}