Fix lines for FieldBreakpoints in tests

This commit is contained in:
Natalia Ukhorskaya
2015-10-27 10:38:08 +03:00
parent 17a564495d
commit c071bf5c63
9 changed files with 66 additions and 58 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
KotlinFieldBreakpoint created at fwAbstractProperty.kt:5
KotlinFieldBreakpoint created at fwAbstractProperty.kt:8
KotlinFieldBreakpoint created at fwAbstractProperty.kt:42
KotlinFieldBreakpoint created at fwAbstractProperty.kt:45
KotlinFieldBreakpoint created at fwAbstractProperty.kt:6
KotlinFieldBreakpoint created at fwAbstractProperty.kt:9
KotlinFieldBreakpoint created at fwAbstractProperty.kt:43
KotlinFieldBreakpoint created at fwAbstractProperty.kt:46
!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! fwAbstractProperty.FwAbstractPropertyKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fwAbstractProperty.kt:57
+8 -8
View File
@@ -1,11 +1,11 @@
KotlinFieldBreakpoint created at fwBackingField.kt:4
KotlinFieldBreakpoint created at fwBackingField.kt:7
KotlinFieldBreakpoint created at fwBackingField.kt:17
KotlinFieldBreakpoint created at fwBackingField.kt:20
KotlinFieldBreakpoint created at fwBackingField.kt:30
KotlinFieldBreakpoint created at fwBackingField.kt:32
KotlinFieldBreakpoint created at fwBackingField.kt:44
KotlinFieldBreakpoint created at fwBackingField.kt:47
KotlinFieldBreakpoint created at fwBackingField.kt:5
KotlinFieldBreakpoint created at fwBackingField.kt:8
KotlinFieldBreakpoint created at fwBackingField.kt:18
KotlinFieldBreakpoint created at fwBackingField.kt:21
KotlinFieldBreakpoint created at fwBackingField.kt:31
KotlinFieldBreakpoint created at fwBackingField.kt:33
KotlinFieldBreakpoint created at fwBackingField.kt:45
KotlinFieldBreakpoint created at fwBackingField.kt:48
!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! fwBackingField.FwBackingFieldKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fwBackingField.kt:18
+3 -3
View File
@@ -1,6 +1,6 @@
KotlinFieldBreakpoint created at fwInitializer.kt:11
KotlinFieldBreakpoint created at fwInitializer.kt:16
KotlinFieldBreakpoint created at fwInitializer.kt:20
KotlinFieldBreakpoint created at fwInitializer.kt:12
KotlinFieldBreakpoint created at fwInitializer.kt:17
KotlinFieldBreakpoint created at fwInitializer.kt:21
!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! fwInitializer.FwInitializerKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fwInitializer.kt:12
@@ -1,7 +1,7 @@
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:5
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:8
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:42
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:45
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:6
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:9
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:43
KotlinFieldBreakpoint created at fwPropertyInInterface.kt:46
!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! fwPropertyInInterface.FwPropertyInInterfaceKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fwPropertyInInterface.kt:57
@@ -1,25 +1,16 @@
LineBreakpoint created at withoutBodyProperties.kt:8
LineBreakpoint created at withoutBodyProperties.kt:13
LineBreakpoint created at withoutBodyProperties.kt:18
LineBreakpoint created at withoutBodyProperties.kt:23
LineBreakpoint created at withoutBodyProperties.kt:28
LineBreakpoint created at withoutBodyProperties.kt:36
LineBreakpoint created at withoutBodyProperties.kt:43
KotlinFieldBreakpoint created at withoutBodyProperties.kt:8
KotlinFieldBreakpoint created at withoutBodyProperties.kt:13
LineBreakpoint created at withoutBodyProperties.kt:21
KotlinFieldBreakpoint created at withoutBodyProperties.kt:28
!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! withoutBodyProperties.WithoutBodyPropertiesKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
withoutBodyProperties.kt:8
Compile bytecode for 1 + 1
withoutBodyProperties.kt:13
Compile bytecode for 1 + 2
withoutBodyProperties.kt:18
Compile bytecode for 1 + 3
withoutBodyProperties.kt:23
Compile bytecode for 1 + 4
withoutBodyProperties.kt:28
Compile bytecode for 1 + 5
withoutBodyProperties.kt:36
withoutBodyProperties.kt:21
Compile bytecode for i
withoutBodyProperties.kt:43
withoutBodyProperties.kt:28
Compile bytecode for 1 + 6
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
@@ -0,0 +1,11 @@
KotlinFieldBreakpoint created at withoutBodyProperties2.kt:8
KotlinFieldBreakpoint created at withoutBodyProperties2.kt:13
!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! withoutBodyProperties2.WithoutBodyProperties2Kt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
withoutBodyProperties2.kt:8
Compile bytecode for 1 + 4
withoutBodyProperties2.kt:13
Compile bytecode for 1 + 5
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -4,29 +4,14 @@ import kotlin.properties.Delegates
// EXPRESSION: 1 + 1
// RESULT: 2: I
//Breakpoint!
//FieldWatchpoint! (a)
val a = 1
// EXPRESSION: 1 + 2
// RESULT: 3: I
//Breakpoint!
var aDelegate: Int by Delegates.notNull()
// EXPRESSION: 1 + 3
// RESULT: 4: I
//Breakpoint!
//FieldWatchpoint! (aLambda)
val aLambda = { 1 + 1 }
// EXPRESSION: 1 + 4
// RESULT: 5: I
//Breakpoint!
val aWoBody: Int get() = 1
// EXPRESSION: 1 + 5
// RESULT: 6: I
//Breakpoint!
val aWoBody2: Int get() { return 1 }
class A {
init {
// EXPRESSION: i
@@ -39,7 +24,7 @@ class A {
// EXPRESSION: 1 + 6
// RESULT: 7: I
//Breakpoint!
//FieldWatchpoint! (prop)
val prop = 1
fun test()= prop
@@ -47,10 +32,11 @@ class A {
fun main(args: Array<String>) {
a
aDelegate = 1
aLambda
aWoBody
aWoBody2
A().test()
}
}
// WATCH_FIELD_INITIALISATION: true
// WATCH_FIELD_ACCESS: false
// WATCH_FIELD_MODIFICATION: false
@@ -0,0 +1,21 @@
package withoutBodyProperties2
import kotlin.properties.Delegates
// EXPRESSION: 1 + 4
// RESULT: 5: I
//FieldWatchpoint! (aWoBody)
val aWoBody: Int get() = 1
// EXPRESSION: 1 + 5
// RESULT: 6: I
//FieldWatchpoint! (aWoBody2)
val aWoBody2: Int get() { return 1 }
fun main(args: Array<String>) {
aWoBody
aWoBody2
}
// WATCH_FIELD_ACCESS: true
// WATCH_FIELD_MODIFICATION: false
@@ -42,7 +42,6 @@ import com.intellij.xdebugger.breakpoints.XBreakpoint
import com.intellij.xdebugger.breakpoints.XBreakpointProperties
import com.intellij.xdebugger.breakpoints.XBreakpointType
import com.intellij.xdebugger.breakpoints.XLineBreakpointType
import com.sun.jdi.request.StepRequest
import org.jetbrains.kotlin.idea.core.refactoring.getLineNumber
import org.jetbrains.kotlin.idea.debugger.breakpoints.KotlinFieldBreakpoint
import org.jetbrains.kotlin.idea.debugger.breakpoints.KotlinFieldBreakpointType
@@ -304,7 +303,7 @@ abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() {
javaBreakpoint.setWatchModification(fileText.getValueForSetting("WATCH_FIELD_MODIFICATION", true))
javaBreakpoint.setWatchInitialization(fileText.getValueForSetting("WATCH_FIELD_INITIALISATION", false))
BreakpointManager.addBreakpoint(javaBreakpoint)
println("KotlinFieldBreakpoint created at ${file.getVirtualFile().getName()}:$lineIndex", ProcessOutputTypes.SYSTEM)
println("KotlinFieldBreakpoint created at ${file.getVirtualFile().getName()}:${lineIndex + 1}", ProcessOutputTypes.SYSTEM)
}
}
}