test: adapt genericParameterResult.kt test for JS IR backend.

This commit is contained in:
Artem Kobzar
2021-10-14 14:05:39 +00:00
committed by Space
parent 559d7015f7
commit d2e5523180
@@ -1,8 +1,10 @@
// WITH_RUNTIME // WITH_RUNTIME
// IGNORE_BACKEND: JS_IR
import kotlin.coroutines.* import kotlin.coroutines.*
var stdout = ""
fun println(s: Any?) { s?.let { stdout += it } }
fun box(): String { fun box(): String {
suspend { suspend {
listOf(Result.success(true)).forEach { listOf(Result.success(true)).forEach {
@@ -11,5 +13,8 @@ fun box(): String {
}.startCoroutine(Continuation(EmptyCoroutineContext) { }.startCoroutine(Continuation(EmptyCoroutineContext) {
it.getOrThrow() it.getOrThrow()
}) })
if (stdout != "true") return "FAIL: forEach lambda inside a coroutine wasn't called"
return "OK" return "OK"
} }