472ec72eb9
1. Move tests to their own module 2. Avoid sharing the 'tinyApp' project between tests 3. Clean up option directive handling
37 lines
910 B
Kotlin
Vendored
37 lines
910 B
Kotlin
Vendored
// ATTACH_LIBRARY: coroutines
|
|
|
|
package siSuspendFun
|
|
|
|
import forTests.builder
|
|
|
|
private fun foo(): Int {
|
|
return 42 // 6
|
|
}
|
|
|
|
// One line suspend wihtout doResume
|
|
suspend fun fourth() = foo() // 5
|
|
|
|
// Multiline suspend without doResume
|
|
suspend fun third() : Int? {
|
|
return fourth() // 4
|
|
}
|
|
|
|
// One line suspend with doResume
|
|
suspend fun second(): Int = third()?.let { return it } ?: 0 // 3
|
|
|
|
// Multiline suspend with doResume
|
|
suspend fun first(): Int { //
|
|
second() // 2
|
|
return 12
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
builder {
|
|
//Breakpoint!
|
|
first() // 1
|
|
foo()
|
|
}
|
|
}
|
|
|
|
// STEP_INTO: 5
|