[TEST] Update testdata due to dropped COMMON_COROUTINE_TEST directive

This commit is contained in:
Dmitriy Novozhilov
2020-12-01 17:59:29 +03:00
committed by TeamCityServer
parent aacf934b49
commit b416c669b0
431 changed files with 999 additions and 2140 deletions
@@ -2,12 +2,10 @@
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
package suspendFunctionAssertionDisabled package suspendFunctionAssertionDisabled
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class Checker { class Checker {
suspend fun check() { suspend fun check() {
@@ -33,4 +31,4 @@ fun box(): String {
builder { c.check() } builder { c.check() }
return "OK" return "OK"
} }
@@ -2,12 +2,10 @@
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
package suspendFunctionAssertionsEnabled package suspendFunctionAssertionsEnabled
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class Checker { class Checker {
suspend fun check() { suspend fun check() {
@@ -37,4 +35,4 @@ fun box(): String {
} }
return "OK" return "OK"
} }
@@ -2,12 +2,10 @@
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
package suspendLambdaAssertionsDisabled package suspendLambdaAssertionsDisabled
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class Checker { class Checker {
fun check() { fun check() {
@@ -33,4 +31,4 @@ fun box(): String {
c.check() c.check()
return "OK" return "OK"
} }
@@ -2,12 +2,10 @@
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm // KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
package suspendLambdaAssertionsEnabled package suspendLambdaAssertionsEnabled
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class Checker { class Checker {
fun check() { fun check() {
@@ -37,4 +35,4 @@ fun box(): String {
} }
return "OK" return "OK"
} }
@@ -3,11 +3,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -2,11 +2,9 @@
// WASM_MUTE_REASON: UNIT_ISSUES // WASM_MUTE_REASON: UNIT_ISSUES
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
+2 -4
View File
@@ -2,10 +2,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import kotlin.contracts.* import kotlin.contracts.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import helpers.* import helpers.*
@ExperimentalContracts @ExperimentalContracts
@@ -31,4 +29,4 @@ val z: S = S.Z()
@ExperimentalContracts @ExperimentalContracts
fun box(): String = when (val w = z) { fun box(): String = when (val w = z) {
is S.Z -> runBlocking { w.f() } is S.Z -> runBlocking { w.f() }
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
suspend fun suspendHere( suspend fun suspendHere(
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
+2 -3
View File
@@ -1,13 +1,12 @@
// SKIP_JDK6 // SKIP_JDK6
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_RUNTIME // WITH_RUNTIME
// COMMON_COROUTINES_TEST
// FULL_JDK // FULL_JDK
// WITH_COROUTINES // WITH_COROUTINES
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun foo(): CompletableFuture<String> = CompletableFuture.supplyAsync { "foo" } fun foo(): CompletableFuture<String> = CompletableFuture.supplyAsync { "foo" }
fun bar(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { "bar with $v" } fun bar(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { "bar with $v" }
+2 -3
View File
@@ -1,13 +1,12 @@
// SKIP_JDK6 // SKIP_JDK6
// TARGET_BACKEND: JVM // TARGET_BACKEND: JVM
// WITH_RUNTIME // WITH_RUNTIME
// COMMON_COROUTINES_TEST
// FULL_JDK // FULL_JDK
// WITH_COROUTINES // WITH_COROUTINES
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun exception(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { throw RuntimeException(v) } fun exception(v: String): CompletableFuture<String> = CompletableFuture.supplyAsync { throw RuntimeException(v) }
+6 -7
View File
@@ -1,11 +1,10 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// FILE: promise.kt // FILE: promise.kt
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Promise<T>(private val executor: ((T) -> Unit) -> Unit) { class Promise<T>(private val executor: ((T) -> Unit) -> Unit) {
private var value: Any? = null private var value: Any? = null
@@ -53,8 +52,8 @@ fun processQueue() {
// FILE: await.kt // FILE: await.kt
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
private var log = "" private var log = ""
@@ -99,8 +98,8 @@ fun <T> asyncOperation(resultSupplier: () -> T) = Promise<T> { resolve ->
fun getLog() = log fun getLog() = log
// FILE: main.kt // FILE: main.kt
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
private fun test() = async<String> { private fun test() = async<String> {
val o = await(asyncOperation { "O" }) val o = await(asyncOperation { "O" })
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): Any = suspendCoroutineUninterceptedOrReturn { x -> } suspend fun suspendHere(): Any = suspendCoroutineUninterceptedOrReturn { x -> }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): Any = suspendCoroutineUninterceptedOrReturn { x ->} suspend fun suspendHere(): Any = suspendCoroutineUninterceptedOrReturn { x ->}
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
@@ -1,9 +1,7 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
interface I1<A, B> { interface I1<A, B> {
suspend fun f(a: A, b: B): String suspend fun f(a: A, b: B): String
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// CHECK_BYTECODE_LISTING // CHECK_BYTECODE_LISTING
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// CHECK_BYTECODE_LISTING // CHECK_BYTECODE_LISTING
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
fun builder(c: suspend() -> Unit) { fun builder(c: suspend() -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): String { suspend fun suspendHere(): String {
var z = "fail1" var z = "fail1"
@@ -28,4 +26,4 @@ fun box(): String {
} }
return result return result
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = "FAIL" var result = "FAIL"
@@ -34,4 +33,4 @@ fun builder(c: suspend Controller.() -> Unit): String {
fun box(): String { fun box(): String {
return builder() { bar() } return builder() { bar() }
} }
+2 -3
View File
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun <T> await(t: T): T = suspendCoroutineUninterceptedOrReturn { c -> suspend fun <T> await(t: T): T = suspendCoroutineUninterceptedOrReturn { c ->
@@ -2,10 +2,9 @@
// IGNORE_BACKEND: JS // IGNORE_BACKEND: JS
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = "" var result = ""
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -67,4 +66,4 @@ fun box(): String {
if (res != "slh;rlh;rlb;slt;slh;rlh;rlc;slb;return;") return "FAIL: $res" if (res != "slh;rlh;rlb;slt;slh;rlh;rlc;slb;return;") return "FAIL: $res"
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = "" var result = ""
@@ -41,4 +40,4 @@ fun builder(c: suspend Controller.() -> Unit): String {
fun box(): String { fun box(): String {
return builder { result = bars() } return builder { result = bars() }
} }
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit): Unit { fun builder(c: suspend () -> Unit): Unit {
c.startCoroutine(handleResultContinuation { c.startCoroutine(handleResultContinuation {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = "" var result = ""
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
@@ -52,4 +51,4 @@ fun box(): String {
if (res != "log(1);suspend(2);log(3);return(4);") return "FAIL: $res" if (res != "log(1);suspend(2);log(3);return(4);") return "FAIL: $res"
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = "" var result = ""
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// IGNORE_BACKEND: JS // IGNORE_BACKEND: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
// KT-36897 // KT-36897
@@ -26,4 +25,4 @@ fun box(): String {
} }
return result return result
} }
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = "" var result = ""
@@ -62,4 +61,4 @@ fun box(): String {
if (res != "try;try(t);catch;return;") return "FAIL: $res" if (res != "try;try(t);catch;return;") return "FAIL: $res"
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
var result = "" var result = ""
@@ -44,4 +43,4 @@ fun box():String {
id("b") id("b")
if (result != "a012b") return "FAIL: $result" if (result != "a012b") return "FAIL: $result"
return "OK" return "OK"
} }
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.Continuation import kotlin.coroutines.Continuation
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var result = false var result = false
@@ -1,8 +1,7 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
inline fun inlinedLambda(block: () -> Unit) { inline fun inlinedLambda(block: () -> Unit) {
return block() return block()
@@ -31,4 +30,4 @@ fun box(): String {
} }
} }
return res return res
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
val x = c.createCoroutine(EmptyContinuation) val x = c.createCoroutine(EmptyContinuation)
@@ -3,10 +3,9 @@
// IGNORE_BACKEND: JS_IR_ES6 // IGNORE_BACKEND: JS_IR_ES6
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
import helpers.ContinuationAdapter import helpers.ContinuationAdapter
fun runCustomLambdaAsCoroutine(e: Throwable? = null, x: (Continuation<String>) -> Any?): String { fun runCustomLambdaAsCoroutine(e: Throwable? = null, x: (Continuation<String>) -> Any?): String {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// COMMON_COROUTINES_TEST
// WITH_COROUTINES // WITH_COROUTINES
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
interface Consumer { fun consume(s: String) } interface Consumer { fun consume(s: String) }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
suspend fun suspendHere(a: String = "abc", i: Int = 2): String = suspendCoroutineUninterceptedOrReturn { x -> suspend fun suspendHere(a: String = "abc", i: Int = 2): String = suspendCoroutineUninterceptedOrReturn { x ->
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
var result = "fail" var result = "fail"
@@ -29,4 +27,4 @@ fun box(): String {
} }
return result return result
} }
+2 -3
View File
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// FULL_JDK // FULL_JDK
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var log = "" var log = ""
+2 -3
View File
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
var result = 0 var result = 0
+2 -3
View File
@@ -1,10 +1,9 @@
// FULL_JDK // FULL_JDK
// COMMON_COROUTINES_TEST
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class MyDeferred<T>(val t: suspend () -> T) { class MyDeferred<T>(val t: suspend () -> T) {
suspend fun await() = t() suspend fun await() = t()
@@ -29,4 +28,4 @@ fun box(): String {
result = zip(first, second) { firstValue: Int, secondValue: Int -> firstValue + secondValue }.await() result = zip(first, second) { firstValue: Int, secondValue: Int -> firstValue + secondValue }.await()
} }
return if (result == 3) "OK" else "FAIL $result" return if (result == 3) "OK" else "FAIL $result"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
suspend fun <T> suspendHere(v: T): T = suspendCoroutineUninterceptedOrReturn { x -> suspend fun <T> suspendHere(v: T): T = suspendCoroutineUninterceptedOrReturn { x ->
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class A { class A {
var result = mutableListOf("O", "K", null) var result = mutableListOf("O", "K", null)
@@ -2,10 +2,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
@@ -1,10 +1,8 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import kotlin.properties.Delegates import kotlin.properties.Delegates
class Pipe { class Pipe {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
data class A(val o: String) { data class A(val o: String) {
operator fun component2(): String = "K" operator fun component2(): String = "K"
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class A(val w: String) { class A(val w: String) {
suspend fun String.ext(): String = suspendCoroutineUninterceptedOrReturn { suspend fun String.ext(): String = suspendCoroutineUninterceptedOrReturn {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class A(val w: String) { class A(val w: String) {
suspend fun Long.ext(): String = suspendCoroutineUninterceptedOrReturn { suspend fun Long.ext(): String = suspendCoroutineUninterceptedOrReturn {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
data class A(val o: String) { data class A(val o: String) {
operator suspend fun component2(): String = suspendCoroutineUninterceptedOrReturn { x -> operator suspend fun component2(): String = suspendCoroutineUninterceptedOrReturn { x ->
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendThere(v: A): A = suspendCoroutineUninterceptedOrReturn { x -> suspend fun suspendThere(v: A): A = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(v) x.resume(v)
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendThere(v: A): A = suspendCoroutineUninterceptedOrReturn { x -> suspend fun suspendThere(v: A): A = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(v) x.resume(v)
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendThere(v: A): A = suspendCoroutineUninterceptedOrReturn { x -> suspend fun suspendThere(v: A): A = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(v) x.resume(v)
@@ -1,10 +1,8 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class CompilerKillingIterator<T, out R>(private val underlying: Iterator<T>, private val transform: suspend (e: T) -> Iterator<R>) { class CompilerKillingIterator<T, out R>(private val underlying: Iterator<T>, private val transform: suspend (e: T) -> Iterator<R>) {
private var currentIt: Iterator<R> = object : Iterator<R> { private var currentIt: Iterator<R> = object : Iterator<R> {
@@ -40,4 +38,4 @@ fun box(): String {
} }
} }
return res return res
} }
@@ -1,10 +1,8 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
class CompilerKillingIterator<T, out R>(private val underlying: Iterator<T>, private val transform: suspend (e: T) -> Iterator<R>) { class CompilerKillingIterator<T, out R>(private val underlying: Iterator<T>, private val transform: suspend (e: T) -> Iterator<R>) {
private var currentIt: Iterator<R> = object : Iterator<R> { private var currentIt: Iterator<R> = object : Iterator<R> {
@@ -40,4 +38,4 @@ fun box(): String {
} }
} }
return res return res
} }
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
import kotlin.test.assertEquals import kotlin.test.assertEquals
suspend fun ArrayList<Int>.yield(v: Int): Unit = suspendCoroutineUninterceptedOrReturn { x -> suspend fun ArrayList<Int>.yield(v: Int): Unit = suspendCoroutineUninterceptedOrReturn { x ->
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend infix fun Int.test(x : Int) : Int { tailrec suspend infix fun Int.test(x : Int) : Int {
if (this > 1) { if (this > 1) {
@@ -23,4 +22,4 @@ fun box() : String {
res = if (1000000.test(1000000) == 1) "OK" else "FAIL" res = if (1000000.test(1000000) == 1) "OK" else "FAIL"
} }
return res return res
} }
@@ -1,10 +1,9 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend infix fun Int.foo(x: Int) { tailrec suspend infix fun Int.foo(x: Int) {
if (x == 0) return if (x == 0) return
@@ -21,4 +20,4 @@ fun box(): String {
1 foo 1000000 1 foo 1000000
} }
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun <T, A> Iterator<T>.foldl(acc : A, foldFunction : (e : T, acc : A) -> A) : A = tailrec suspend fun <T, A> Iterator<T>.foldl(acc : A, foldFunction : (e : T, acc : A) -> A) : A =
if (!hasNext()) acc if (!hasNext()) acc
@@ -22,4 +21,4 @@ fun box() : String {
} }
return if (sum == 500000500000) "OK" else "FAIL: $sum" return if (sum == 500000500000) "OK" else "FAIL: $sum"
} }
@@ -1,9 +1,8 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
suspend fun escapeChar(c : Char) : String? = when (c) { suspend fun escapeChar(c : Char) : String? = when (c) {
'\\' -> "\\\\" '\\' -> "\\\\"
@@ -2,9 +2,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun String.repeat(num : Int, acc : StringBuilder = StringBuilder()) : String = tailrec suspend fun String.repeat(num : Int, acc : StringBuilder = StringBuilder()) : String =
if (num == 0) acc.toString() if (num == 0) acc.toString()
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun foo(x: Int) { tailrec suspend fun foo(x: Int) {
if (x == 0) return if (x == 0) return
@@ -19,4 +18,4 @@ fun box(): String {
foo(1000000) foo(1000000)
} }
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun sum(x: Long, sum: Long): Long { tailrec suspend fun sum(x: Long, sum: Long): Long {
if (x == 0.toLong()) return sum if (x == 0.toLong()) return sum
@@ -21,4 +20,4 @@ fun box() : String {
} }
if (sum != 500000500000.toLong()) return "Fail $sum" if (sum != 500000500000.toLong()) return "Fail $sum"
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun foo(x: Int) { tailrec suspend fun foo(x: Int) {
return if (x > 0) { return if (x > 0) {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun foo(x: Int) { tailrec suspend fun foo(x: Int) {
if (x == 0) return if (x == 0) return
@@ -19,4 +18,4 @@ fun box(): String {
foo(1000000) foo(1000000)
} }
return "OK" return "OK"
} }
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// DONT_RUN_GENERATED_CODE: JS // DONT_RUN_GENERATED_CODE: JS
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
tailrec suspend fun withWhen(counter : Int, d : Any) : Int = tailrec suspend fun withWhen(counter : Int, d : Any) : Int =
if (counter == 0) { if (counter == 0) {
+2 -3
View File
@@ -1,11 +1,10 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
// FULL_JDK // FULL_JDK
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun box(): String { fun box(): String {
val x = gen().joinToString() val x = gen().joinToString()
@@ -1,10 +1,9 @@
// KJS_WITH_FULL_RUNTIME // KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var exception: Throwable? = null var exception: Throwable? = null
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit): String { fun builder(c: suspend () -> Unit): String {
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x -> suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
class Controller { class Controller {
var log = "" var log = ""
@@ -1,9 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
var stopped = false var stopped = false
var log = "" var log = ""
@@ -48,4 +47,4 @@ fun box(): String {
if (log != "123") return "fail: $log" if (log != "123") return "fail: $log"
return result return result
} }
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,11 +1,10 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
// IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,9 +1,7 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -43,4 +41,4 @@ fun test() {
fun box(): String { fun box(): String {
test() test()
return "OK" return "OK"
} }
@@ -1,9 +1,7 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -43,4 +41,4 @@ fun test() {
fun box(): String { fun box(): String {
test() test()
return "OK" return "OK"
} }
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -38,4 +36,4 @@ fun box(): String {
if (result != "OK") return "FAIL: $result" if (result != "OK") return "FAIL: $result"
return result return result
} }
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)
@@ -1,10 +1,8 @@
// WITH_RUNTIME // WITH_RUNTIME
// WITH_COROUTINES // WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.* import helpers.*
import COROUTINES_PACKAGE.* import kotlin.coroutines.*
import COROUTINES_PACKAGE.intrinsics.* import kotlin.coroutines.intrinsics.*
fun builder(c: suspend () -> Unit) { fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation) c.startCoroutine(EmptyContinuation)

Some files were not shown because too many files have changed in this diff Show More