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
@@ -2,6 +2,7 @@
// COMMON_COROUTINES_TEST
// FILE: A.kt
// WITH_RUNTIME
// WITH_COROUTINES
package a
import COROUTINES_PACKAGE.*
@@ -15,7 +16,7 @@ class Controller {
}
fun builder(c: suspend Controller.() -> Unit) {
c.startCoroutine(Controller(), object : Continuation<Unit> {
c.startCoroutine(Controller(), object : helpers.ContinuationAdapter<Unit>() {
override val context: CoroutineContext = EmptyCoroutineContext
override fun resume(value: Unit) {}