[Lldb-commits] [lldb] r121185 - /lldb/trunk/test/expression_command/test/TestExprs.py

Johnny Chen johnny.chen at apple.com
Tue Dec 7 13:17:12 PST 2010


Author: johnny
Date: Tue Dec  7 15:17:12 2010
New Revision: 121185

URL: http://llvm.org/viewvc/llvm-project?rev=121185&view=rev
Log:
Make the various expression command test sequences more strict by also verifying
the results against our golden ones.

Modified:
    lldb/trunk/test/expression_command/test/TestExprs.py

Modified: lldb/trunk/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs.py?rev=121185&r1=121184&r2=121185&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs.py Tue Dec  7 15:17:12 2010
@@ -87,23 +87,33 @@
 
         # runCmd: expression 'a'
         # output: (char) $0 = 'a'
-        self.runCmd("expression 'a'")
-
-        # runCmd: expression printf ("\n\n\tHello there!")
-        # output: (unsigned long) $1 = 15
-        self.runCmd('expression printf ("\\n\\n\\tHello there!")')
+        self.expect("expression 'a'",
+            substrs = ['(char) $',
+                       "'a'"])
+
+        # runCmd: expression printf ("\n\n\tHello there!\\n")
+        # output: (unsigned long) $1 = 16
+        self.expect('expression printf ("\\n\\n\\tHello there!\\n")',
+            substrs = ['(unsigned long) $',
+                       '16'])
 
         # runCmd: expression printf("\t\x68\n")
         # output: (unsigned long) $2 = 3
-        self.runCmd('expression printf("\\t\\x68\\n")')
+        self.expect('expression printf("\\t\\x68\\n")',
+            substrs = ['(unsigned long) $',
+                       '3'])
 
         # runCmd: expression printf("\"\n")
         # output: (unsigned long) $3 = 2
-        self.runCmd('expression printf("\\"\\n")')
+        self.expect('expression printf("\\"\\n")',
+            substrs = ['(unsigned long) $',
+                       '2'])
 
         # runCmd: expression printf("'\n")
         # output: (unsigned long) $4 = 2
-        self.runCmd('expression printf("\'\\n")')
+        self.expect('expression printf("\'\\n")',
+            substrs = ['(unsigned long) $',
+                       '2'])
 
         # runCmd: command alias print_hi expression printf ("\n\tHi!")
         # output: 





More information about the lldb-commits mailing list