27 lines · python
1"""2Test exception behavior in DAP with c++ throw.3"""4 5 6from lldbsuite.test.decorators import *7from lldbsuite.test.lldbtest import *8import lldbdap_testcase9 10 11class TestDAP_exception_cpp(lldbdap_testcase.DAPTestCaseBase):12 @skipIfWindows13 def test_stopped_description(self):14 """15 Test that exception description is shown correctly in stopped16 event.17 """18 program = self.getBuildArtifact("a.out")19 self.build_and_launch(program)20 self.dap_server.request_continue()21 self.assertTrue(self.verify_stop_exception_info("signal SIGABRT"))22 exceptionInfo = self.get_exceptionInfo()23 self.assertEqual(exceptionInfo["breakMode"], "always")24 self.assertEqual(exceptionInfo["description"], "signal SIGABRT")25 self.assertEqual(exceptionInfo["exceptionId"], "signal")26 self.assertIsNotNone(exceptionInfo["details"])27