================
@@ -10,22 +10,37 @@
 
 
 class LibcxxVectorDataFormatterTestCase(TestBase):
-    def check_numbers(self, var_name):
-        self.expect(
-            "frame variable " + var_name,
-            substrs=[
-                var_name + " = size=7",
-                "[0] = 1",
-                "[1] = 12",
-                "[2] = 123",
-                "[3] = 1234",
-                "[4] = 12345",
-                "[5] = 123456",
-                "[6] = 1234567",
-                "}",
-            ],
-        )
-
+    def check_numbers(self, var_name, show_ptr=False):
+        if show_ptr:
+            self.expect(
+                "frame variable " + var_name,
+                patterns=[var_name + " = 0x.* size=7"],
----------------
labath wrote:

Insteand of repeating the whole expectation, I think it'd be better to just 
temp variable for the "expected summary string", and conditionalize just its 
value.

https://github.com/llvm/llvm-project/pull/125294
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to