Replace trivial usages of suspendCoroutineOrReturn in tests

This is necessary since suspendCoroutineOrReturn gets removed in 1.3
This commit is contained in:
Denis Zharkov
2018-07-04 18:41:01 +03:00
parent a23ce42c80
commit 0b3048f60a
189 changed files with 258 additions and 258 deletions
@@ -3,7 +3,7 @@
// TREAT_AS_ONE_FILE
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
x.resumeWith(SuccessOrFailure.success("OK"))
}
@@ -4,7 +4,7 @@ import helpers.*
// TREAT_AS_ONE_FILE
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
x.resume("OK")
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -8,7 +8,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -8,7 +8,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -7,7 +7,7 @@ import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
class Controller {
suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x ->
x.resume(Unit)
COROUTINE_SUSPENDED
}
@@ -9,7 +9,7 @@ import COROUTINES_PACKAGE.intrinsics.*
var res = "FAIL"
suspend fun suspendHere() = suspendCoroutineOrReturn<Unit> {
suspend fun suspendHere() = suspendCoroutineUninterceptedOrReturn<Unit> {
res = "OK"
it.resume(Unit)
COROUTINE_SUSPENDED
@@ -30,4 +30,4 @@ fun box() : String {
// we surround it with return unit markers.
// While denerating state machine, we remove them.
// 0 ICONST_2
// 0 ICONST_3
// 0 ICONST_3
@@ -5,7 +5,7 @@ import helpers.*
// TREAT_AS_ONE_FILE
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
x.resume("OK")
}
@@ -4,7 +4,7 @@ import helpers.*
// TREAT_AS_ONE_FILE
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
x.resume("OK")
}
@@ -4,7 +4,7 @@ import helpers.*
// TREAT_AS_ONE_FILE
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
x.resume("OK")
}