Skip to content

Commit 76af5fc

Browse files
committed
Minor: Fix test case
1 parent 88134b8 commit 76af5fc

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_breakpointLocations.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import os
1313

1414

15-
class TestDAP_setBreakpoints(lldbdap_testcase.DAPTestCaseBase):
15+
class TestDAP_breakpointLocations(lldbdap_testcase.DAPTestCaseBase):
1616
def setUp(self):
1717
lldbdap_testcase.DAPTestCaseBase.setUp(self)
1818

@@ -74,12 +74,15 @@ def test_column_breakpoints(self):
7474
)
7575
self.maxDiff = None
7676
self.assertTrue(response["success"])
77-
self.assertEqual(
78-
response["body"]["breakpoints"],
79-
[
80-
{"column": 39, "line": 40},
81-
{"column": 51, "line": 40},
82-
{"column": 3, "line": 42},
83-
{"column": 18, "line": 42},
84-
],
85-
)
77+
# On some systems, there is an additional breakpoint available
78+
# at line 41, column 3, i.e. at the end of the loop. To make this
79+
# test more portable, only check that all expected breakpoints are
80+
# presented, but also accept additional breakpoints.
81+
expected_breakpoints = [
82+
{"column": 39, "line": 40},
83+
{"column": 51, "line": 40},
84+
{"column": 3, "line": 42},
85+
{"column": 18, "line": 42},
86+
]
87+
for bp in expected_breakpoints:
88+
self.assertIn(bp, response["body"]["breakpoints"])

0 commit comments

Comments
 (0)