This revision was automatically updated to reflect the committed changes.
Closed by commit rGafd5d912812e: [lldb] Fix TestFormattersSBAPI test (authored 
by aadsm, committed by António Afonso <aa...@fb.com>).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70884/new/

https://reviews.llvm.org/D70884

Files:
  
lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py


Index: 
lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
===================================================================
--- 
lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
+++ 
lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
@@ -68,17 +68,17 @@
         self.expect("frame variable foo.E",
                     substrs=['b8cca70a'])
 
-        format.format = lldb.eFormatOctal
+        format.SetFormat(lldb.eFormatOctal)
         category.AddTypeFormat(lldb.SBTypeNameSpecifier("int"), format)
         self.expect("frame variable foo.A",
-                    substrs=['01'])
+                    substrs=[' 01'])
         self.expect("frame variable foo.E",
                     substrs=['b8cca70a'])
 
         category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("int"))
         category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("long"))
         self.expect("frame variable foo.A", matching=False,
-                    substrs=['01'])
+                    substrs=[' 01'])
         self.expect("frame variable foo.E", matching=False,
                     substrs=['b8cca70a'])
 
@@ -90,10 +90,13 @@
             new_category.IsValid(),
             "getting a non-existing category worked")
         new_category = self.dbg.CreateCategory("foobar")
-        new_category.enabled = True
+        new_category.SetEnabled(True)
         new_category.AddTypeSummary(
             lldb.SBTypeNameSpecifier(
-                "^.*t$", True), summary)
+                "^.*t$",
+                True,  # is_regexp
+            ), summary)
+
         self.expect("frame variable foo.A",
                     substrs=['hello world'])
         self.expect("frame variable foo.E", matching=False,
@@ -102,7 +105,7 @@
                     substrs=['hello world'])
         self.expect("frame variable foo.F",
                     substrs=['hello world'])
-        new_category.enabled = False
+        new_category.SetEnabled(False)
         self.expect("frame variable foo.A", matching=False,
                     substrs=['hello world'])
         self.expect("frame variable foo.E", matching=False,
@@ -379,7 +382,7 @@
             lldb.SBTypeSummary.CreateWithScriptCode("return 'hello scripted 
world';"))
         self.expect("frame variable foo", matching=False,
                     substrs=['hello scripted world'])
-        new_category.enabled = True
+        new_category.SetEnabled(True)
         self.expect("frame variable foo", matching=True,
                     substrs=['hello scripted world'])
 


Index: lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
+++ lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
@@ -68,17 +68,17 @@
         self.expect("frame variable foo.E",
                     substrs=['b8cca70a'])
 
-        format.format = lldb.eFormatOctal
+        format.SetFormat(lldb.eFormatOctal)
         category.AddTypeFormat(lldb.SBTypeNameSpecifier("int"), format)
         self.expect("frame variable foo.A",
-                    substrs=['01'])
+                    substrs=[' 01'])
         self.expect("frame variable foo.E",
                     substrs=['b8cca70a'])
 
         category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("int"))
         category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("long"))
         self.expect("frame variable foo.A", matching=False,
-                    substrs=['01'])
+                    substrs=[' 01'])
         self.expect("frame variable foo.E", matching=False,
                     substrs=['b8cca70a'])
 
@@ -90,10 +90,13 @@
             new_category.IsValid(),
             "getting a non-existing category worked")
         new_category = self.dbg.CreateCategory("foobar")
-        new_category.enabled = True
+        new_category.SetEnabled(True)
         new_category.AddTypeSummary(
             lldb.SBTypeNameSpecifier(
-                "^.*t$", True), summary)
+                "^.*t$",
+                True,  # is_regexp
+            ), summary)
+
         self.expect("frame variable foo.A",
                     substrs=['hello world'])
         self.expect("frame variable foo.E", matching=False,
@@ -102,7 +105,7 @@
                     substrs=['hello world'])
         self.expect("frame variable foo.F",
                     substrs=['hello world'])
-        new_category.enabled = False
+        new_category.SetEnabled(False)
         self.expect("frame variable foo.A", matching=False,
                     substrs=['hello world'])
         self.expect("frame variable foo.E", matching=False,
@@ -379,7 +382,7 @@
             lldb.SBTypeSummary.CreateWithScriptCode("return 'hello scripted world';"))
         self.expect("frame variable foo", matching=False,
                     substrs=['hello scripted world'])
-        new_category.enabled = True
+        new_category.SetEnabled(True)
         self.expect("frame variable foo", matching=True,
                     substrs=['hello scripted world'])
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to