Update stepping tests to inspect source name, instead of method info.

This commit is contained in:
Jinseong Jeon
2020-03-13 14:55:01 -07:00
committed by max-kammerer
parent 5dc1651a44
commit b71b0fa32c
13 changed files with 125 additions and 124 deletions
+5 -5
View File
@@ -9,8 +9,8 @@ fun box() {
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():5 // test.kt:5
// TestKt.cond():2 // test.kt:2
// TestKt.box():5 // test.kt:5
// TestKt.box():8 // test.kt:8
// TestKt.box():9 // test.kt:9
+10 -10
View File
@@ -11,13 +11,13 @@ fun f(block: () -> Unit) {
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.f(kotlin.jvm.functions.Function0):10 // test.kt:10
// TestKt$box$1.invoke():5 // test.kt:5
// TestKt$box$1.invoke():6 // test.kt:6
// TestKt$box$1.invoke():-1 // test.kt:-1
// TestKt$box$1.invoke():-1 // test.kt:-1
// TestKt.f(kotlin.jvm.functions.Function0):10 // test.kt:10
// TestKt.f(kotlin.jvm.functions.Function0):11 // test.kt:11
// TestKt.box():7 // test.kt:7
+12 -12
View File
@@ -19,15 +19,15 @@ fun getC() = false
fun getD() = true fun getD() = true
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.getA():13 // test.kt:13
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.getB():15 // test.kt:15
// TestKt.box():4 // test.kt:4
// TestKt.box():5 // test.kt:5
// TestKt.getC():17 // test.kt:17
// TestKt.box():5 // test.kt:5
// TestKt.box():9 // test.kt:9
// TestKt.box():3 // test.kt:3
// TestKt.box():11 // test.kt:11
+11 -11
View File
@@ -8,14 +8,14 @@ fun box() {
inline fun foo(n: Int) {} inline fun foo(n: Int) {}
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.box():8 // test.kt:8
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.box():8 // test.kt:8
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.box():8 // test.kt:8
// TestKt.box():3 // test.kt:3
// TestKt.box():6 // test.kt:6
+12 -12
View File
@@ -21,15 +21,15 @@ fun bar(x: Int) =
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():4 // test.kt:4
// FooKt.foo(int):4 // foo.kt:4
// FooKt.foo(int):7 // foo.kt:7
// TestKt.bar(int):8 // test.kt:8
// TestKt.bar(int):9 // test.kt:9
// FooKt.foo(int):4 // foo.kt:4
// FooKt.foo(int):5 // foo.kt:5
// TestKt.bar(int):9 // test.kt:9
// TestKt.bar(int):12 // test.kt:12
// FooKt.foo(int):7 // foo.kt:7
// TestKt.box():4 // test.kt:4
// TestKt.box():5 // test.kt:5
+8 -8
View File
@@ -14,11 +14,11 @@ inline fun getB(): Int {
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():4 // test.kt:4
// TestKt.box():13 // test.kt:13
// TestKt.box():5 // test.kt:5
// TestKt.getA():10 // test.kt:10
// TestKt.box():5 // test.kt:5
// TestKt.box():7 // test.kt:7
// TestKt.box():13 // test.kt:13
// TestKt.box():7 // test.kt:7
@@ -11,10 +11,10 @@ inline fun f(block: () -> Unit) {
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.box():10 // test.kt:10
// TestKt.box():5 // test.kt:5
// TestKt.box():6 // test.kt:6
// TestKt.box():11 // test.kt:11
// TestKt.box():7 // test.kt:7
@@ -11,10 +11,10 @@ inline fun f(block: () -> Unit) {
fun g() {} fun g() {}
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.box():8 // test.kt:8
// TestKt.box():4 // test.kt:4
// TestKt.g():11 // test.kt:11
// TestKt.box():9 // test.kt:9
// TestKt.box():5 // test.kt:5
+10 -10
View File
@@ -11,13 +11,13 @@ fun f(block: () -> Unit) {
fun g() {} fun g() {}
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.f(kotlin.jvm.functions.Function0):8 // test.kt:8
// TestKt.g():11 // test.kt:11
// TestKt$box$1.invoke():4 // test.kt:4
// TestKt$box$1.invoke():-1 // test.kt:-1
// TestKt$box$1.invoke():-1 // test.kt:-1
// TestKt.f(kotlin.jvm.functions.Function0):8 // test.kt:8
// TestKt.f(kotlin.jvm.functions.Function0):9 // test.kt:9
// TestKt.box():5 // test.kt:5
+19 -19
View File
@@ -42,22 +42,22 @@ inline fun html(init: () -> Unit) {
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():19 // test.kt:19
// TestKt.box():7 // test.kt:7
// TestKt.box():9 // test.kt:9
// TestKt.box():18 // 1.kt:18
// TestKt.box():6 // 1.kt:6
// TestKt.box():10 // test.kt:10
// TestKt.box():14 // 1.kt:14
// TestKt.box():10 // 1.kt:10
// TestKt.box():11 // 1.kt:11
// TestKt.box():11 // test.kt:11
// TestKt.box():12 // test.kt:12
// TestKt.box():12 // 1.kt:12
// TestKt.box():14 // 1.kt:14
// TestKt.box():13 // test.kt:13
// TestKt.box():7 // 1.kt:7
// TestKt.box():18 // 1.kt:18
// TestKt.box():15 // test.kt:15
// TestKt.box():19 // test.kt:19
// TestKt.box():21 // test.kt:21
+12 -12
View File
@@ -12,15 +12,15 @@ fun foo(n :Int ) : Int {
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.foo(int):8 // test.kt:8
// TestKt.foo(int):11 // test.kt:11
// TestKt.foo(int):8 // test.kt:8
// TestKt.foo(int):11 // test.kt:11
// TestKt.foo(int):8 // test.kt:8
// TestKt.foo(int):9 // test.kt:9
// TestKt.foo(int):11 // test.kt:11
// TestKt.foo(int):11 // test.kt:11
// TestKt.box():4 // test.kt:4
// TestKt.box():5 // test.kt:5
+10 -10
View File
@@ -15,13 +15,13 @@ fun throwIfLess(a: Int, b: Int) {
throw java.lang.IllegalStateException() throw java.lang.IllegalStateException()
} }
// LINENUMBERS // LINENUMBERS
// TestKt.box():3 // test.kt:3
// TestKt.box():4 // test.kt:4
// TestKt.box():5 // test.kt:5
// TestKt.box():6 // test.kt:6
// TestKt.throwIfLess(int, int):14 // test.kt:14
// TestKt.throwIfLess(int, int):15 // test.kt:15
// TestKt.box():7 // test.kt:7
// TestKt.box():8 // test.kt:8
// TestKt.throwIfLess(int, int):14 // test.kt:14
// TestKt.throwIfLess(int, int):15 // test.kt:15
@@ -56,7 +56,8 @@ abstract class AbstractSteppingTest : AbstractDebugTest() {
.joinToString("\n") .joinToString("\n")
val actualLineNumbers = loggedItems val actualLineNumbers = loggedItems
.map { event -> .map { event ->
"${(event as LocatableEvent).location().method()}:${event.location().lineNumber()}" val location = (event as LocatableEvent).location()
"${location.sourceName()}:${location.lineNumber()}"
} }
TestCase.assertEquals(expectedLineNumbers, actualLineNumbers.joinToString("\n")) TestCase.assertEquals(expectedLineNumbers, actualLineNumbers.joinToString("\n"))
} }