Refactor debugger tests
1. Move tests to their own module 2. Avoid sharing the 'tinyApp' project between tests 3. Clean up option directive handling
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// ATTACH_LIBRARY: coroutines
|
||||
|
||||
package coroutine
|
||||
|
||||
import forTests.builder
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at coroutine.kt:15
|
||||
LineBreakpoint created at coroutine.kt:17
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
coroutine.kt:15
|
||||
coroutine.kt:15
|
||||
coroutine.kt:16
|
||||
coroutine.kt:17
|
||||
coroutine.kt:17
|
||||
coroutine.kt:18
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
+3
@@ -1,3 +1,6 @@
|
||||
// FILE: inlineInObjectSameFileDex.kt
|
||||
// EMULATE_DEX: true
|
||||
|
||||
package inlineInObjectSameFileDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at inlineInObjectSameFileDex.kt:5
|
||||
LineBreakpoint created at inlineInObjectSameFileDex.kt:11
|
||||
LineBreakpoint created at inlineInObjectSameFileDex.kt:8
|
||||
LineBreakpoint created at inlineInObjectSameFileDex.kt:14
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInObjectSameFileDex.kt:5
|
||||
inlineInObjectSameFileDex.kt:11
|
||||
inlineInObjectSameFileDex.kt:8
|
||||
inlineInObjectSameFileDex.kt:14
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
package manyFilesWithInlineCalls1Dex.first
|
||||
|
||||
inline fun firstInline() {
|
||||
// Breakpoint 1
|
||||
1 + 1
|
||||
}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
package manyFilesWithInlineCalls1Dex.second
|
||||
|
||||
inline fun secondInline() {
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+19
-1
@@ -1,3 +1,6 @@
|
||||
// EMULATE_DEX: true
|
||||
// FILE: manyFilesWithInlineCalls1Dex.kt
|
||||
|
||||
package manyFilesWithInlineCalls1Dex
|
||||
|
||||
import manyFilesWithInlineCalls1Dex.first.*
|
||||
@@ -11,4 +14,19 @@ fun unused() {
|
||||
secondInline()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: manyFilesWithInlineCalls1Dex.First.kt: Breakpoint 1
|
||||
// ADDITIONAL_BREAKPOINT: manyFilesWithInlineCalls1Dex.First.kt: Breakpoint 1
|
||||
|
||||
// FILE: manyFilesWithInlineCalls1Dex.First.kt
|
||||
package manyFilesWithInlineCalls1Dex.first
|
||||
|
||||
inline fun firstInline() {
|
||||
// Breakpoint 1
|
||||
1 + 1
|
||||
}
|
||||
|
||||
// FILE: manyFilesWithInlineCalls1Dex.Second.kt
|
||||
package manyFilesWithInlineCalls1Dex.second
|
||||
|
||||
inline fun secondInline() {
|
||||
1 + 1
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at manyFilesWithInlineCalls1Dex.First.kt:5
|
||||
LineBreakpoint created at manyFilesWithInlineCalls1Dex.First.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
manyFilesWithInlineCalls1Dex.First.kt:5
|
||||
manyFilesWithInlineCalls1Dex.First.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
package manyFilesWithInlineCalls2Dex.first
|
||||
|
||||
inline fun firstInline() {
|
||||
1 + 1
|
||||
}
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
package manyFilesWithInlineCalls2Dex.second
|
||||
|
||||
inline fun secondInline() {
|
||||
// Breakpoint 1
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+19
-1
@@ -1,3 +1,6 @@
|
||||
// EMULATE_DEX: true
|
||||
// FILE: manyFilesWithInlineCalls2Dex.kt
|
||||
|
||||
package manyFilesWithInlineCalls2Dex
|
||||
|
||||
import manyFilesWithInlineCalls2Dex.first.*
|
||||
@@ -11,4 +14,19 @@ fun unused() {
|
||||
firstInline()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: manyFilesWithInlineCalls2Dex.Second.kt: Breakpoint 1
|
||||
// ADDITIONAL_BREAKPOINT: manyFilesWithInlineCalls2Dex.Second.kt: Breakpoint 1
|
||||
|
||||
// FILE: manyFilesWithInlineCalls2Dex.First.kt
|
||||
package manyFilesWithInlineCalls2Dex.first
|
||||
|
||||
inline fun firstInline() {
|
||||
1 + 1
|
||||
}
|
||||
|
||||
// FILE: manyFilesWithInlineCalls2Dex.Second.kt
|
||||
package manyFilesWithInlineCalls2Dex.second
|
||||
|
||||
inline fun secondInline() {
|
||||
// Breakpoint 1
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at manyFilesWithInlineCalls2Dex.Second.kt:5
|
||||
LineBreakpoint created at manyFilesWithInlineCalls2Dex.Second.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
manyFilesWithInlineCalls2Dex.Second.kt:5
|
||||
manyFilesWithInlineCalls2Dex.Second.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
inline fun inlineFun() {
|
||||
var i = 1
|
||||
// Breakpoint 1
|
||||
i++
|
||||
i++
|
||||
}
|
||||
Vendored
+13
@@ -1,3 +1,6 @@
|
||||
// FILE: severalInlineCallsFromOtherFileDex.kt
|
||||
// EMULATE_DEX: true
|
||||
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -16,3 +19,13 @@ fun secondCall() {
|
||||
|
||||
// RESUME: 2
|
||||
// ADDITIONAL_BREAKPOINT: severalInlineCallsFromOtherFileDex.Other.kt: Breakpoint 1
|
||||
|
||||
// FILE: severalInlineCallsFromOtherFileDex.Other.kt
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
inline fun inlineFun() {
|
||||
var i = 1
|
||||
// Breakpoint 1
|
||||
i++
|
||||
i++
|
||||
}
|
||||
Vendored
+5
-5
@@ -1,10 +1,10 @@
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.Other.kt:6
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:5
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.Other.kt:7
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
severalInlineCallsFromOtherFileDex.kt:5
|
||||
severalInlineCallsFromOtherFileDex.Other.kt:6
|
||||
severalInlineCallsFromOtherFileDex.Other.kt:6
|
||||
severalInlineCallsFromOtherFileDex.kt:8
|
||||
severalInlineCallsFromOtherFileDex.Other.kt:7
|
||||
severalInlineCallsFromOtherFileDex.Other.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+3
@@ -1,3 +1,6 @@
|
||||
// FILE: severalInlineCallsFromOtherFileDex.kt
|
||||
// EMULATE_DEX: true
|
||||
|
||||
package severalInlineCallsFromOtherFileDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
||||
Vendored
+19
-2
@@ -1,6 +1,23 @@
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:8
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:26
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:32
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:37
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:44
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:49
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:56
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:63
|
||||
LineBreakpoint created at severalInlineCallsFromOtherFileDex.kt:69
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
severalInlineCallsFromOtherFileDex.kt:8
|
||||
severalInlineCallsFromOtherFileDex.kt:26
|
||||
severalInlineCallsFromOtherFileDex.kt:32
|
||||
severalInlineCallsFromOtherFileDex.kt:44
|
||||
severalInlineCallsFromOtherFileDex.kt:69
|
||||
severalInlineCallsFromOtherFileDex.kt:37
|
||||
severalInlineCallsFromOtherFileDex.kt:49
|
||||
severalInlineCallsFromOtherFileDex.kt:56
|
||||
severalInlineCallsFromOtherFileDex.kt:63
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 1
|
||||
Error: Could not find or load main class severalInlineFunctionsInOneFileDex.SeveralInlineFunctionsInOneFileDexKt
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+1
@@ -1,6 +1,7 @@
|
||||
LineBreakpoint created at simpleConditionalBreakpoint.kt:5 condition = 1 == 1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
Compile bytecode for 1 == 1
|
||||
simpleConditionalBreakpoint.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+14
@@ -1,3 +1,4 @@
|
||||
// FILE: smartStepIntoInterfaceImpl.kt
|
||||
package smartStepIntoInterfaceImpl
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -153,3 +154,16 @@ fun testStepInto() {
|
||||
//Breakpoint!
|
||||
Obj2.staticCallInOverride("a")
|
||||
}
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
public class MyJavaClass {
|
||||
@NotNull
|
||||
public static int staticFun(Object s) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
Vendored
+35
-35
@@ -1,40 +1,40 @@
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:90
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:95
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:100
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:105
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:110
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:120
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:125
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:130
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:138
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:143
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:148
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:154
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:91
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:96
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:101
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:106
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:111
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:121
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:126
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:131
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:139
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:144
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:149
|
||||
LineBreakpoint created at smartStepIntoInterfaceImpl.kt:155
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoInterfaceImpl.kt:90
|
||||
smartStepIntoInterfaceImpl.kt:95
|
||||
smartStepIntoInterfaceImpl.kt:8
|
||||
smartStepIntoInterfaceImpl.kt:100
|
||||
smartStepIntoInterfaceImpl.kt:13
|
||||
smartStepIntoInterfaceImpl.kt:105
|
||||
smartStepIntoInterfaceImpl.kt:13
|
||||
smartStepIntoInterfaceImpl.kt:110
|
||||
smartStepIntoInterfaceImpl.kt:18
|
||||
smartStepIntoInterfaceImpl.kt:120
|
||||
smartStepIntoInterfaceImpl.kt:22
|
||||
smartStepIntoInterfaceImpl.kt:125
|
||||
smartStepIntoInterfaceImpl.kt:36
|
||||
smartStepIntoInterfaceImpl.kt:130
|
||||
smartStepIntoInterfaceImpl.kt:41
|
||||
smartStepIntoInterfaceImpl.kt:138
|
||||
MyJavaClass.java:17
|
||||
smartStepIntoInterfaceImpl.kt:143
|
||||
smartStepIntoInterfaceImpl.kt:59
|
||||
smartStepIntoInterfaceImpl.kt:148
|
||||
smartStepIntoInterfaceImpl.kt:64
|
||||
smartStepIntoInterfaceImpl.kt:154
|
||||
smartStepIntoInterfaceImpl.kt:70
|
||||
smartStepIntoInterfaceImpl.kt:91
|
||||
smartStepIntoInterfaceImpl.kt:96
|
||||
smartStepIntoInterfaceImpl.kt:9
|
||||
smartStepIntoInterfaceImpl.kt:101
|
||||
smartStepIntoInterfaceImpl.kt:14
|
||||
smartStepIntoInterfaceImpl.kt:106
|
||||
smartStepIntoInterfaceImpl.kt:14
|
||||
smartStepIntoInterfaceImpl.kt:111
|
||||
smartStepIntoInterfaceImpl.kt:19
|
||||
smartStepIntoInterfaceImpl.kt:121
|
||||
smartStepIntoInterfaceImpl.kt:23
|
||||
smartStepIntoInterfaceImpl.kt:126
|
||||
smartStepIntoInterfaceImpl.kt:37
|
||||
smartStepIntoInterfaceImpl.kt:131
|
||||
smartStepIntoInterfaceImpl.kt:42
|
||||
smartStepIntoInterfaceImpl.kt:139
|
||||
MyJavaClass.java:10
|
||||
smartStepIntoInterfaceImpl.kt:144
|
||||
smartStepIntoInterfaceImpl.kt:60
|
||||
smartStepIntoInterfaceImpl.kt:149
|
||||
smartStepIntoInterfaceImpl.kt:65
|
||||
smartStepIntoInterfaceImpl.kt:155
|
||||
smartStepIntoInterfaceImpl.kt:71
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+13
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: stepIntoStdlibInlineFun2step.kt
|
||||
package stepIntoStdlibInlineFun2step
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -5,4 +6,15 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: functionInLibrary.kt:public inline fun simpleFun()
|
||||
// STEP_INTO: 5
|
||||
// STEP_INTO: 5
|
||||
|
||||
// FILE: customLib/functionInLibrary/functionInLibrary.kt
|
||||
package customLib.functionInLibrary
|
||||
|
||||
public inline fun simpleFun() {
|
||||
nextFun()
|
||||
}
|
||||
|
||||
public inline fun nextFun() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
Vendored
+5
-5
@@ -1,11 +1,11 @@
|
||||
LineBreakpoint created at functionInLibrary.kt:4
|
||||
LineBreakpoint created at functionInLibrary.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
functionInLibrary.kt:4
|
||||
functionInLibrary.kt:8
|
||||
functionInLibrary.kt:9
|
||||
functionInLibrary.kt:5
|
||||
stepIntoStdlibInlineFun2step.kt:5
|
||||
functionInLibrary.kt:9
|
||||
functionInLibrary.kt:10
|
||||
functionInLibrary.kt:6
|
||||
stepIntoStdlibInlineFun2step.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+2
-2
@@ -2,8 +2,8 @@ LineBreakpoint created at stepOutInlineFunctionStdlib.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
stepOutInlineFunctionStdlib.kt:6
|
||||
stepOutInlineFunctionStdlib.kt:1
|
||||
Thread.!EXT!
|
||||
_Collections.!EXT!
|
||||
stepOutInlineFunctionStdlib.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Reference in New Issue
Block a user