diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 |
| commit | 74a628f776edb588bff8f8f5cc16eac947c9d631 (patch) | |
| tree | dc32e010ac4902621e5a279bfeb48628f7f0e166 /packages/Python/lldbsuite/test/python_api/watchpoint | |
| parent | afed7be32164a598f8172282c249af7266c48b46 (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/watchpoint')
| -rw-r--r-- | packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py | 3 | ||||
| -rw-r--r-- | packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py index e4f2c5c7a1828..bc925ee693d49 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py @@ -108,3 +108,6 @@ class SetWatchpointAPITestCase(TestBase): self.assertTrue( process.GetState() == lldb.eStateExited, PROCESS_EXITED) + + self.dbg.DeleteTarget(target) + self.assertFalse(watchpoint.IsValid()) diff --git a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index 1bef9968b4abd..2685ef819cad0 100644 --- a/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -56,7 +56,7 @@ class WatchpointIgnoreCountTestCase(TestBase): # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() - self.assertTrue(process.GetState() == lldb.eStateStopped, + self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED) thread = lldbutil.get_stopped_thread( process, lldb.eStopReasonBreakpoint) @@ -75,12 +75,12 @@ class WatchpointIgnoreCountTestCase(TestBase): self.HideStdout() # There should be only 1 watchpoint location under the target. - self.assertTrue(target.GetNumWatchpoints() == 1) + self.assertEqual(target.GetNumWatchpoints(), 1) watchpoint = target.GetWatchpointAtIndex(0) self.assertTrue(watchpoint.IsEnabled()) - self.assertTrue(watchpoint.GetIgnoreCount() == 0) + self.assertEqual(watchpoint.GetIgnoreCount(), 0) watch_id = watchpoint.GetID() - self.assertTrue(watch_id != 0) + self.assertNotEqual(watch_id, 0) print(watchpoint) # Now immediately set the ignore count to 2. When we continue, expect the @@ -90,12 +90,10 @@ class WatchpointIgnoreCountTestCase(TestBase): process.Continue() # At this point, the inferior process should have exited. - self.assertTrue( - process.GetState() == lldb.eStateExited, - PROCESS_EXITED) + self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED) # Verify some vital statistics. self.assertTrue(watchpoint) - self.assertTrue(watchpoint.GetWatchSize() == 4) - self.assertTrue(watchpoint.GetHitCount() == 2) + self.assertEqual(watchpoint.GetWatchSize(), 4) + self.assertEqual(watchpoint.GetHitCount(), 2) print(watchpoint) |
