[Lldb-commits] [lldb] [lldb] Add value to enumerator dump (PR #69815)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 23 03:30:50 PDT 2023


================
@@ -23,9 +23,18 @@ def check_enum(self, suffix):
             substrs=["Case1", "Case2", "Case3"],
         )
         # Test each case in the enum.
-        self.expect_expr("var1_" + suffix, result_type=enum_name, result_value="Case1")
-        self.expect_expr("var2_" + suffix, result_type=enum_name, result_value="Case2")
-        self.expect_expr("var3_" + suffix, result_type=enum_name, result_value="Case3")
+        self.expect(
+            "expr var1_" + suffix,
+            patterns=[f"\\({enum_name}\\) \\$\\d+ = Case1\\(-?\\d+\\)"],
+        )
+        self.expect(
+            "expr var2_" + suffix,
+            patterns=[f"\\({enum_name}\\) \\$\\d+ = Case2\\(-?\\d+\\)"],
+        )
+        self.expect(
+            "expr var3_" + suffix,
+            patterns=[f"\\({enum_name}\\) \\$\\d+ = Case3\\(-?\\d+\\)"],
----------------
Michael137 wrote:

Why can't we just use `result_value` here?

https://github.com/llvm/llvm-project/pull/69815


More information about the lldb-commits mailing list