Skip to content

Commit 58adc30

Browse files
author
kendal
committed
Fix test assertions in TestDAP_stepInTargets.py
1 parent 0c56fd0 commit 58adc30

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lldb/test/API/tools/lldb-dap/stepInTargets/TestDAP_stepInTargets.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ def test_basic(self):
5555
self.assertEqual(len(step_in_targets), 3, "expect 3 step in targets")
5656

5757
# Verify the target names are correct.
58-
self.assertEqual(step_in_targets[0]["label"], "bar()", "expect bar()")
59-
self.assertEqual(step_in_targets[1]["label"], "bar2()", "expect bar2()")
60-
self.assertEqual(
61-
step_in_targets[2]["label"], "foo(int, int)", "expect foo(int, int)"
62-
)
58+
self.assertIn("funcB", step_in_targets[0]["label"], "expect funcB")
59+
self.assertIn("funcA", step_in_targets[1]["label"], "expect funcA")
60+
self.assertIn("foo", step_in_targets[2]["label"], "expect foo")
6361

64-
# Choose to step into second target and verify that we are in bar2()
62+
# Choose to step into second target and verify that we are in funcB()
6563
self.stepIn(threadId=tid, targetId=step_in_targets[1]["id"], waitForStop=True)
6664
leaf_frame = self.dap_server.get_stackFrame()
6765
self.assertIsNotNone(leaf_frame, "expect a leaf frame")
68-
self.assertEqual(leaf_frame["name"], "bar2()")
66+
self.assertIn("funcB", leaf_frame["name"], "expect funcB")
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
int foo(int val, int extra) { return val + extra; }
33

4-
int bar() { return 22; }
4+
int funcA() { return 22; }
55

6-
int bar2() { return 54; }
6+
int funcB() { return 54; }
77

88
int main(int argc, char const *argv[]) {
9-
foo(bar(), bar2()); // set breakpoint here
9+
foo(funcA(), funcB()); // set breakpoint here
1010
return 0;
1111
}

0 commit comments

Comments
 (0)