Debugger: Fix AbstractPositionManagerTest
MockReferenceType can't be used anymore because the new DebuggerClassNameProvider requires much more from it. The new SmartMockReferenceType implements methods such as nestedTypes() or allLineLocations() properly. Also, as PositionManager can return more than one class, we should check if any of the classes it returned matches the pattern.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at anonymousFunAsParamDefaultValue.kt:6
|
||||
LineBreakpoint created at anonymousFunAsParamDefaultValue.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
anonymousFunAsParamDefaultValue.kt:6
|
||||
anonymousFunAsParamDefaultValue.kt:10
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -3,8 +3,8 @@ Run Java
|
||||
Connected to the target VM
|
||||
functionReference.kt:11
|
||||
functionReference.kt:4
|
||||
functionReference.kt:7
|
||||
functionReference.kt:11
|
||||
functionReference.kt:7
|
||||
functionReference.kt:4
|
||||
functionReference.kt:5
|
||||
functionReference.kt:12
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at kt15823.kt:13
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt15823.kt:13
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,7 @@
|
||||
LineBreakpoint created at kt17295.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt17295.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -3,8 +3,8 @@ Run Java
|
||||
Connected to the target VM
|
||||
propertyReference.kt:11
|
||||
propertyReference.kt:4
|
||||
propertyReference.kt:7
|
||||
propertyReference.kt:11
|
||||
propertyReference.kt:7
|
||||
propertyReference.kt:4
|
||||
propertyReference.kt:5
|
||||
propertyReference.kt:12
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package anonymousFunAsParamDefaultValue
|
||||
|
||||
fun foo(a: (String) -> String = fun(b: String): String {
|
||||
listOf("").map {
|
||||
//Breakpoint!
|
||||
val a = it.length
|
||||
}
|
||||
|
||||
//Breakpoint!
|
||||
return b
|
||||
}) {
|
||||
a("")
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo()
|
||||
}
|
||||
|
||||
// RESUME: 2
|
||||
@@ -0,0 +1,28 @@
|
||||
package kt15823
|
||||
|
||||
object Some {
|
||||
val collection = mutableListOf<() -> Unit>()
|
||||
|
||||
inline fun inlineWithReified(crossinline lambda: () -> Unit) {
|
||||
collection.add({ lambda() })
|
||||
}
|
||||
|
||||
init {
|
||||
inlineWithReified {
|
||||
//Breakpoint!
|
||||
foo() // Will marked as (X), and never hit, but executes
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun magic() {
|
||||
collection.forEach { it.invoke() }
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
Some.magic()
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
@@ -0,0 +1,18 @@
|
||||
package kt17295
|
||||
|
||||
import java.lang.Thread.sleep
|
||||
import kotlin.concurrent.timer
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
timer("Repeating println", period=100) {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
sleep(2000)
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// RESUME: 1
|
||||
Reference in New Issue
Block a user