[Lldb-commits] [lldb] 3c3851f - [lldb][test][x86_64][win] Split assertion in TestBreakpointConditions (#100487)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 2 02:03:43 PDT 2024
Author: Kendal Harland
Date: 2024-08-02T10:03:39+01:00
New Revision: 3c3851f3ed837aaae7df76e9a4cbb866dbfee3ac
URL: https://github.com/llvm/llvm-project/commit/3c3851f3ed837aaae7df76e9a4cbb866dbfee3ac
DIFF: https://github.com/llvm/llvm-project/commit/3c3851f3ed837aaae7df76e9a4cbb866dbfee3ac.diff
LOG: [lldb][test][x86_64][win] Split assertion in TestBreakpointConditions (#100487)
This PR splits the test assertion that verifies we're on the correct
line and have the correct value of `val` to make the error message more
clear. At present it just shows `Assertion error: True != False`
Co-authored-by: kendal <kendal at thebrowser.company>
Added:
Modified:
lldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
index 50ba0317fd094..4e7a8ccb9fbeb 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
@@ -176,11 +176,15 @@ def breakpoint_conditions_python(self):
thread.IsValid(),
"There should be a thread stopped due to breakpoint condition",
)
+
frame0 = thread.GetFrameAtIndex(0)
var = frame0.FindValue("val", lldb.eValueTypeVariableArgument)
- self.assertTrue(
- frame0.GetLineEntry().GetLine() == self.line1 and var.GetValue() == "3"
+ self.assertEqual(
+ frame0.GetLineEntry().GetLine(),
+ self.line1,
+ "The debugger stopped on the correct line",
)
+ self.assertEqual(var.GetValue(), "3")
# The hit count for the breakpoint should be 1.
self.assertEqual(breakpoint.GetHitCount(), 1)
More information about the lldb-commits
mailing list