summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/debugger/TestDebuggerAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/python_api/debugger/TestDebuggerAPI.py')
-rw-r--r--lldb/test/python_api/debugger/TestDebuggerAPI.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/test/python_api/debugger/TestDebuggerAPI.py b/lldb/test/python_api/debugger/TestDebuggerAPI.py
index b9d169e244a..462933510a9 100644
--- a/lldb/test/python_api/debugger/TestDebuggerAPI.py
+++ b/lldb/test/python_api/debugger/TestDebuggerAPI.py
@@ -28,3 +28,11 @@ class DebuggerAPITestCase(TestBase):
self.dbg.SetPrompt(None)
self.dbg.SetCurrentPlatform(None)
self.dbg.SetCurrentPlatformSDKRoot(None)
+
+ @python_api_test
+ def test_debugger_delete_invalid_target(self):
+ """SBDebugger.DeleteTarget() should not crash LLDB given and invalid target."""
+ target = lldb.SBTarget()
+ self.assertFalse(target.IsValid())
+ self.dbg.DeleteTarget(target)
+
OpenPOWER on IntegriCloud