Skip to content

Commit 29d5a57

Browse files
author
kendal
committed
[lldb][test][x86_64][win] Split TestBreakpointConditions assertion to clarify failure message
When this test fails we see an assertion error `False != True` This clarifies the error by showing, for example, if `1 != 3` when comparing `var` to the string "3".
1 parent 70c6e79 commit 29d5a57

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,15 @@ def breakpoint_conditions_python(self):
176176
thread.IsValid(),
177177
"There should be a thread stopped due to breakpoint condition",
178178
)
179+
179180
frame0 = thread.GetFrameAtIndex(0)
180181
var = frame0.FindValue("val", lldb.eValueTypeVariableArgument)
181-
self.assertTrue(
182-
frame0.GetLineEntry().GetLine() == self.line1 and var.GetValue() == "3"
182+
self.assertEqual(
183+
frame0.GetLineEntry().GetLine(),
184+
self.line1,
185+
"The debugger stopped on the correct line",
183186
)
187+
self.assertEqual(var.GetValue(), "3")
184188

185189
# The hit count for the breakpoint should be 1.
186190
self.assertEqual(breakpoint.GetHitCount(), 1)

0 commit comments

Comments
 (0)