Minor. Use coroutine test helpers for inline/diagnostics tests

It should help with decreasing test data copy-pasting when
testing against release / pre-release coroutines
This commit is contained in:
Denis Zharkov
2018-06-26 15:10:58 +03:00
parent 2c195555ad
commit f01e690f49
49 changed files with 146 additions and 466 deletions
@@ -1,6 +1,7 @@
// FILE: inlined.kt
// COMMON_COROUTINES_TEST
// WITH_RUNTIME
// WITH_COROUTINES
// NO_CHECK_LAMBDA_INLINING
suspend inline fun inlineMe(c: suspend (String) -> String, d: suspend () -> String): String {
@@ -19,19 +20,10 @@ suspend inline fun crossinlineMe(crossinline c: suspend (String) -> String, cros
// COMMON_COROUTINES_TEST
import COROUTINES_PACKAGE.*
import helpers.*
fun builder(c: suspend () -> Unit) {
c.startCoroutine(object: Continuation<Unit> {
override val context: CoroutineContext
get() = EmptyCoroutineContext
override fun resume(value: Unit) {
}
override fun resumeWithException(exception: Throwable) {
throw exception
}
})
c.startCoroutine(EmptyContinuation)
}
suspend fun yieldString(s: String) = s