Fix in test bad behaviour of smart step into for stored lambda

When lambda is stored and not executed immediately, smart step into
doesn't work.
This commit is contained in:
Nikolay Krasko
2017-01-26 16:48:35 +03:00
parent 4a4a8250fd
commit c8999c4141
3 changed files with 31 additions and 0 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at smartStepIntoStoredLambda.kt:12
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! smartStepIntoStoredLambda.SmartStepIntoStoredLambdaKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
smartStepIntoStoredLambda.kt:12
smartStepIntoStoredLambda.kt:16
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,17 @@
package smartStepIntoStoredLambda
fun foo(a: Any) {}
fun store(a: () -> Unit): () -> Unit {
return a
}
fun main(args: Array<String>) {
// SMART_STEP_INTO_BY_INDEX: 2
//Breakpoint!
val some = store() {
foo("hi")
}
some()
}
@@ -1082,6 +1082,12 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
doCustomTest(fileName);
}
@TestMetadata("smartStepIntoStoredLambda.kt")
public void testSmartStepIntoStoredLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoStoredLambda.kt");
doCustomTest(fileName);
}
@TestMetadata("smartStepIntoSubClass.kt")
public void testSmartStepIntoSubClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoSubClass.kt");