Move test from js to common part

This commit is contained in:
Roman Artemev
2018-12-11 16:10:41 +03:00
committed by romanart
parent b6c975739c
commit 2b436b493c
8 changed files with 53 additions and 14 deletions
@@ -0,0 +1,31 @@
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
// WITH_COROUTINES
// COMMON_COROUTINES_TEST
import helpers.*
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
suspend inline fun doTwice(block: suspend () -> Unit) {
block()
block()
}
var testResult: String = ""
fun build(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
}
fun box(): String {
build {
doTwice {
testResult += "OK"
return@build
}
}
return testResult
}