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:
+15
@@ -1,3 +1,4 @@
|
||||
// FILE: javaFun.kt
|
||||
package javaFun
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -7,3 +8,17 @@ fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
klass.testFun()
|
||||
}
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
public class MyJavaClass {
|
||||
public void testFun() {
|
||||
int i = 1;
|
||||
}
|
||||
|
||||
public MyJavaClass() {}
|
||||
}
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
LineBreakpoint created at javaFun.kt:8
|
||||
LineBreakpoint created at javaFun.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
javaFun.kt:8
|
||||
MyJavaClass.java:8
|
||||
javaFun.kt:9
|
||||
MyJavaClass.java:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepIntoAndSmartStepInto/javaSamConstructor.kt
Vendored
+9
@@ -1,3 +1,4 @@
|
||||
// FILE: javaSamConstructor.kt
|
||||
package javaSamConstructor
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -5,4 +6,12 @@ import forTests.MyJavaClass
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
MyJavaClass { /* do nothing*/ }
|
||||
}
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
public class MyJavaClass {
|
||||
public MyJavaClass() {}
|
||||
public MyJavaClass(Runnable runnable) {}
|
||||
}
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
LineBreakpoint created at javaSamConstructor.kt:7
|
||||
LineBreakpoint created at javaSamConstructor.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
javaSamConstructor.kt:7
|
||||
MyJavaClass.java:61
|
||||
javaSamConstructor.kt:8
|
||||
MyJavaClass.java:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+12
@@ -1,3 +1,4 @@
|
||||
// FILE: javaSamFunction.kt
|
||||
package javaSamFunction
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -6,4 +7,15 @@ fun main(args: Array<String>) {
|
||||
val klass = MyJavaClass()
|
||||
//Breakpoint!
|
||||
klass.other { /* do nothing*/ }
|
||||
}
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
public class MyJavaClass {
|
||||
public void other(Runnable runnable) {
|
||||
runnable.run();
|
||||
}
|
||||
|
||||
public MyJavaClass() {}
|
||||
}
|
||||
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at javaSamFunction.kt:8
|
||||
LineBreakpoint created at javaSamFunction.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
javaSamFunction.kt:8
|
||||
MyJavaClass.java:55
|
||||
resuming javaSamFunction.kt:8
|
||||
javaSamFunction.kt:9
|
||||
MyJavaClass.java:6
|
||||
resuming javaSamFunction.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+11
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: kotlinSamFunction.kt
|
||||
package kotlinSamFunction
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -12,4 +13,13 @@ fun main(args: Array<String>) {
|
||||
val klass = KotlinSubclass()
|
||||
//Breakpoint!
|
||||
klass.other { /* do nothing*/ }
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
public class MyJavaClass {
|
||||
public void other(Runnable runnable) {
|
||||
runnable.run();
|
||||
}
|
||||
}
|
||||
|
||||
idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepIntoAndSmartStepInto/kotlinSamFunction.out
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at kotlinSamFunction.kt:14
|
||||
LineBreakpoint created at kotlinSamFunction.kt:15
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kotlinSamFunction.kt:14
|
||||
kotlinSamFunction.kt:7
|
||||
resuming kotlinSamFunction.kt:14
|
||||
kotlinSamFunction.kt:15
|
||||
kotlinSamFunction.kt:8
|
||||
resuming kotlinSamFunction.kt:15
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Reference in New Issue
Block a user