Add tests on smart step into lambda

This commit is contained in:
Natalia Ukhorskaya
2015-07-21 17:22:58 +03:00
parent c8f57e007c
commit ee49d13d89
8 changed files with 128 additions and 13 deletions
@@ -0,0 +1,13 @@
package funLiteral
fun main(args: Array<String>) {
//Breakpoint!
f1() {
f2()
}
}
fun f1(f: () -> Unit) { f() }
fun f2() {}
// SMART_STEP_INTO_BY_INDEX: 1
@@ -0,0 +1,25 @@
package severalFunLiterals
fun main(args: Array<String>) {
val myClass = MyClass()
//Breakpoint!
myClass.f1 { test() }.f2 {
test()
}
}
class MyClass {
fun f1(f1Param: () -> Unit): MyClass {
f1Param()
return this
}
fun f2(f2Param: () -> Unit): MyClass {
f2Param()
return this
}
}
fun test() {}
// SMART_STEP_INTO_BY_INDEX: 3
@@ -0,0 +1,28 @@
package severalFunLiteralsInClass
fun main(args: Array<String>) {
MyClass().inClass()
}
class MyClass {
fun f1(f1Param: () -> Unit): MyClass {
f1Param()
return this
}
fun f2(f2Param: () -> Unit): MyClass {
f2Param()
return this
}
fun inClass() {
//Breakpoint!
f1 { test() }.f2 {
test()
}
}
}
fun test() {}
// SMART_STEP_INTO_BY_INDEX: 3