Add ContinuationAdapter to coroutine tests helpers

It allows having the same Continuation implementations for different
API versions
This commit is contained in:
Denis Zharkov
2018-06-29 17:34:29 +03:00
parent f01e690f49
commit f23a0c8fea
33 changed files with 55 additions and 45 deletions
@@ -7,16 +7,14 @@ inline suspend fun foo(x: suspend () -> String) = x()
// FILE: box.kt
// WITH_RUNTIME
// WITH_COROUTINES
// COMMON_COROUTINES_TEST
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
fun builder(c: suspend () -> Unit) {
c.startCoroutine(object: Continuation<Unit> {
override val context: CoroutineContext
get() = EmptyCoroutineContext
c.startCoroutine(object: helpers.ContinuationAdapter<Unit>() {
override fun resume(value: Unit) {
}