https://github.com/kendalharland updated 
https://github.com/llvm/llvm-project/pull/96687

>From 58adc302fe08220f60513599f8a9ff6a72ce49ac Mon Sep 17 00:00:00 2001
From: kendal <kendal@thebrowser.company>
Date: Mon, 24 Jun 2024 14:01:31 -0700
Subject: [PATCH] Fix test assertions in TestDAP_stepInTargets.py

---
 .../lldb-dap/stepInTargets/TestDAP_stepInTargets.py  | 12 +++++-------
 lldb/test/API/tools/lldb-dap/stepInTargets/main.cpp  |  6 +++---
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git 
a/lldb/test/API/tools/lldb-dap/stepInTargets/TestDAP_stepInTargets.py 
b/lldb/test/API/tools/lldb-dap/stepInTargets/TestDAP_stepInTargets.py
index 6296f6554d07e..5deb054f0915a 100644
--- a/lldb/test/API/tools/lldb-dap/stepInTargets/TestDAP_stepInTargets.py
+++ b/lldb/test/API/tools/lldb-dap/stepInTargets/TestDAP_stepInTargets.py
@@ -55,14 +55,12 @@ def test_basic(self):
         self.assertEqual(len(step_in_targets), 3, "expect 3 step in targets")
 
         # Verify the target names are correct.
-        self.assertEqual(step_in_targets[0]["label"], "bar()", "expect bar()")
-        self.assertEqual(step_in_targets[1]["label"], "bar2()", "expect 
bar2()")
-        self.assertEqual(
-            step_in_targets[2]["label"], "foo(int, int)", "expect foo(int, 
int)"
-        )
+        self.assertIn("funcB", step_in_targets[0]["label"], "expect funcB")
+        self.assertIn("funcA", step_in_targets[1]["label"], "expect funcA")
+        self.assertIn("foo", step_in_targets[2]["label"], "expect foo")
 
-        # Choose to step into second target and verify that we are in bar2()
+        # Choose to step into second target and verify that we are in funcB()
         self.stepIn(threadId=tid, targetId=step_in_targets[1]["id"], 
waitForStop=True)
         leaf_frame = self.dap_server.get_stackFrame()
         self.assertIsNotNone(leaf_frame, "expect a leaf frame")
-        self.assertEqual(leaf_frame["name"], "bar2()")
+        self.assertIn("funcB", leaf_frame["name"], "expect funcB")
diff --git a/lldb/test/API/tools/lldb-dap/stepInTargets/main.cpp 
b/lldb/test/API/tools/lldb-dap/stepInTargets/main.cpp
index d3c3dbcc139ef..a48b79af0c760 100644
--- a/lldb/test/API/tools/lldb-dap/stepInTargets/main.cpp
+++ b/lldb/test/API/tools/lldb-dap/stepInTargets/main.cpp
@@ -1,11 +1,11 @@
 
 int foo(int val, int extra) { return val + extra; }
 
-int bar() { return 22; }
+int funcA() { return 22; }
 
-int bar2() { return 54; }
+int funcB() { return 54; }
 
 int main(int argc, char const *argv[]) {
-  foo(bar(), bar2()); // set breakpoint here
+  foo(funcA(), funcB()); // set breakpoint here
   return 0;
 }

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to