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:
Vendored
+44
@@ -1,3 +1,4 @@
|
||||
// FILE: text.kt
|
||||
package isInsideInlineLambda
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -73,3 +74,46 @@ class A {
|
||||
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint5:(1)
|
||||
// EXPRESSION: it + 15
|
||||
// RESULT: 20: I
|
||||
|
||||
// FILE: isInsideInlineLambdaInLibrary.kt
|
||||
package isInsideInlineLambdaInLibrary
|
||||
|
||||
public fun test() {
|
||||
val a = A()
|
||||
//Breakpoint1
|
||||
a.foo(1) { 1 }
|
||||
|
||||
// inside other lambda
|
||||
a.foo(100) {
|
||||
//Breakpoint2
|
||||
a.foo(2) { 1 }
|
||||
1
|
||||
}
|
||||
|
||||
// inside variable declaration
|
||||
//Breakpoint3
|
||||
val x = a.foo(3) { 1 }
|
||||
|
||||
// inside object declaration
|
||||
val y = object {
|
||||
fun foo() {
|
||||
//Breakpoint4
|
||||
a.foo(4) { 1 }
|
||||
}
|
||||
}
|
||||
y.foo()
|
||||
|
||||
// inside local function
|
||||
fun local() {
|
||||
//Breakpoint5
|
||||
a.foo(5) { 1 }
|
||||
}
|
||||
local()
|
||||
}
|
||||
|
||||
class A {
|
||||
inline fun foo(i: Int, f: (i: Int) -> Int): A {
|
||||
f(i)
|
||||
return this
|
||||
}
|
||||
}
|
||||
idea/jvm-debugger/jvm-debugger-test/testData/evaluation/multipleBreakpoints/isInsideInlineLambda.out
Vendored
+20
-20
@@ -1,34 +1,34 @@
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:6 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:11 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:17 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:23 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:31 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:9 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:17 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:25 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:33 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:43 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:7 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:12 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:18 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:24 lambdaOrdinal = 1
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:32 lambdaOrdinal = 1
|
||||
LineBreakpoint created at text.kt:10 lambdaOrdinal = 1
|
||||
LineBreakpoint created at text.kt:18 lambdaOrdinal = 1
|
||||
LineBreakpoint created at text.kt:26 lambdaOrdinal = 1
|
||||
LineBreakpoint created at text.kt:34 lambdaOrdinal = 1
|
||||
LineBreakpoint created at text.kt:44 lambdaOrdinal = 1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
isInsideInlineLambda.kt:9
|
||||
text.kt:10
|
||||
Compile bytecode for it + 1
|
||||
isInsideInlineLambda.kt:17
|
||||
text.kt:18
|
||||
Compile bytecode for it + 2
|
||||
isInsideInlineLambda.kt:25
|
||||
text.kt:26
|
||||
Compile bytecode for it + 3
|
||||
isInsideInlineLambda.kt:33
|
||||
text.kt:34
|
||||
Compile bytecode for it + 4
|
||||
isInsideInlineLambda.kt:43
|
||||
text.kt:44
|
||||
Compile bytecode for it + 5
|
||||
isInsideInlineLambdaInLibrary.kt:6
|
||||
isInsideInlineLambdaInLibrary.kt:7
|
||||
Compile bytecode for it + 11
|
||||
isInsideInlineLambdaInLibrary.kt:11
|
||||
isInsideInlineLambdaInLibrary.kt:12
|
||||
Compile bytecode for it + 12
|
||||
isInsideInlineLambdaInLibrary.kt:17
|
||||
isInsideInlineLambdaInLibrary.kt:18
|
||||
Compile bytecode for it + 13
|
||||
isInsideInlineLambdaInLibrary.kt:23
|
||||
isInsideInlineLambdaInLibrary.kt:24
|
||||
Compile bytecode for it + 14
|
||||
isInsideInlineLambdaInLibrary.kt:31
|
||||
isInsideInlineLambdaInLibrary.kt:32
|
||||
Compile bytecode for it + 15
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+85
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: customLibClassName.kt
|
||||
package customLibClassName
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -26,4 +27,87 @@ fun main(args: Array<String>) {
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: simpleLibFile.kt:public fun foo() {
|
||||
// EXPRESSION: 1 + 5
|
||||
// RESULT: 6: I
|
||||
// RESULT: 6: I
|
||||
|
||||
// FILE: lib/oneFunSameClassName/1/a1.kt
|
||||
@file:JvmName("SameNameOneFunSameFileName")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.oneFunSameClassName
|
||||
|
||||
public fun oneFunSameFileNameFun(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/oneFunSameClassName/2/a2.kt
|
||||
@file:JvmName("SameNameOneFunSameFileName")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.oneFunSameClassName
|
||||
|
||||
public fun oneFunSameFileNameFun2(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/twoFunDifferentSignature/1/a1.kt
|
||||
@file:JvmName("SameNameTwoFunDifferentSignature")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.twoFunDifferentSignature
|
||||
|
||||
public fun twoFunDifferentSignatureFun(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/twoFunDifferentSignature/2/a2.kt
|
||||
@file:JvmName("SameNameTwoFunDifferentSignature")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.twoFunDifferentSignature
|
||||
|
||||
public fun twoFunDifferentSignatureFun(i: Int): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/breakpointOnLocalProperty/1/a1.kt
|
||||
@file:JvmName("SameNameBreakpointOnLocalProperty")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.breakpointOnLocalProperty
|
||||
|
||||
public fun breakpointOnLocalPropertyFun(): Int {
|
||||
val a = 1
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/breakpointOnLocalProperty/2/a2.kt
|
||||
@file:JvmName("SameNameBreakpointOnLocalProperty")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.breakpointOnLocalProperty
|
||||
|
||||
public fun breakpointOnLocalPropertyFun2(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/property/1/a1.kt
|
||||
@file:JvmName("SameNameProperty")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.property
|
||||
|
||||
public val foo: Int =
|
||||
1
|
||||
|
||||
// FILE: lib/property/2/a2.kt
|
||||
@file:JvmName("SameNameProperty")
|
||||
@file:JvmMultifileClass
|
||||
package customLib.property
|
||||
|
||||
public fun someFun(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// FILE: lib/simpleLibFile/simpleLibFile.kt
|
||||
package customLib.simpleLibFile
|
||||
|
||||
public fun foo() {
|
||||
1 + 1
|
||||
}
|
||||
|
||||
class B {
|
||||
public var prop: Int = 1
|
||||
}
|
||||
+10
-10
@@ -1,19 +1,19 @@
|
||||
LineBreakpoint created at a1.kt:6
|
||||
LineBreakpoint created at a1.kt:6
|
||||
LineBreakpoint created at a1.kt:6
|
||||
LineBreakpoint created at a1.kt:6
|
||||
LineBreakpoint created at simpleLibFile.kt:4
|
||||
LineBreakpoint created at a1.kt:7
|
||||
LineBreakpoint created at a1.kt:7
|
||||
LineBreakpoint created at a1.kt:7
|
||||
LineBreakpoint created at a1.kt:7
|
||||
LineBreakpoint created at simpleLibFile.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
a1.kt:6
|
||||
a1.kt:7
|
||||
Compile bytecode for 1 + 1
|
||||
a1.kt:6
|
||||
a1.kt:7
|
||||
Compile bytecode for 1 + 2
|
||||
a1.kt:6
|
||||
a1.kt:7
|
||||
Compile bytecode for 1 + 3
|
||||
a1.kt:6
|
||||
a1.kt:7
|
||||
Compile bytecode for 1 + 4
|
||||
simpleLibFile.kt:4
|
||||
simpleLibFile.kt:5
|
||||
Compile bytecode for 1 + 5
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+10
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: test.kt
|
||||
package localFunInLibrary
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -6,4 +7,12 @@ fun main(args: Array<String>) {
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: localFunCustomLib.kt:localFunInLibraryCustomLibProperty
|
||||
// EXPRESSION: localFun()
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: localFunCustomLib.kt
|
||||
package customLib.localFunInLibraryCustomLib
|
||||
|
||||
public fun localFunInLibraryCustomLibMainFun() {
|
||||
fun localFun() = 1
|
||||
val localFunInLibraryCustomLibProperty = 1
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at localFunCustomLib.kt:6
|
||||
LineBreakpoint created at localFunCustomLib.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
localFunCustomLib.kt:6
|
||||
localFunCustomLib.kt:7
|
||||
Compile bytecode for localFun()
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
Vendored
+17
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: breakpointInInlineFun.kt
|
||||
package breakpointInInlineFun
|
||||
|
||||
import customLib.inlineFunInLibrary.*
|
||||
@@ -9,4 +10,19 @@ fun main(args: Array<String>) {
|
||||
// RESUME: 2
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: inlineFunInLibrary.kt:public inline fun inlineFun
|
||||
// ADDITIONAL_BREAKPOINT: inlineFunInLibrary.kt: Breakpoint 2
|
||||
// ADDITIONAL_BREAKPOINT: inlineFunInLibrary.kt: Breakpoint 2
|
||||
|
||||
// FILE: customLib/inlineFunInLibrary/inlineFunInLibrary.kt
|
||||
package customLib.inlineFunInLibrary
|
||||
|
||||
public inline fun inlineFun(f: () -> Unit) {
|
||||
1 + 1
|
||||
inlineFunInner {
|
||||
1 + 1
|
||||
}
|
||||
}
|
||||
|
||||
public inline fun inlineFunInner(f: () -> Unit) {
|
||||
// Breakpoint 2
|
||||
1 + 1
|
||||
}
|
||||
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at inlineFunInLibrary.kt:4
|
||||
LineBreakpoint created at inlineFunInLibrary.kt:12
|
||||
LineBreakpoint created at inlineFunInLibrary.kt:5
|
||||
LineBreakpoint created at inlineFunInLibrary.kt:13
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineFunInLibrary.kt:4
|
||||
inlineFunInLibrary.kt:12
|
||||
inlineFunInLibrary.kt:5
|
||||
inlineFunInLibrary.kt:13
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+5
@@ -1,3 +1,4 @@
|
||||
// FILE: classFromAnotherPackage.kt
|
||||
package classFromAnotherPackage
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -12,3 +13,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
// EXPRESSION: forTests.MyJavaClass()
|
||||
// RESULT: instance of forTests.MyJavaClass(id=ID): LforTests/MyJavaClass;
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
public class MyJavaClass {}
|
||||
idea/jvm-debugger/jvm-debugger-test/testData/evaluation/singleBreakpoint/classFromAnotherPackage.out
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at classFromAnotherPackage.kt:7
|
||||
LineBreakpoint created at classFromAnotherPackage.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
classFromAnotherPackage.kt:7
|
||||
classFromAnotherPackage.kt:8
|
||||
Compile bytecode for MyJavaClass()
|
||||
Compile bytecode for forTests.MyJavaClass()
|
||||
Disconnected from the target VM
|
||||
|
||||
+26
@@ -1,3 +1,4 @@
|
||||
// FILE: createExpressionWithArray.kt
|
||||
package createExpressionWithArray
|
||||
|
||||
import forTests.MyJavaClass
|
||||
@@ -13,3 +14,28 @@ fun main(args: Array<String>) {
|
||||
|
||||
// PRINT_FRAME
|
||||
// DESCRIPTOR_VIEW_OPTIONS: NAME_EXPRESSION_RESULT
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
public class MyJavaClass {
|
||||
public static class BaseClass {
|
||||
public final int i2 = 1;
|
||||
}
|
||||
|
||||
public BaseClass getBaseClassValue() {
|
||||
return new BaseClass();
|
||||
}
|
||||
public BaseClass getInnerClassValue() {
|
||||
return new InnerClass();
|
||||
}
|
||||
|
||||
public static class InnerClass extends BaseClass {
|
||||
public final int i = 1;
|
||||
}
|
||||
|
||||
public MyJavaClass() {}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at createExpressionWithArray.kt:11
|
||||
LineBreakpoint created at createExpressionWithArray.kt:12
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
createExpressionWithArray.kt:11
|
||||
createExpressionWithArray.kt:12
|
||||
Compile bytecode for args
|
||||
Compile bytecode for baseArray
|
||||
Compile bytecode for baseArray[0]
|
||||
|
||||
+14
@@ -1,3 +1,4 @@
|
||||
// FILE: delegatedPropertyInOtherFile.kt
|
||||
package delegatedPropertyInOtherFile
|
||||
|
||||
import delegatedPropertyInOtherFileOther.*
|
||||
@@ -11,3 +12,16 @@ fun main(a: Array<String>) {
|
||||
|
||||
// EXPRESSION: t.a
|
||||
// RESULT: 12: I
|
||||
|
||||
// FILE: delegatedPropertyInOtherFile/delegatedPropertyInOtherFile2.kt
|
||||
package delegatedPropertyInOtherFileOther
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class WithDelegate {
|
||||
val a: Int by Id(12)
|
||||
}
|
||||
|
||||
class Id(val v: Int) {
|
||||
operator fun getValue(o: Any, property: KProperty<*>): Int = v
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at delegatedPropertyInOtherFile.kt:9
|
||||
LineBreakpoint created at delegatedPropertyInOtherFile.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
delegatedPropertyInOtherFile.kt:9
|
||||
delegatedPropertyInOtherFile.kt:10
|
||||
Compile bytecode for t.a
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
-1
@@ -2,7 +2,6 @@ LineBreakpoint created at evDelegatedProperty.kt:13
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
evDelegatedProperty.kt:13
|
||||
Compile bytecode for a.prop
|
||||
frame = main:13, EvDelegatedPropertyKt {evDelegatedProperty}
|
||||
local = args: java.lang.String[] = {java.lang.String[0]@uniqueID} (sp = evDelegatedProperty.kt, 9)
|
||||
local = a: evDelegatedProperty.A = {evDelegatedProperty.A@uniqueID} (sp = evDelegatedProperty.kt, 10)
|
||||
|
||||
+80
-3
@@ -1,3 +1,4 @@
|
||||
// FILE: fieldGetters.kt
|
||||
package fieldGetters
|
||||
|
||||
import forTests.FieldsGetters
|
||||
@@ -30,8 +31,6 @@ class K2 {
|
||||
// EXPRESSION: K2().a_field
|
||||
// RESULT: 0: I
|
||||
|
||||
|
||||
|
||||
// EXPRESSION: PublicField().foo
|
||||
// RESULT: "a": Ljava/lang/String;
|
||||
|
||||
@@ -102,4 +101,82 @@ class K2 {
|
||||
// RESULT: "a": Ljava/lang/String;
|
||||
|
||||
// EXPRESSION: PublicFieldAndGetterInParent().foo_field
|
||||
// RESULT: "b": Ljava/lang/String;
|
||||
// RESULT: "b": Ljava/lang/String;
|
||||
|
||||
// FILE: forTests/FieldsGetters.java
|
||||
package forTests;
|
||||
|
||||
public class FieldsGetters {
|
||||
public static class PublicField {
|
||||
public String foo = "a";
|
||||
}
|
||||
|
||||
public static class PackagePrivateField {
|
||||
String foo = "b";
|
||||
}
|
||||
|
||||
public static class ProtectedField {
|
||||
protected String foo = "c";
|
||||
}
|
||||
|
||||
public static class PrivateField {
|
||||
private String foo = "d";
|
||||
}
|
||||
|
||||
public static class PublicFieldGetter {
|
||||
public final String foo = "a";
|
||||
|
||||
public String getFoo() {
|
||||
return "b";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PrivateFieldPublicGetter {
|
||||
private final String foo = "c";
|
||||
|
||||
public String getFoo() {
|
||||
return "d";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PrivateFieldPrivateGetter {
|
||||
private final String foo = "e";
|
||||
|
||||
public String getFoo() {
|
||||
return "f";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PublicGetter1 extends PublicField {
|
||||
public String getFoo() {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PublicGetter2 extends PackagePrivateField {
|
||||
public String getFoo() {
|
||||
return "h";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PrivateGetter1 extends PrivateField {
|
||||
private String getFoo() {
|
||||
return "g";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PublicGetterOnly {
|
||||
public String getFoo() {
|
||||
return "a";
|
||||
}
|
||||
}
|
||||
|
||||
public static class PublicFieldAndGetterInParent extends PublicGetterOnly {
|
||||
public String foo = "b";
|
||||
}
|
||||
|
||||
public abstract class AbstractGetter {
|
||||
public String foo = "c";
|
||||
public abstract String getFoo();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at fieldGetters.kt:8
|
||||
LineBreakpoint created at fieldGetters.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
fieldGetters.kt:8
|
||||
fieldGetters.kt:9
|
||||
Compile bytecode for K1().a
|
||||
Compile bytecode for K1().a_field
|
||||
Compile bytecode for K2().a
|
||||
|
||||
+15
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: fileWithError.kt
|
||||
package fileWithError
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -8,4 +9,17 @@ fun main(args: Array<String>) {
|
||||
// ADDITIONAL_BREAKPOINT: fileWithInternal.kt:Breakpoint
|
||||
|
||||
// EXPRESSION: 1
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: lib/fileWithInternal.kt
|
||||
package fileWithInternal
|
||||
|
||||
fun test() {
|
||||
// Breakpoint
|
||||
val a = fileWithInternal2.MyInternal()
|
||||
}
|
||||
|
||||
// FILE: lib/fileWithInternal2.kt
|
||||
package fileWithInternal2
|
||||
|
||||
internal class MyInternal
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at fileWithInternal.kt:5
|
||||
LineBreakpoint created at fileWithInternal.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
fileWithInternal.kt:5
|
||||
fileWithInternal.kt:6
|
||||
Compile bytecode for 1
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+7
@@ -1,3 +1,4 @@
|
||||
// FILE: inlineFunInMultiFilePackage.kt
|
||||
package inlineFunInMultiFilePackage
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -8,3 +9,9 @@ fun main(args: Array<String>) {
|
||||
// EXPRESSION: multiFilePackage.foo { 1 }
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: multiFilePackage.kt
|
||||
@file:JvmMultifileClass
|
||||
@file:JvmName("NewName")
|
||||
package multiFilePackage
|
||||
|
||||
inline fun foo(f: () -> Int) = f()
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at inlineFunInMultiFilePackage.kt:5
|
||||
LineBreakpoint created at inlineFunInMultiFilePackage.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineFunInMultiFilePackage.kt:5
|
||||
inlineFunInMultiFilePackage.kt:6
|
||||
Compile bytecode for multiFilePackage.foo { 1 }
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+12
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: inlineFunction.kt
|
||||
package inlineFunction
|
||||
|
||||
import inlineFunctionOtherPackage.*
|
||||
@@ -13,4 +14,14 @@ inline fun foo() = 1
|
||||
// RESULT: 1: I
|
||||
|
||||
// EXPRESSION: foo()
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: lib.kt
|
||||
package inlineFunctionOtherPackage
|
||||
|
||||
inline fun myFun(f: () -> Int): Int = f()
|
||||
|
||||
val String.prop: String
|
||||
get() {
|
||||
return "a"
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at inlineFunction.kt:7
|
||||
LineBreakpoint created at inlineFunction.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineFunction.kt:7
|
||||
inlineFunction.kt:8
|
||||
Compile bytecode for myFun { 1 }
|
||||
Compile bytecode for foo()
|
||||
Disconnected from the target VM
|
||||
|
||||
+9
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: test.kt
|
||||
package inlineFunctionBreakpointAnotherFile
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -10,4 +11,11 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: inlineFunctionWithBreakpoint.kt:inline fun myFun
|
||||
// ADDITIONAL_BREAKPOINT: inlineFunctionWithBreakpoint.kt:inline fun myFun
|
||||
|
||||
// FILE: inlineFunctionWithBreakpoint.kt
|
||||
package inlineFunctionWithBreakpoint
|
||||
|
||||
inline fun myFun(f: (Int) -> Unit) {
|
||||
f(1)
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at inlineFunctionWithBreakpoint.kt:4
|
||||
LineBreakpoint created at inlineFunctionWithBreakpoint.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineFunctionWithBreakpoint.kt:4
|
||||
inlineFunctionWithBreakpoint.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Vendored
+18
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: jcBlock.kt
|
||||
package jcBlock
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -16,4 +17,20 @@ fun main(args: Array<String>) {
|
||||
// RESULT: 1: I
|
||||
|
||||
// EXPRESSION: elseVal
|
||||
// RESULT: Unresolved reference: elseVal
|
||||
// RESULT: Unresolved reference: elseVal
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
public class JavaClass {
|
||||
public void block() {
|
||||
int bodyVal = 1;
|
||||
if (true) {
|
||||
int thenVal = 1;
|
||||
int breakpoint = 1;
|
||||
}
|
||||
else {
|
||||
int elseVal = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+5
-5
@@ -1,10 +1,10 @@
|
||||
LineBreakpoint created at jcBlock.kt:6
|
||||
LineBreakpoint created at jcBlock.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
jcBlock.kt:6
|
||||
JavaClass.java:16
|
||||
JavaClass.java:18
|
||||
JavaClass.java:19
|
||||
jcBlock.kt:7
|
||||
JavaClass.java:6
|
||||
JavaClass.java:8
|
||||
JavaClass.java:9
|
||||
Compile bytecode for bodyVal
|
||||
Compile bytecode for thenVal
|
||||
Disconnected from the target VM
|
||||
|
||||
Vendored
+21
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: jcImports.kt
|
||||
package jcImports
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -10,4 +11,23 @@ fun main(args: Array<String>) {
|
||||
// STEP_OVER: 1
|
||||
|
||||
// EXPRESSION: list.filter { it == 1 }.size
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class JavaClass {
|
||||
public void imports() {
|
||||
ArrayList<Integer> list = createList();
|
||||
int breakpoint = 1;
|
||||
}
|
||||
|
||||
private ArrayList<Integer> createList() {
|
||||
ArrayList<Integer> list = new ArrayList<Integer>();
|
||||
list.add(1);
|
||||
list.add(2);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at jcImports.kt:6
|
||||
LineBreakpoint created at jcImports.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
jcImports.kt:6
|
||||
JavaClass.java:27
|
||||
JavaClass.java:28
|
||||
jcImports.kt:7
|
||||
JavaClass.java:8
|
||||
JavaClass.java:9
|
||||
Compile bytecode for list.filter { it == 1 }.size
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+12
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: jcLocalVariable.kt
|
||||
package jcLocalVariable
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -10,4 +11,14 @@ fun main(args: Array<String>) {
|
||||
// STEP_OVER: 1
|
||||
|
||||
// EXPRESSION: i
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
public class JavaClass {
|
||||
public void localVariable() {
|
||||
int i = 1;
|
||||
int breakpoint = 1;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at jcLocalVariable.kt:6
|
||||
LineBreakpoint created at jcLocalVariable.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
jcLocalVariable.kt:6
|
||||
JavaClass.java:11
|
||||
JavaClass.java:12
|
||||
jcLocalVariable.kt:7
|
||||
JavaClass.java:6
|
||||
JavaClass.java:7
|
||||
Compile bytecode for i
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+12
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: test.kt
|
||||
package jcMarkedObject
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -15,4 +16,14 @@ fun main(args: Array<String>) {
|
||||
// EXPRESSION: i_DebugLabel
|
||||
// RESULT: instance of java.lang.Integer(id=ID): Ljava/lang/Integer;
|
||||
|
||||
// DEBUG_LABEL: i = i
|
||||
// DEBUG_LABEL: i = i
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
public class JavaClass {
|
||||
public void markObject() {
|
||||
Integer i = 1;
|
||||
int breakpoint = 1;
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
LineBreakpoint created at jcMarkedObject.kt:6
|
||||
LineBreakpoint created at test.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
jcMarkedObject.kt:6
|
||||
JavaClass.java:39
|
||||
JavaClass.java:40
|
||||
test.kt:7
|
||||
JavaClass.java:6
|
||||
JavaClass.java:7
|
||||
Compile bytecode for i
|
||||
Compile bytecode for i_DebugLabel
|
||||
Disconnected from the target VM
|
||||
|
||||
Vendored
+14
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: test.kt
|
||||
package jcProperty
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -15,4 +16,16 @@ fun main(args: Array<String>) {
|
||||
// RESULT: 1: I
|
||||
|
||||
// EXPRESSION: javaPrivateProperty
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
public class JavaClass {
|
||||
public int javaProperty = 1;
|
||||
private int javaPrivateProperty = 1;
|
||||
|
||||
public void property() {
|
||||
int breakpoint = 1;
|
||||
}
|
||||
}
|
||||
Vendored
+3
-3
@@ -1,8 +1,8 @@
|
||||
LineBreakpoint created at jcProperty.kt:6
|
||||
LineBreakpoint created at test.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
jcProperty.kt:6
|
||||
JavaClass.java:47
|
||||
test.kt:7
|
||||
JavaClass.java:9
|
||||
Compile bytecode for this.javaProperty
|
||||
Compile bytecode for javaProperty
|
||||
Compile bytecode for javaPrivateProperty
|
||||
|
||||
Vendored
+11
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: jcSimple.kt
|
||||
package jcSimple
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -9,4 +10,13 @@ fun main(args: Array<String>) {
|
||||
// STEP_INTO: 1
|
||||
|
||||
// EXPRESSION: 1 + 1
|
||||
// RESULT: 2: I
|
||||
// RESULT: 2: I
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
public class JavaClass {
|
||||
public void simple() {
|
||||
int breakpoint = 1;
|
||||
}
|
||||
}
|
||||
Vendored
+3
-3
@@ -1,8 +1,8 @@
|
||||
LineBreakpoint created at jcSimple.kt:6
|
||||
LineBreakpoint created at jcSimple.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
jcSimple.kt:6
|
||||
JavaClass.java:7
|
||||
jcSimple.kt:7
|
||||
JavaClass.java:6
|
||||
Compile bytecode for 1 + 1
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
Vendored
+10
@@ -1,3 +1,4 @@
|
||||
// FILE: javaStaticMethods.kt
|
||||
package javaStaticMethods
|
||||
|
||||
import forTests.javaContext.JavaClass.JavaStatic
|
||||
@@ -9,3 +10,12 @@ fun main() {
|
||||
|
||||
// EXPRESSION: JavaStatic.state()
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: forTests/javaContext/JavaClass.java
|
||||
package forTests.javaContext;
|
||||
|
||||
public class JavaClass {
|
||||
public interface JavaStatic {
|
||||
static int state() { return 1; }
|
||||
}
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at javaStaticMethods.kt:7
|
||||
LineBreakpoint created at javaStaticMethods.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
javaStaticMethods.kt:7
|
||||
javaStaticMethods.kt:8
|
||||
Compile bytecode for JavaStatic.state()
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
+13
@@ -1,3 +1,4 @@
|
||||
// FILE: privateClass.kt
|
||||
package privateClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -32,3 +33,15 @@ class A {
|
||||
|
||||
// EXPRESSION: forTests.MyJavaClass.PrivateJavaClass().prop
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
public class MyJavaClass {
|
||||
private static class PrivateJavaClass {
|
||||
public final int prop = 1;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at privateClass.kt:5
|
||||
LineBreakpoint created at privateClass.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
privateClass.kt:5
|
||||
privateClass.kt:6
|
||||
Compile bytecode for A.PrivateClass()
|
||||
Compile bytecode for A.PrivateClass().prop
|
||||
Compile bytecode for A().PrivateInnerClass()
|
||||
|
||||
Vendored
+20
-1
@@ -1,3 +1,4 @@
|
||||
// FILE: rawTypeskt11831.kt
|
||||
package rawTypeskt11831
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
@@ -8,4 +9,22 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
// EXPRESSION: foo
|
||||
// RESULT: 1: I
|
||||
// RESULT: 1: I
|
||||
|
||||
// FILE: forTests/MyJavaClass.java
|
||||
package forTests;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
public class MyJavaClass {
|
||||
public static class RawA<T> {
|
||||
public int foo(List<T> p) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public static class RawADerived extends RawA {
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
LineBreakpoint created at rawTypeskt11831.kt:7
|
||||
LineBreakpoint created at rawTypeskt11831.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
rawTypeskt11831.kt:7
|
||||
rawTypeskt11831.kt:8
|
||||
Compile bytecode for foo
|
||||
Disconnected from the target VM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user