https://github.com/kendalharland updated 
https://github.com/llvm/llvm-project/pull/100487

>From 29d5a57eb8cc344e1a93787fe9cb333761923927 Mon Sep 17 00:00:00 2001
From: kendal <kendal@thebrowser.company>
Date: Tue, 23 Jul 2024 10:24:24 -0700
Subject: [PATCH] [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".
---
 .../breakpoint_conditions/TestBreakpointConditions.py     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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)

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to