From 6f6c4a10684f14d33b2e22b57a7f9ef77f62069f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 8 Nov 2017 18:54:51 +0300 Subject: [PATCH] [debug] add tests for inspecting of arrays --- .../jetbrains/kotlin/compiletest/LldbTests.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/backend.native/debugger-tests/src/test/kotlin/org/jetbrains/kotlin/compiletest/LldbTests.kt b/backend.native/debugger-tests/src/test/kotlin/org/jetbrains/kotlin/compiletest/LldbTests.kt index 3bb719ce41a..4d9b72967e2 100644 --- a/backend.native/debugger-tests/src/test/kotlin/org/jetbrains/kotlin/compiletest/LldbTests.kt +++ b/backend.native/debugger-tests/src/test/kotlin/org/jetbrains/kotlin/compiletest/LldbTests.kt @@ -73,4 +73,25 @@ class LldbTests { (ObjHeader *) point = Point(x=1, y=2) (ObjHeader *) person = John Doe """) + + @Test + fun `can inspect arrays`() = lldbTest(""" + fun main(args: Array) { + val xs = IntArray(3) + xs[0] = 1 + xs[1] = 2 + xs[2] = 3 + val ys: Array = arrayOfNulls(2) + ys[0] = Point(1, 2) + return + } + + data class Point(val x: Int, val y: Int) + """, """ + > b main.kt:8 + > r + > fr var + (ObjHeader *) xs = [1, 2, 3] + (ObjHeader *) ys = [Point(x=1, y=2), null] + """) } \ No newline at end of file