Move test from js to common part
This commit is contained in:
-5
@@ -893,11 +893,6 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/coroutines/debugStatement.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineLambdaNonLocalReturn.kt")
|
||||
public void testInlineLambdaNonLocalReturn() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/inlineLambdaNonLocalReturn.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localVarOptimization.kt")
|
||||
public void testLocalVarOptimization() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/localVarOptimization.kt");
|
||||
|
||||
-5
@@ -893,11 +893,6 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
runTest("js/js.translator/testData/box/coroutines/debugStatement.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineLambdaNonLocalReturn.kt")
|
||||
public void testInlineLambdaNonLocalReturn() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/inlineLambdaNonLocalReturn.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localVarOptimization.kt")
|
||||
public void testLocalVarOptimization() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/localVarOptimization.kt");
|
||||
|
||||
+5
@@ -5286,6 +5286,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineSuspendLambdaNonLocalReturn.kt")
|
||||
public void testInlineSuspendLambdaNonLocalReturn_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("inlinedTryCatchFinally.kt")
|
||||
public void testInlinedTryCatchFinally_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt", "kotlin.coroutines");
|
||||
|
||||
+10
@@ -5446,6 +5446,16 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineSuspendLambdaNonLocalReturn.kt")
|
||||
public void testInlineSuspendLambdaNonLocalReturn_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineSuspendLambdaNonLocalReturn.kt")
|
||||
public void testInlineSuspendLambdaNonLocalReturn_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("inlinedTryCatchFinally.kt")
|
||||
public void testInlinedTryCatchFinally_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1305
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
|
||||
import kotlin.coroutines.*
|
||||
|
||||
suspend inline fun doTwice(block: suspend () -> Unit) {
|
||||
block()
|
||||
block()
|
||||
}
|
||||
|
||||
var testResult: String = ""
|
||||
|
||||
fun build(c: suspend () -> Unit) {
|
||||
c.startCoroutine(Continuation<Unit>(EmptyCoroutineContext) { })
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
|
||||
build {
|
||||
doTwice {
|
||||
testResult += "OK"
|
||||
return@build
|
||||
}
|
||||
}
|
||||
|
||||
return testResult
|
||||
}
|
||||
Reference in New Issue
Block a user