[K/N][tests] Added a test on stepping through inline arguments
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// KIND: STANDALONE_LLDB
|
||||
// LLDB_TRACE: stepThroughInlineArguments.txt
|
||||
// FILE: main.kt
|
||||
fun bar(x: Int): Int {
|
||||
val res = foo(
|
||||
x * 2,
|
||||
x + 2
|
||||
)
|
||||
return res
|
||||
}
|
||||
|
||||
fun main() {
|
||||
println(bar(42))
|
||||
}
|
||||
|
||||
// FILE: lib.kt
|
||||
inline fun foo(x: Int, y: Int): Int {
|
||||
return x +
|
||||
y
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
> b bar
|
||||
> r
|
||||
> s
|
||||
> bt
|
||||
* thread #1, [..] stop reason = step in
|
||||
* frame #0: [..]`kfun:#bar(x=42){}kotlin.Int at main.kt:6:9
|
||||
frame #1: [..]`kfun:#main(){} at main.kt:13:13
|
||||
frame #2: [..]`Konan_start(args=[..]) at [..]
|
||||
frame #3: [..]
|
||||
frame #4: [..]
|
||||
> s
|
||||
> bt
|
||||
* thread #1, [..] stop reason = step in
|
||||
* frame #0: [..]`kfun:#bar(x=42){}kotlin.Int at main.kt:7:9
|
||||
frame #1: [..]`kfun:#main(){} at main.kt:13:13
|
||||
frame #2: [..]`Konan_start(args=[..]) at [..]
|
||||
frame #3: [..]
|
||||
frame #4: [..]
|
||||
> s
|
||||
> bt
|
||||
* thread #1, [..] stop reason = step in
|
||||
* frame #0: [..]`kfun:#bar(x=42){}kotlin.Int at main.kt:5:15
|
||||
frame #1: [..]`kfun:#main(){} at main.kt:13:13
|
||||
frame #2: [..]`Konan_start(args=[..]) at [..]
|
||||
frame #3: [..]
|
||||
frame #4: [..]
|
||||
> s
|
||||
> bt
|
||||
* thread #1, [..] stop reason = step in
|
||||
frame #0: [..]`kfun:#bar(kotlin.Int){}kotlin.Int [inlined] [..]foo[..] at lib.kt:18:12
|
||||
frame #1: [..]`kfun:#bar(x=42){}kotlin.Int at main.kt:5:15
|
||||
frame #2: [..]`kfun:#main(){} at main.kt:13:13
|
||||
frame #3: [..]`Konan_start(args=[..]) at [..]
|
||||
frame #4: [..]
|
||||
frame #5: [..]
|
||||
> q
|
||||
|
||||
Generated
+6
@@ -122,4 +122,10 @@ public class LldbTestGenerated extends AbstractNativeBlackBoxTest {
|
||||
public void testKt61131() throws Exception {
|
||||
runTest("native/native.tests/testData/lldb/kt61131.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stepThroughInlineArguments.kt")
|
||||
public void testStepThroughInlineArguments() throws Exception {
|
||||
runTest("native/native.tests/testData/lldb/stepThroughInlineArguments.kt");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user