Skip to content

Commit b865206

Browse files
committed
Update some tests to use properties
1 parent b969aef commit b865206

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

lldb/test/API/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ def ignore_vrs_condition(self, use_location):
175175
if use_location:
176176
loc = bkpt.location[0]
177177
self.assertTrue(loc.IsValid(), "Got a valid location")
178-
loc.SetIgnoreCount(2)
179-
loc.SetCondition("i >= 3")
178+
loc.ignore_count = 2
179+
loc.condition = "i >= 3"
180180
else:
181-
bkpt.SetIgnoreCount(2)
182-
bkpt.SetCondition("i >= 3")
181+
bkpt.ignore_count = 2
182+
bkpt.condition = "i >= 3"
183183

184184
threads = lldbutil.continue_to_breakpoint(process, bkpt)
185185
self.assertEqual(len(threads), 1, "Hit the breakpoint")
@@ -188,4 +188,4 @@ def ignore_vrs_condition(self, use_location):
188188
val = var.GetValueAsUnsigned(10000)
189189
self.assertNotEqual(val, 10000, "Got the fail value for i")
190190
self.assertEqual(val, 5, "We didn't stop the right number of times")
191-
self.assertEqual(bkpt.GetHitCount(), 3, "Hit count is not right")
191+
self.assertEqual(bkpt.hit_count, 3, "Hit count is not right")

lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,14 @@ def do_check_using_names(self):
216216
)
217217

218218
def check_option_values(self, bp_object):
219-
self.assertEqual(bp_object.IsOneShot(), self.is_one_shot, "IsOneShot")
220-
self.assertEqual(bp_object.GetIgnoreCount(), self.ignore_count, "IgnoreCount")
221-
self.assertEqual(bp_object.GetCondition(), self.condition, "Condition")
222-
self.assertEqual(
223-
bp_object.GetAutoContinue(), self.auto_continue, "AutoContinue"
224-
)
225-
self.assertEqual(bp_object.GetThreadID(), self.tid, "Thread ID")
226-
self.assertEqual(bp_object.GetThreadIndex(), self.tidx, "Thread Index")
227-
self.assertEqual(bp_object.GetThreadName(), self.thread_name, "Thread Name")
228-
self.assertEqual(bp_object.GetQueueName(), self.queue_name, "Queue Name")
219+
self.assertEqual(bp_object.one_shot, self.is_one_shot, "IsOneShot")
220+
self.assertEqual(bp_object.ignore_count, self.ignore_count, "IgnoreCount")
221+
self.assertEqual(bp_object.condition, self.condition, "Condition")
222+
self.assertEqual(bp_object.auto_continue, self.auto_continue, "AutoContinue")
223+
self.assertEqual(bp_object.thread_id, self.tid, "Thread ID")
224+
self.assertEqual(bp_object.thread_index, self.tidx, "Thread Index")
225+
self.assertEqual(bp_object.thread_name, self.thread_name, "Thread Name")
226+
self.assertEqual(bp_object.queue_name, self.queue_name, "Queue Name")
229227
set_cmds = lldb.SBStringList()
230228
bp_object.GetCommandLineCommands(set_cmds)
231229
self.assertEqual(

lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_stopping_breakpoints(self):
1717
@no_debug_info_test
1818
def test_auto_continue(self):
1919
def auto_continue(bkpt):
20-
bkpt.SetAutoContinue(True)
20+
bkpt.auto_continue = True
2121

2222
self.do_test(auto_continue)
2323

@@ -26,7 +26,7 @@ def auto_continue(bkpt):
2626
@no_debug_info_test
2727
def test_failing_condition(self):
2828
def condition(bkpt):
29-
bkpt.SetCondition("1 == 2")
29+
bkpt.condition = "1 == 2"
3030

3131
self.do_test(condition)
3232

0 commit comments

Comments
 (0)