|
12 | 12 | import os |
13 | 13 |
|
14 | 14 |
|
15 | | -class TestDAP_setBreakpoints(lldbdap_testcase.DAPTestCaseBase): |
| 15 | +class TestDAP_breakpointLocations(lldbdap_testcase.DAPTestCaseBase): |
16 | 16 | def setUp(self): |
17 | 17 | lldbdap_testcase.DAPTestCaseBase.setUp(self) |
18 | 18 |
|
@@ -74,12 +74,15 @@ def test_column_breakpoints(self): |
74 | 74 | ) |
75 | 75 | self.maxDiff = None |
76 | 76 | 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