Migrate stepping and evaluation tests to the new coroutine API
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package forTests
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.CoroutineContext
|
||||
import kotlin.coroutines.experimental.EmptyCoroutineContext
|
||||
import kotlin.coroutines.experimental.startCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
import kotlin.coroutines.startCoroutine
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
open class EmptyContinuation(override val context: CoroutineContext = EmptyCoroutineContext) : Continuation<Any?> {
|
||||
companion object : EmptyContinuation()
|
||||
override fun resume(data: Any?) {}
|
||||
override fun resumeWithException(exception: Throwable) { throw exception }
|
||||
override fun resumeWith(result: SuccessOrFailure<Any?>) { result.getOrThrow() }
|
||||
}
|
||||
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package soSuspendableCallInEndOfFun
|
||||
|
||||
import forTests.WaitFinish
|
||||
import forTests.builder
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package soSuspendableCallInEndOfLambda
|
||||
|
||||
import forTests.builder
|
||||
import forTests.WaitFinish
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package soSuspendableCallInFun
|
||||
|
||||
import forTests.builder
|
||||
import forTests.WaitFinish
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -2,8 +2,8 @@ package soSuspendableCallInFunFromOtherStepping
|
||||
|
||||
import forTests.builder
|
||||
import forTests.WaitFinish
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package soSuspendableCallInLambda
|
||||
|
||||
import forTests.builder
|
||||
import forTests.WaitFinish
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ package sofSuspendableCallInFun
|
||||
|
||||
import forTests.builder
|
||||
import forTests.WaitFinish
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
import kotlin.coroutines.experimental.suspendCoroutine
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user