diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-09-27 20:29:45 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-27 20:29:45 +0000 |
| commit | 9d954d86654d9627ef7813bce416b175e1467252 (patch) | |
| tree | 2d928a9bc681290cbff6a9a3209c9f8e6f30cf21 /lldb/test/python_api | |
| parent | 4e6a4fa899a35ee0c86fa788f6a8b054e3cfae2b (diff) | |
| download | bcm5719-llvm-9d954d86654d9627ef7813bce416b175e1467252.tar.gz bcm5719-llvm-9d954d86654d9627ef7813bce416b175e1467252.zip | |
Add SBTarget::GetLastCreatedWatchpointLocation() API and export to the Python interface.
Also add rich comparison methods (__eq__ and __ne__) for SBWatchpointLocation.
Modify TestWatchpointLocationIter.py to exercise the new APIs.
Add fuzz testings for the recently added SBTarget APIs related to watchpoint manipulations.
llvm-svn: 140633
Diffstat (limited to 'lldb/test/python_api')
| -rw-r--r-- | lldb/test/python_api/default-constructor/sb_target.py | 8 | ||||
| -rw-r--r-- | lldb/test/python_api/watchpoint/TestWatchpointLocationIter.py | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lldb/test/python_api/default-constructor/sb_target.py b/lldb/test/python_api/default-constructor/sb_target.py index 36db20fd3f0..e1a5db63cf3 100644 --- a/lldb/test/python_api/default-constructor/sb_target.py +++ b/lldb/test/python_api/default-constructor/sb_target.py @@ -40,6 +40,14 @@ def fuzz_obj(obj): obj.EnableAllBreakpoints() obj.DisableAllBreakpoints() obj.DeleteAllBreakpoints() + obj.GetNumWatchpointLocations() + obj.GetLastCreatedWatchpointLocation() + obj.GetWatchpointLocationAtIndex(0) + obj.WatchpointLocationDelete(0) + obj.FindWatchpointLocationByID(0) + obj.EnableAllWatchpointLocations() + obj.DisableAllWatchpointLocations() + obj.DeleteAllWatchpointLocations() obj.GetBroadcaster() obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelBrief) obj.Clear() diff --git a/lldb/test/python_api/watchpoint/TestWatchpointLocationIter.py b/lldb/test/python_api/watchpoint/TestWatchpointLocationIter.py index d54c2105333..fdaa04a18d0 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointLocationIter.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointLocationIter.py @@ -65,7 +65,9 @@ class WatchpointLocationIteratorTestCase(TestBase): # There should be only 1 watchpoint location under the target. self.assertTrue(target.GetNumWatchpointLocations() == 1) - wp_loc = target.GetWatchpointLocationAtIndex(0) + wp_loc = target.GetWatchpointLocationAtIndex(0) + last_created = target.GetLastCreatedWatchpointLocation() + self.assertTrue(wp_loc == last_created) self.assertTrue(wp_loc.IsEnabled()) watch_id = wp_loc.GetID() self.assertTrue(watch_id != 0) |

