[Lldb-commits] [lldb] r115063 - /lldb/trunk/test/types/AbstractBase.py

Johnny Chen johnny.chen at apple.com
Wed Sep 29 11:46:14 PDT 2010


Author: johnny
Date: Wed Sep 29 13:46:14 2010
New Revision: 115063

URL: http://llvm.org/viewvc/llvm-project?rev=115063&view=rev
Log:
Turn on generic type tester for expression parser; preparing to file bugs.

Modified:
    lldb/trunk/test/types/AbstractBase.py

Modified: lldb/trunk/test/types/AbstractBase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/types/AbstractBase.py?rev=115063&r1=115062&r2=115063&view=diff
==============================================================================
--- lldb/trunk/test/types/AbstractBase.py (original)
+++ lldb/trunk/test/types/AbstractBase.py Wed Sep 29 13:46:14 2010
@@ -124,16 +124,24 @@
             
             # The input type is in a canonical form as a set named atoms.
             # The display type string must conatin each and every element.
-            #dt = re.match("^\((.*)\)", output).group(1)
+            #
+            # Example:
+            #     runCmd: expr a
+            #     output: $0 = (double) 1100.12
+            #
+            try:
+                dt = re.match("^\$[0-9]+ = \((.*)\)", output).group(1)
+            except:
+                self.fail("Data type from expression parser is parsed correctly")
 
             # Expect the display type string to contain each and every atoms.
-            #self.expect(dt,
-            #            "Display type: '%s' must contain the type atoms: '%s'" %
-            #            (dt, atoms),
-            #            exe=False,
-            #    substrs = list(atoms))
+            self.expect(dt,
+                        "Display type: '%s' must contain the type atoms: '%s'" %
+                        (dt, atoms),
+                        exe=False,
+                substrs = list(atoms))
 
-            # The (var, val) pair must match, too.
-            #nv = (" %s = '%s'" if quotedDisplay else " %s = %s") % (var, val)
-            #self.expect(output, Msg(var, val), exe=False,
-            #    substrs = [nv])
+            # The val part must match, too.
+            valPart = ("'%s'" if quotedDisplay else "%s") % val
+            self.expect(output, Msg(var, val), exe=False,
+                substrs = [valPart])





More information about the lldb-commits mailing list