|
10 | 10 | import os
|
11 | 11 |
|
12 | 12 |
|
13 |
| -class TestDAP_gotoTarget(lldbdap_testcase.DAPTestCaseBase): |
| 13 | +class TestDAP_gotoTargets(lldbdap_testcase.DAPTestCaseBase): |
14 | 14 | def verify_variable(
|
15 | 15 | self, actual_dict: Dict[str, Any], expected_dict: Dict[str, Any]
|
16 | 16 | ):
|
@@ -61,9 +61,13 @@ def test_default(self):
|
61 | 61 | self.assertIsNotNone(thread_id, "threadId should not be none")
|
62 | 62 |
|
63 | 63 | response = self.dap_server.request_goto(thread_id, target_id)
|
64 |
| - |
65 | 64 | self.assertEqual(response["success"], True, "expects success to go to targetId")
|
66 | 65 |
|
| 66 | + stopped_events = self.dap_server.wait_for_stopped() |
| 67 | + is_goto = lambda event: event["body"]["reason"] == "goto" |
| 68 | + has_goto_event = any(map(is_goto, stopped_events)) |
| 69 | + self.assertEqual(has_goto_event, True, "expects stopped event with reason goto") |
| 70 | + |
67 | 71 | self.dap_server.request_next(thread_id)
|
68 | 72 | self.continue_to_next_stop()
|
69 | 73 |
|
@@ -118,6 +122,12 @@ def test_execute_again(self):
|
118 | 122 |
|
119 | 123 | response = self.dap_server.request_goto(thread_id, target_id)
|
120 | 124 | self.assertEqual(response["success"], True, "expects success to go to targetId")
|
| 125 | + |
| 126 | + stopped_events = self.dap_server.wait_for_stopped() |
| 127 | + is_goto = lambda event: event["body"]["reason"] == "goto" |
| 128 | + has_goto_event = any(map(is_goto, stopped_events)) |
| 129 | + self.assertEqual(has_goto_event, True, "expects stopped event with reason goto") |
| 130 | + |
121 | 131 | self.dap_server.request_next(thread_id)
|
122 | 132 | self.continue_to_next_stop()
|
123 | 133 |
|
|
0 commit comments