[JVM] Port line number tests to stepping framework.
Allow specifying JVM and JVM_IR as well as shared expectations. Add the method name to the step. Discard steps in synthetic methods.
This commit is contained in:
+6
-6
@@ -1,4 +1,4 @@
|
|||||||
//FILE: test.kt
|
// FILE: test.kt
|
||||||
fun cond() = false
|
fun cond() = false
|
||||||
|
|
||||||
fun box() {
|
fun box() {
|
||||||
@@ -9,8 +9,8 @@ fun box() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:2
|
// test.kt:2 cond
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
{
|
||||||
|
"OK"
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:5 invoke
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:7 box
|
||||||
+14
-14
@@ -30,17 +30,17 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:24
|
// test.kt:24 box
|
||||||
// test.kt:15
|
// test.kt:15 box
|
||||||
// test.kt:16
|
// test.kt:16 box
|
||||||
// test.kt:3
|
// test.kt:3 getMASSERTIONS_ENABLED
|
||||||
// test.kt:16
|
// test.kt:16 box
|
||||||
// test.kt:17
|
// test.kt:17 box
|
||||||
// test.kt:21
|
// test.kt:21 box
|
||||||
// test.kt:25
|
// test.kt:25 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:3
|
// test.kt:3 getMASSERTIONS_ENABLED
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
// test.kt:12
|
// test.kt:12 box
|
||||||
// test.kt:29
|
// test.kt:29 box
|
||||||
|
|||||||
+8
-10
@@ -11,13 +11,11 @@ fun f(block: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:10
|
// test.kt:10 f
|
||||||
// test.kt:5
|
// test.kt:5 invoke
|
||||||
// test.kt:6
|
// test.kt:6 invoke
|
||||||
// test.kt:-1
|
// test.kt:10 f
|
||||||
// test.kt:-1
|
// test.kt:11 f
|
||||||
// test.kt:10
|
// test.kt:7 box
|
||||||
// test.kt:11
|
|
||||||
// test.kt:7
|
|
||||||
|
|||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
class A {
|
||||||
|
val prop = 1
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
prop
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
val a = A()
|
||||||
|
a.prop
|
||||||
|
a.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: The JVM_IR backend has an extra line number on the return. This causes line
|
||||||
|
// three to be hit both on entry to the constructor and on exit after storing the
|
||||||
|
// value of prop.
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:3 <init>
|
||||||
|
// test.kt:4 <init>
|
||||||
|
// LINENUMBERS JVM_IR
|
||||||
|
// test.kt:3 <init>
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:13 box
|
||||||
|
// test.kt:4 getProp
|
||||||
|
// test.kt:13 box
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:7 foo
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:15 box
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
class A {
|
||||||
|
companion object {
|
||||||
|
val prop0 = 1
|
||||||
|
val prop1 = 2
|
||||||
|
fun foo(): Int {
|
||||||
|
return prop0 + prop1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
A.prop0
|
||||||
|
A.prop1
|
||||||
|
A.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// The JVM version hits get getProp line numbers twice. That appears
|
||||||
|
// to be because the synthetic accessibility bridges (access$getProp0$cp)
|
||||||
|
// have line numbers (of the start of the surrounding class) in the JVM
|
||||||
|
// version and they do not have line numbers in the JVM_IR version.
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:5 getProp0
|
||||||
|
// LINENUMBERS JVM
|
||||||
|
// test.kt:5 getProp0
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:15 box
|
||||||
|
// test.kt:6 getProp1
|
||||||
|
// LINENUMBERS JVM
|
||||||
|
// test.kt:6 getProp1
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:15 box
|
||||||
|
// test.kt:16 box
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:5 getProp0
|
||||||
|
// LINENUMBERS JVM
|
||||||
|
// test.kt:5 getProp0
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:6 getProp1
|
||||||
|
// LINENUMBERS JVM
|
||||||
|
// test.kt:6 getProp1
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:16 box
|
||||||
|
// test.kt:17 box
|
||||||
+13
-13
@@ -1,4 +1,4 @@
|
|||||||
//FILE: test.kt
|
// FILE: test.kt
|
||||||
fun box() {
|
fun box() {
|
||||||
val k = if (getA()
|
val k = if (getA()
|
||||||
&& getB()
|
&& getB()
|
||||||
@@ -19,15 +19,15 @@ fun getC() = false
|
|||||||
fun getD() = true
|
fun getD() = true
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:13
|
// test.kt:13 getA
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:15
|
// test.kt:15 getB
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:17
|
// test.kt:17 getC
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:11
|
// test.kt:11 box
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
class A {
|
||||||
|
fun computeParam() = 32
|
||||||
|
|
||||||
|
fun foo(param: Int = computeParam()) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
A().foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FORCE_STEP_INTO
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:3 <init>
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:6 foo$default (synthetic)
|
||||||
|
// test.kt:4 computeParam
|
||||||
|
// test.kt:6 foo$default (synthetic)
|
||||||
|
// test.kt:7 foo
|
||||||
|
// test.kt:6 foo$default (synthetic)
|
||||||
|
// test.kt:12 box
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
enum class E {
|
||||||
|
E1;
|
||||||
|
|
||||||
|
fun foo() = {
|
||||||
|
prop
|
||||||
|
}
|
||||||
|
|
||||||
|
val prop = 22
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
E.E1.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:6 foo
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:15 box
|
||||||
+12
-12
@@ -1,4 +1,4 @@
|
|||||||
//FILE: test.kt
|
// FILE: test.kt
|
||||||
fun box() {
|
fun box() {
|
||||||
for (i in 1..3) {
|
for (i in 1..3) {
|
||||||
foo(i)
|
foo(i)
|
||||||
@@ -8,14 +8,14 @@ fun box() {
|
|||||||
inline fun foo(n: Int) {}
|
inline fun foo(n: Int) {}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
|
|||||||
+13
-13
@@ -1,4 +1,4 @@
|
|||||||
//FILE: foo.kt
|
// FILE: foo.kt
|
||||||
import bar
|
import bar
|
||||||
fun foo(x: Int): Int {
|
fun foo(x: Int): Int {
|
||||||
if (x >= 0) { // 4
|
if (x >= 0) { // 4
|
||||||
@@ -21,15 +21,15 @@ fun bar(x: Int) =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// foo.kt:4
|
// foo.kt:4 foo
|
||||||
// foo.kt:7
|
// foo.kt:7 foo
|
||||||
// test.kt:8
|
// test.kt:8 bar
|
||||||
// test.kt:9
|
// test.kt:9 bar
|
||||||
// foo.kt:4
|
// foo.kt:4 foo
|
||||||
// foo.kt:5
|
// foo.kt:5 foo
|
||||||
// test.kt:9
|
// test.kt:9 bar
|
||||||
// test.kt:12
|
// test.kt:12 bar
|
||||||
// foo.kt:7
|
// foo.kt:7 foo
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
|
|||||||
+9
-9
@@ -1,4 +1,4 @@
|
|||||||
//FILE: test.kt
|
// FILE: test.kt
|
||||||
fun box(): Int {
|
fun box(): Int {
|
||||||
if (
|
if (
|
||||||
getB() ==
|
getB() ==
|
||||||
@@ -14,11 +14,11 @@ inline fun getB(): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:13
|
// test.kt:13 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:10
|
// test.kt:10 getA
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
// test.kt:13
|
// test.kt:13 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
|
|||||||
+39
@@ -0,0 +1,39 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun foo(x: Int) {
|
||||||
|
if (x > 0) {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x > 0) else {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x > 0) {
|
||||||
|
"OK"
|
||||||
|
} else {
|
||||||
|
"ALSO OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
foo(1)
|
||||||
|
foo(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:20 box
|
||||||
|
// test.kt:4 foo
|
||||||
|
// test.kt:5 foo
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:12 foo
|
||||||
|
// test.kt:13 foo
|
||||||
|
// test.kt:17 foo
|
||||||
|
// test.kt:21 box
|
||||||
|
// test.kt:4 foo
|
||||||
|
// test.kt:8 foo
|
||||||
|
// test.kt:9 foo
|
||||||
|
// test.kt:12 foo
|
||||||
|
// test.kt:15 foo
|
||||||
|
// test.kt:17 foo
|
||||||
|
// test.kt:22 box
|
||||||
+18
-18
@@ -27,21 +27,21 @@ fun box() {
|
|||||||
// that is the actual evaluation order.
|
// that is the actual evaluation order.
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
// test.kt:10
|
// test.kt:10 box
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
// test.kt:11
|
// test.kt:11 box
|
||||||
// test.kt:13
|
// test.kt:13 box
|
||||||
// test.kt:12
|
// test.kt:12 box
|
||||||
// test.kt:15
|
// test.kt:15 box
|
||||||
// test.kt:16
|
// test.kt:16 box
|
||||||
// test.kt:15
|
// test.kt:15 box
|
||||||
// test.kt:14
|
// test.kt:14 box
|
||||||
// test.kt:17
|
// test.kt:17 box
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ inline fun f(block: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:10
|
// test.kt:10 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:11
|
// test.kt:11 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ inline fun f(block: () -> Unit) {
|
|||||||
fun g() {}
|
fun g() {}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:11
|
// test.kt:11 g
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
inline fun inlineFun(s: () -> Unit) {
|
||||||
|
s()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
inlineFun ({
|
||||||
|
1
|
||||||
|
})
|
||||||
|
|
||||||
|
inlineFun {
|
||||||
|
2
|
||||||
|
}
|
||||||
|
|
||||||
|
inlineFun {
|
||||||
|
3
|
||||||
|
|
||||||
|
inlineFun {
|
||||||
|
4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 box
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:9 box
|
||||||
|
// test.kt:10 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:13 box
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:16 box
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:17 box
|
||||||
|
// test.kt:19 box
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:20 box
|
||||||
|
// test.kt:21 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:22 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:23 box
|
||||||
+8
-8
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
|
|
||||||
inline fun foo(stringMaker: () -> String): String {
|
inline fun foo(stringMaker: () -> String): String {
|
||||||
return stringMaker()
|
return stringMaker()
|
||||||
}
|
}
|
||||||
@@ -14,10 +14,10 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:10
|
// test.kt:10 box
|
||||||
// test.kt:13
|
// test.kt:13 box
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ fun box(): String {
|
|||||||
// test.kt:17
|
// test.kt:17
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:15
|
// test.kt:15 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:16
|
// test.kt:16 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
// test.kt:11
|
// test.kt:11 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:17
|
// test.kt:17 box
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun normalFunction() {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun inlineFunction() {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test1() {
|
||||||
|
inlineFunction()
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test2() {
|
||||||
|
normalFunction()
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
test1()
|
||||||
|
test2()
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:22 box
|
||||||
|
// test.kt:12 test1
|
||||||
|
// test.kt:8 test1
|
||||||
|
// test.kt:9 test1
|
||||||
|
// test.kt:13 test1
|
||||||
|
// test.kt:14 test1
|
||||||
|
// test.kt:23 box
|
||||||
|
// test.kt:17 test2
|
||||||
|
// test.kt:4 normalFunction
|
||||||
|
// test.kt:5 normalFunction
|
||||||
|
// test.kt:18 test2
|
||||||
|
// test.kt:19 test2
|
||||||
|
// test.kt:24 box
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
"OK"
|
||||||
|
fun bar() {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
"OK"
|
||||||
|
bar()
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:4 box
|
||||||
|
// LINENUMBERS JVM
|
||||||
|
// test.kt:5 box
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 box
|
||||||
|
// test.kt:9 box
|
||||||
|
// LINENUMBERS JVM
|
||||||
|
// test.kt:6 invoke
|
||||||
|
// test.kt:7 invoke
|
||||||
|
// LINENUMBERS JVM_IR
|
||||||
|
// test.kt:6 box$bar
|
||||||
|
// test.kt:7 box$bar
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:10 box
|
||||||
|
// test.kt:11 box
|
||||||
+8
-10
@@ -11,13 +11,11 @@ fun f(block: () -> Unit) {
|
|||||||
fun g() {}
|
fun g() {}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 f
|
||||||
// test.kt:11
|
// test.kt:11 g
|
||||||
// test.kt:4
|
// test.kt:4 invoke
|
||||||
// test.kt:-1
|
// test.kt:8 f
|
||||||
// test.kt:-1
|
// test.kt:9 f
|
||||||
// test.kt:8
|
// test.kt:5 box
|
||||||
// test.kt:9
|
|
||||||
// test.kt:5
|
|
||||||
|
|||||||
+19
-19
@@ -42,22 +42,22 @@ inline fun html(init: () -> Unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:19
|
// test.kt:19 box
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
// test.kt:9
|
// test.kt:9 box
|
||||||
// 1.kt:18
|
// 1.kt:18 box
|
||||||
// 1.kt:6
|
// 1.kt:6 box
|
||||||
// test.kt:10
|
// test.kt:10 box
|
||||||
// 1.kt:14
|
// 1.kt:14 box
|
||||||
// 1.kt:10
|
// 1.kt:10 box
|
||||||
// 1.kt:11
|
// 1.kt:11 box
|
||||||
// test.kt:11
|
// test.kt:11 box
|
||||||
// test.kt:12
|
// test.kt:12 box
|
||||||
// 1.kt:12
|
// 1.kt:12 box
|
||||||
// 1.kt:14
|
// 1.kt:14 box
|
||||||
// test.kt:13
|
// test.kt:13 box
|
||||||
// 1.kt:7
|
// 1.kt:7 box
|
||||||
// 1.kt:18
|
// 1.kt:18 box
|
||||||
// test.kt:15
|
// test.kt:15 box
|
||||||
// test.kt:19
|
// test.kt:19 box
|
||||||
// test.kt:21
|
// test.kt:21 box
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
class A {
|
||||||
|
val prop : Int
|
||||||
|
get() {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
A().prop
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:3 <init>
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:6 getProp
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:12 box
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
args[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
main(arrayOf("OK"))
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 box
|
||||||
|
// test.kt:4 main
|
||||||
|
// test.kt:5 main
|
||||||
|
// test.kt:9 box
|
||||||
+13
-13
@@ -1,4 +1,4 @@
|
|||||||
//FILE: test.kt
|
// FILE: test.kt
|
||||||
fun box() {
|
fun box() {
|
||||||
val n = 3
|
val n = 3
|
||||||
val k = foo(n)
|
val k = foo(n)
|
||||||
@@ -12,15 +12,15 @@ fun foo(n :Int ) : Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 foo
|
||||||
// test.kt:11
|
// test.kt:11 foo
|
||||||
// test.kt:8
|
// test.kt:8 foo
|
||||||
// test.kt:11
|
// test.kt:11 foo
|
||||||
// test.kt:8
|
// test.kt:8 foo
|
||||||
// test.kt:9
|
// test.kt:9 foo
|
||||||
// test.kt:11
|
// test.kt:11 foo
|
||||||
// test.kt:11
|
// test.kt:11 foo
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
|
|||||||
+7
-6
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
|
|
||||||
fun ifoo(ok: String = "OK"): String {
|
fun ifoo(ok: String = "OK"): String {
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
@@ -8,9 +8,10 @@ fun box(): String {
|
|||||||
return ifoo()
|
return ifoo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FORCE_STEP_INTO
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:3
|
// test.kt:3 ifoo$default (synthetic)
|
||||||
// test.kt:4
|
// test.kt:4 ifoo
|
||||||
// test.kt:3
|
// test.kt:3 ifoo$default (synthetic)
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
@@ -9,7 +9,7 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
// TODO: IR Backend behaves like simpleDefaultArg: 8,3,4, _3_ ,8
|
// TODO: IR Backend behaves like simpleDefaultArg: 8,3,4, _3_ ,8
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
@@ -11,8 +11,8 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:10
|
// test.kt:10 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:10
|
// test.kt:10 box
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
inline fun inlineFun(s: () -> Unit) {
|
||||||
|
s()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
inlineFun {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 box
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:9 box
|
||||||
|
// test.kt:10 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:11 box
|
||||||
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
//FILE: test.kt
|
// FILE: test.kt
|
||||||
fun box() {
|
fun box() {
|
||||||
val a = 1
|
val a = 1
|
||||||
val b = 2
|
val b = 2
|
||||||
@@ -15,13 +15,13 @@ fun throwIfLess(a: Int, b: Int) {
|
|||||||
throw java.lang.IllegalStateException()
|
throw java.lang.IllegalStateException()
|
||||||
}
|
}
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:3
|
// test.kt:3 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:14
|
// test.kt:14 throwIfLess
|
||||||
// test.kt:15
|
// test.kt:15 throwIfLess
|
||||||
// test.kt:7
|
// test.kt:7 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
// test.kt:14
|
// test.kt:14 throwIfLess
|
||||||
// test.kt:15
|
// test.kt:15 throwIfLess
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun foo() = prop
|
||||||
|
|
||||||
|
val prop = 1
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:8 box
|
||||||
|
// test.kt:3 foo
|
||||||
|
// test.kt:8 box
|
||||||
|
// test.kt:9 box
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
interface A {
|
||||||
|
fun foo() = 32
|
||||||
|
|
||||||
|
fun bar(): Int {
|
||||||
|
return foo()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
(object : A {}).bar()
|
||||||
|
}
|
||||||
|
|
||||||
|
// The JVM backend generates non-synthetic overrides of foo and bar
|
||||||
|
// in the object both with line number 12. That means that there will
|
||||||
|
// be steps on line number 12 on entry and exit to both bar and foo.
|
||||||
|
|
||||||
|
// TODO: Is this what we want? Should they be marked as bridges instead?
|
||||||
|
// Doesn't look like the intellij debugger skips non-synthetic bridges?
|
||||||
|
// There seems to be some heuristics in intellij dealing with this as
|
||||||
|
// the stepping behavior with repeated step-into is mostly OK.
|
||||||
|
|
||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// The JVM_IR backend generates non-synthetic overrides of foo and bar
|
||||||
|
// with no line numbers. That leads to steps on line -1 but only on
|
||||||
|
// exit from bar and foo.
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:12 <init>
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:12 bar
|
||||||
|
// test.kt:7 bar
|
||||||
|
// test.kt:12 foo
|
||||||
|
// test.kt:4 foo
|
||||||
|
// test.kt:12 foo
|
||||||
|
// test.kt:7 bar
|
||||||
|
// test.kt:12 bar
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:13 box
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun foo(shouldThrow: Boolean) {
|
||||||
|
try {
|
||||||
|
if (shouldThrow) throw Exception()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
foo(false)
|
||||||
|
foo(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:13 box
|
||||||
|
// test.kt:4 foo
|
||||||
|
// test.kt:5 foo
|
||||||
|
// test.kt:9 foo
|
||||||
|
// test.kt:10 foo
|
||||||
|
// test.kt:14 box
|
||||||
|
// test.kt:4 foo
|
||||||
|
// test.kt:5 foo
|
||||||
|
// test.kt:6 foo
|
||||||
|
// test.kt:7 foo
|
||||||
|
// test.kt:9 foo
|
||||||
|
// test.kt:10 foo
|
||||||
|
// test.kt:15 box
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
// FILE: test.kt
|
// FILE: test.kt
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
run { "O" + "K" }
|
run { "O" + "K" }
|
||||||
run {
|
run {
|
||||||
@@ -9,10 +9,10 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LINENUMBERS
|
// LINENUMBERS
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// fake.kt:1
|
// fake.kt:1 box
|
||||||
// test.kt:4
|
// test.kt:4 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:6
|
// test.kt:6 box
|
||||||
// test.kt:5
|
// test.kt:5 box
|
||||||
// test.kt:8
|
// test.kt:8 box
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
// FILE: test.kt
|
||||||
|
|
||||||
|
fun box() {
|
||||||
|
var x = 2
|
||||||
|
while (--x > 0) {
|
||||||
|
"OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
x = 2
|
||||||
|
do {
|
||||||
|
"OK"
|
||||||
|
} while (--x > 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// LINENUMBERS
|
||||||
|
// test.kt:4 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:6 box
|
||||||
|
// test.kt:5 box
|
||||||
|
// test.kt:9 box
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:11 box
|
||||||
|
// test.kt:12 box
|
||||||
|
// test.kt:13 box
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
fun foo() {
|
|
||||||
{
|
|
||||||
test.lineNumber()
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
class A {
|
|
||||||
val prop = test.lineNumber()
|
|
||||||
|
|
||||||
fun foo() {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
class A {
|
|
||||||
companion object {
|
|
||||||
val prop = test.lineNumber()
|
|
||||||
|
|
||||||
fun foo(): Int {
|
|
||||||
return test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
class A {
|
|
||||||
fun foo(param: Int = test.lineNumber()) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
enum class E {
|
|
||||||
E1;
|
|
||||||
|
|
||||||
fun foo() = {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
|
|
||||||
val prop = test.lineNumber()
|
|
||||||
}
|
|
||||||
Vendored
-5
@@ -1,5 +0,0 @@
|
|||||||
fun foo() {
|
|
||||||
for (i in 0..test.lineNumber()) {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-15
@@ -1,15 +0,0 @@
|
|||||||
fun foo() {
|
|
||||||
if (test.lineNumber() > 0) {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (test.lineNumber() > 0) else {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (test.lineNumber() > 0) {
|
|
||||||
test.lineNumber()
|
|
||||||
} else {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
inline fun inlineFun(s: () -> Unit) {
|
|
||||||
s()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
|
||||||
inlineFun ({
|
|
||||||
test.lineNumber()
|
|
||||||
})
|
|
||||||
|
|
||||||
inlineFun {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
|
|
||||||
inlineFun {
|
|
||||||
test.lineNumber()
|
|
||||||
|
|
||||||
inlineFun {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
fun normalFunction() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fun inlineFunction() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test1() {
|
|
||||||
inlineFunction()
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test2() {
|
|
||||||
normalFunction()
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
fun foo() {
|
|
||||||
test.lineNumber()
|
|
||||||
fun bar() {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
test.lineNumber()
|
|
||||||
bar()
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
object A {
|
|
||||||
fun foo() = test.lineNumber()
|
|
||||||
|
|
||||||
val prop = test.lineNumber()
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
class A {
|
|
||||||
val prop : Int
|
|
||||||
get() {
|
|
||||||
return test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Vendored
-3
@@ -1,3 +0,0 @@
|
|||||||
fun main(args: Array<String>) {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
inline fun inlineFun(s: () -> Unit) {
|
|
||||||
s()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
|
||||||
inlineFun {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-3
@@ -1,3 +0,0 @@
|
|||||||
fun foo() = test.lineNumber()
|
|
||||||
|
|
||||||
val prop = test.lineNumber()
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
interface A {
|
|
||||||
fun foo() = test.lineNumber()
|
|
||||||
|
|
||||||
fun bar(): Int {
|
|
||||||
return test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-7
@@ -1,7 +0,0 @@
|
|||||||
fun foo() {
|
|
||||||
try {
|
|
||||||
test.lineNumber()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
fun foo() {
|
|
||||||
while (test.lineNumber() > 0) {
|
|
||||||
test.lineNumber()
|
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
|
||||||
test.lineNumber()
|
|
||||||
} while (test.lineNumber() > 0)
|
|
||||||
}
|
|
||||||
+44
-8
@@ -9,6 +9,7 @@ import com.sun.jdi.VirtualMachine
|
|||||||
import com.sun.jdi.event.Event
|
import com.sun.jdi.event.Event
|
||||||
import com.sun.jdi.event.LocatableEvent
|
import com.sun.jdi.event.LocatableEvent
|
||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
|
import org.jetbrains.kotlin.test.TargetBackend
|
||||||
import org.junit.AfterClass
|
import org.junit.AfterClass
|
||||||
import org.junit.BeforeClass
|
import org.junit.BeforeClass
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -19,7 +20,10 @@ abstract class AbstractSteppingTest : AbstractDebugTest() {
|
|||||||
override val proxyPort: Int = Companion.proxyPort
|
override val proxyPort: Int = Companion.proxyPort
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val LINENUMBER_PREFIX = "// LINENUMBERS"
|
const val LINENUMBERS_MARKER = "// LINENUMBERS"
|
||||||
|
const val FORCE_STEP_INTO_MARKER = "// FORCE_STEP_INTO"
|
||||||
|
const val JVM_LINENUMBER_MARKER = "$LINENUMBERS_MARKER JVM"
|
||||||
|
const val JVM_IR_LINENUMBER_MARKER = "$LINENUMBERS_MARKER JVM_IR"
|
||||||
var proxyPort = 0
|
var proxyPort = 0
|
||||||
lateinit var process: Process
|
lateinit var process: Process
|
||||||
lateinit var virtualMachine: VirtualMachine
|
lateinit var virtualMachine: VirtualMachine
|
||||||
@@ -47,17 +51,49 @@ abstract class AbstractSteppingTest : AbstractDebugTest() {
|
|||||||
loggedItems.add(event)
|
loggedItems.add(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class SteppingExpectations(val forceStepInto: Boolean, val lineNumbers: String)
|
||||||
|
|
||||||
|
private fun readExpectations(wholeFile: File): SteppingExpectations {
|
||||||
|
val expected = mutableListOf<String>()
|
||||||
|
val lines = wholeFile.readLines().dropWhile {
|
||||||
|
!it.startsWith(LINENUMBERS_MARKER) && !it.startsWith(FORCE_STEP_INTO_MARKER)
|
||||||
|
}
|
||||||
|
var forceStepInto = false
|
||||||
|
var currentBackend = TargetBackend.ANY
|
||||||
|
for (line in lines) {
|
||||||
|
if (line.trim() == FORCE_STEP_INTO_MARKER) {
|
||||||
|
forceStepInto = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (line.startsWith(LINENUMBERS_MARKER)) {
|
||||||
|
currentBackend = when (line) {
|
||||||
|
LINENUMBERS_MARKER -> TargetBackend.ANY
|
||||||
|
JVM_LINENUMBER_MARKER -> TargetBackend.JVM
|
||||||
|
JVM_IR_LINENUMBER_MARKER -> TargetBackend.JVM_IR
|
||||||
|
else -> error("Expected JVM backend")
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if (currentBackend == TargetBackend.ANY || currentBackend == backend) {
|
||||||
|
expected.add(line.drop(3).trim())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SteppingExpectations(forceStepInto, expected.joinToString("\n"))
|
||||||
|
}
|
||||||
|
|
||||||
override fun checkResult(wholeFile: File, loggedItems: List<Any>) {
|
override fun checkResult(wholeFile: File, loggedItems: List<Any>) {
|
||||||
val expectedLineNumbers = wholeFile
|
val (forceStepInto, expectedLineNumbers) = readExpectations(wholeFile)
|
||||||
.readLines()
|
|
||||||
.dropWhile { !it.startsWith(LINENUMBER_PREFIX) }
|
|
||||||
.drop(1)
|
|
||||||
.map { it.drop(3).trim() }
|
|
||||||
.joinToString("\n")
|
|
||||||
val actualLineNumbers = loggedItems
|
val actualLineNumbers = loggedItems
|
||||||
|
.filter {
|
||||||
|
val location = (it as LocatableEvent).location()
|
||||||
|
// Ignore synthetic code with no line number information
|
||||||
|
// unless force step into behavior is requested.
|
||||||
|
forceStepInto || !location.method().isSynthetic
|
||||||
|
}
|
||||||
.map { event ->
|
.map { event ->
|
||||||
val location = (event as LocatableEvent).location()
|
val location = (event as LocatableEvent).location()
|
||||||
"${location.sourceName()}:${location.lineNumber()}"
|
val synthetic = if (location.method().isSynthetic) " (synthetic)" else ""
|
||||||
|
"${location.sourceName()}:${location.lineNumber()} ${location.method().name()}$synthetic"
|
||||||
}
|
}
|
||||||
TestCase.assertEquals(expectedLineNumbers, actualLineNumbers.joinToString("\n"))
|
TestCase.assertEquals(expectedLineNumbers, actualLineNumbers.joinToString("\n"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,96 +28,6 @@ public class LineNumberTestGenerated extends AbstractLineNumberTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousFunction.kt")
|
|
||||||
public void testAnonymousFunction() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/anonymousFunction.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("class.kt")
|
|
||||||
public void testClass() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/class.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classObject.kt")
|
|
||||||
public void testClassObject() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/classObject.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameter.kt")
|
|
||||||
public void testDefaultParameter() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/defaultParameter.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enum.kt")
|
|
||||||
public void testEnum() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/enum.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("for.kt")
|
|
||||||
public void testFor() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/for.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("if.kt")
|
|
||||||
public void testIf() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/if.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inlineSimpleCall.kt")
|
|
||||||
public void testInlineSimpleCall() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/inlineSimpleCall.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("lineNumberAfterInline.kt")
|
|
||||||
public void testLineNumberAfterInline() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/lineNumberAfterInline.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localFunction.kt")
|
|
||||||
public void testLocalFunction() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/localFunction.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("object.kt")
|
|
||||||
public void testObject() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/object.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("propertyAccessor.kt")
|
|
||||||
public void testPropertyAccessor() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/propertyAccessor.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("psvm.kt")
|
|
||||||
public void testPsvm() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/psvm.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleSmap.kt")
|
|
||||||
public void testSimpleSmap() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/simpleSmap.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevel.kt")
|
|
||||||
public void testTopLevel() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/topLevel.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("trait.kt")
|
|
||||||
public void testTrait() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/trait.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("tryCatch.kt")
|
|
||||||
public void testTryCatch() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/tryCatch.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("while.kt")
|
|
||||||
public void testWhile() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/while.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/lineNumber/custom")
|
@TestMetadata("compiler/testData/lineNumber/custom")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
+96
@@ -31,6 +31,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("anonymousFunction.kt")
|
||||||
|
public void testAnonymousFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/anonymousFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("assertion.kt")
|
@TestMetadata("assertion.kt")
|
||||||
public void testAssertion() throws Exception {
|
public void testAssertion() throws Exception {
|
||||||
@@ -43,12 +49,36 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/callableReference.kt");
|
runTest("compiler/testData/debug/stepping/callableReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("class.kt")
|
||||||
|
public void testClass() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/class.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("classObject.kt")
|
||||||
|
public void testClassObject() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/classObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("conjunction.kt")
|
@TestMetadata("conjunction.kt")
|
||||||
public void testConjunction() throws Exception {
|
public void testConjunction() throws Exception {
|
||||||
runTest("compiler/testData/debug/stepping/conjunction.kt");
|
runTest("compiler/testData/debug/stepping/conjunction.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("defaultParameter.kt")
|
||||||
|
public void testDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/defaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enum.kt")
|
||||||
|
public void testEnum() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/enum.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("for.kt")
|
@TestMetadata("for.kt")
|
||||||
public void testFor() throws Exception {
|
public void testFor() throws Exception {
|
||||||
@@ -67,6 +97,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/if.kt");
|
runTest("compiler/testData/debug/stepping/if.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("if2.kt")
|
||||||
|
public void testIf2() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/if2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("IfTrueThenFalse.kt")
|
@TestMetadata("IfTrueThenFalse.kt")
|
||||||
public void testIfTrueThenFalse() throws Exception {
|
public void testIfTrueThenFalse() throws Exception {
|
||||||
@@ -91,6 +127,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt");
|
runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("inlineSimpleCall.kt")
|
||||||
|
public void testInlineSimpleCall() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/inlineSimpleCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("lambdaStepInline.kt")
|
@TestMetadata("lambdaStepInline.kt")
|
||||||
public void testLambdaStepInline() throws Exception {
|
public void testLambdaStepInline() throws Exception {
|
||||||
@@ -103,6 +145,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt");
|
runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lineNumberAfterInline.kt")
|
||||||
|
public void testLineNumberAfterInline() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/lineNumberAfterInline.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("localFunction.kt")
|
||||||
|
public void testLocalFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/localFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("namedCallableReference.kt")
|
@TestMetadata("namedCallableReference.kt")
|
||||||
public void testNamedCallableReference() throws Exception {
|
public void testNamedCallableReference() throws Exception {
|
||||||
@@ -115,6 +169,18 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/nestedInline.kt");
|
runTest("compiler/testData/debug/stepping/nestedInline.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("propertyAccessor.kt")
|
||||||
|
public void testPropertyAccessor() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/propertyAccessor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("psvm.kt")
|
||||||
|
public void testPsvm() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/psvm.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursion.kt")
|
@TestMetadata("recursion.kt")
|
||||||
public void testRecursion() throws Exception {
|
public void testRecursion() throws Exception {
|
||||||
@@ -139,15 +205,45 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
|
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("simpleSmap.kt")
|
||||||
|
public void testSimpleSmap() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/simpleSmap.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("throwException.kt")
|
@TestMetadata("throwException.kt")
|
||||||
public void testThrowException() throws Exception {
|
public void testThrowException() throws Exception {
|
||||||
runTest("compiler/testData/debug/stepping/throwException.kt");
|
runTest("compiler/testData/debug/stepping/throwException.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("topLevel.kt")
|
||||||
|
public void testTopLevel() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/topLevel.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("trait.kt")
|
||||||
|
public void testTrait() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/trait.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("tryCatch.kt")
|
||||||
|
public void testTryCatch() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/tryCatch.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("voidLambdaStepInline.kt")
|
@TestMetadata("voidLambdaStepInline.kt")
|
||||||
public void testVoidLambdaStepInline() throws Exception {
|
public void testVoidLambdaStepInline() throws Exception {
|
||||||
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
|
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("while.kt")
|
||||||
|
public void testWhile() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/while.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+96
@@ -31,6 +31,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("anonymousFunction.kt")
|
||||||
|
public void testAnonymousFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/anonymousFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("assertion.kt")
|
@TestMetadata("assertion.kt")
|
||||||
public void testAssertion() throws Exception {
|
public void testAssertion() throws Exception {
|
||||||
@@ -43,12 +49,36 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/callableReference.kt");
|
runTest("compiler/testData/debug/stepping/callableReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("class.kt")
|
||||||
|
public void testClass() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/class.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("classObject.kt")
|
||||||
|
public void testClassObject() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/classObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("conjunction.kt")
|
@TestMetadata("conjunction.kt")
|
||||||
public void testConjunction() throws Exception {
|
public void testConjunction() throws Exception {
|
||||||
runTest("compiler/testData/debug/stepping/conjunction.kt");
|
runTest("compiler/testData/debug/stepping/conjunction.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("defaultParameter.kt")
|
||||||
|
public void testDefaultParameter() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/defaultParameter.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enum.kt")
|
||||||
|
public void testEnum() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/enum.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("for.kt")
|
@TestMetadata("for.kt")
|
||||||
public void testFor() throws Exception {
|
public void testFor() throws Exception {
|
||||||
@@ -67,6 +97,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/if.kt");
|
runTest("compiler/testData/debug/stepping/if.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("if2.kt")
|
||||||
|
public void testIf2() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/if2.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("IfTrueThenFalse.kt")
|
@TestMetadata("IfTrueThenFalse.kt")
|
||||||
public void testIfTrueThenFalse() throws Exception {
|
public void testIfTrueThenFalse() throws Exception {
|
||||||
@@ -91,6 +127,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt");
|
runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("inlineSimpleCall.kt")
|
||||||
|
public void testInlineSimpleCall() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/inlineSimpleCall.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("lambdaStepInline.kt")
|
@TestMetadata("lambdaStepInline.kt")
|
||||||
public void testLambdaStepInline() throws Exception {
|
public void testLambdaStepInline() throws Exception {
|
||||||
@@ -103,6 +145,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt");
|
runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("lineNumberAfterInline.kt")
|
||||||
|
public void testLineNumberAfterInline() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/lineNumberAfterInline.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("localFunction.kt")
|
||||||
|
public void testLocalFunction() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/localFunction.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("namedCallableReference.kt")
|
@TestMetadata("namedCallableReference.kt")
|
||||||
public void testNamedCallableReference() throws Exception {
|
public void testNamedCallableReference() throws Exception {
|
||||||
@@ -115,6 +169,18 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/nestedInline.kt");
|
runTest("compiler/testData/debug/stepping/nestedInline.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("propertyAccessor.kt")
|
||||||
|
public void testPropertyAccessor() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/propertyAccessor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("psvm.kt")
|
||||||
|
public void testPsvm() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/psvm.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("recursion.kt")
|
@TestMetadata("recursion.kt")
|
||||||
public void testRecursion() throws Exception {
|
public void testRecursion() throws Exception {
|
||||||
@@ -139,15 +205,45 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
|||||||
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
|
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("simpleSmap.kt")
|
||||||
|
public void testSimpleSmap() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/simpleSmap.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("throwException.kt")
|
@TestMetadata("throwException.kt")
|
||||||
public void testThrowException() throws Exception {
|
public void testThrowException() throws Exception {
|
||||||
runTest("compiler/testData/debug/stepping/throwException.kt");
|
runTest("compiler/testData/debug/stepping/throwException.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("topLevel.kt")
|
||||||
|
public void testTopLevel() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/topLevel.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("trait.kt")
|
||||||
|
public void testTrait() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/trait.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("tryCatch.kt")
|
||||||
|
public void testTryCatch() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/tryCatch.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("voidLambdaStepInline.kt")
|
@TestMetadata("voidLambdaStepInline.kt")
|
||||||
public void testVoidLambdaStepInline() throws Exception {
|
public void testVoidLambdaStepInline() throws Exception {
|
||||||
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
|
runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("while.kt")
|
||||||
|
public void testWhile() throws Exception {
|
||||||
|
runTest("compiler/testData/debug/stepping/while.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-90
@@ -29,96 +29,6 @@ public class IrLineNumberTestGenerated extends AbstractIrLineNumberTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousFunction.kt")
|
|
||||||
public void testAnonymousFunction() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/anonymousFunction.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("class.kt")
|
|
||||||
public void testClass() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/class.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("classObject.kt")
|
|
||||||
public void testClassObject() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/classObject.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("defaultParameter.kt")
|
|
||||||
public void testDefaultParameter() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/defaultParameter.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("enum.kt")
|
|
||||||
public void testEnum() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/enum.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("for.kt")
|
|
||||||
public void testFor() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/for.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("if.kt")
|
|
||||||
public void testIf() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/if.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inlineSimpleCall.kt")
|
|
||||||
public void testInlineSimpleCall() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/inlineSimpleCall.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("lineNumberAfterInline.kt")
|
|
||||||
public void testLineNumberAfterInline() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/lineNumberAfterInline.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("localFunction.kt")
|
|
||||||
public void testLocalFunction() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/localFunction.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("object.kt")
|
|
||||||
public void testObject() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/object.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("propertyAccessor.kt")
|
|
||||||
public void testPropertyAccessor() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/propertyAccessor.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("psvm.kt")
|
|
||||||
public void testPsvm() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/psvm.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("simpleSmap.kt")
|
|
||||||
public void testSimpleSmap() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/simpleSmap.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("topLevel.kt")
|
|
||||||
public void testTopLevel() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/topLevel.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("trait.kt")
|
|
||||||
public void testTrait() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/trait.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("tryCatch.kt")
|
|
||||||
public void testTryCatch() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/tryCatch.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("while.kt")
|
|
||||||
public void testWhile() throws Exception {
|
|
||||||
runTest("compiler/testData/lineNumber/while.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/lineNumber/custom")
|
@TestMetadata("compiler/testData/lineNumber/custom")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user