Add ContinuationAdapter to coroutine tests helpers
It allows having the same Continuation implementations for different API versions
This commit is contained in:
@@ -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) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user