Author: Raphael Isemann
Date: 2021-10-25T13:03:56+02:00
New Revision: a24b2b6aa06a001a98328acf624a5a8b1ab4139a

URL: 
https://github.com/llvm/llvm-project/commit/a24b2b6aa06a001a98328acf624a5a8b1ab4139a
DIFF: 
https://github.com/llvm/llvm-project/commit/a24b2b6aa06a001a98328acf624a5a8b1ab4139a.diff

LOG: [lldb] Also print index of child when ValueCheck fails

Makes the test failure reason more obvious in cases where we have unnamed fields
or large records.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 3ba3084690fae..d8940b996f8dc 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -315,7 +315,8 @@ def check_value_children(self, test_base, val, 
error_msg=None):
         for i in range(0, val.GetNumChildren()):
             expected_child = self.children[i]
             actual_child = val.GetChildAtIndex(i)
-            expected_child.check_value(test_base, actual_child, error_msg)
+            child_error = "Checking child with index " + str(i) + ":\n" + 
error_msg
+            expected_child.check_value(test_base, actual_child, child_error)
 
 class recording(SixStringIO):
     """


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

Reply via email to