From a24b2b6aa06a001a98328acf624a5a8b1ab4139a Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 25 Oct 2021 12:51:19 +0200 Subject: [PATCH] [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. --- lldb/packages/Python/lldbsuite/test/lldbtest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 3ba3084..d8940b9 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -315,7 +315,8 @@ class ValueCheck: 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): """ -- 2.7.4