test: adapt genericParameterResult.kt test for JS IR backend.
This commit is contained in:
+6
-1
@@ -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"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user