Move debugger test data to the new location

This commit is contained in:
Yan Zhulanow
2019-09-27 00:13:53 +09:00
parent b4cc5703de
commit d8d81c51d7
1423 changed files with 0 additions and 0 deletions
@@ -0,0 +1,40 @@
package soSuspendableCallInEndOfFun
import forTests.WaitFinish
import forTests.builder
import kotlin.coroutines.Continuation
import kotlin.coroutines.*
private fun foo(a: Any) {}
val waiter = WaitFinish()
val suspendWaiter = WaitFinish()
fun main(args: Array<String>) {
builder {
inFun()
}
suspendWaiter.finish()
foo("Main end")
waiter.waitEnd()
}
suspend fun inFun() {
foo("Start")
//Breakpoint!
run()
}
suspend fun run() {
suspendCoroutine { cont: Continuation<Unit> ->
Thread {
suspendWaiter.waitEnd()
cont.resume(Unit)
waiter.finish()
}.start()
}
}
// STEP_OVER: 4