summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-12-07 21:17:12 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-12-07 21:17:12 +0000
commit56d8ac4e805771ac4d0b6a2ce2c3c187aa536bf1 (patch)
tree5738d82fb5ef8946647c98eaba4210475ff5dd0e
parenteea0fd0942546c26b635896ddf535f93b4cad72a (diff)
downloadbcm5719-llvm-56d8ac4e805771ac4d0b6a2ce2c3c187aa536bf1.tar.gz
bcm5719-llvm-56d8ac4e805771ac4d0b6a2ce2c3c187aa536bf1.zip
Make the various expression command test sequences more strict by also verifying
the results against our golden ones. llvm-svn: 121185
-rw-r--r--lldb/test/expression_command/test/TestExprs.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/lldb/test/expression_command/test/TestExprs.py b/lldb/test/expression_command/test/TestExprs.py
index 723d1b762aa..62755e477bc 100644
--- a/lldb/test/expression_command/test/TestExprs.py
+++ b/lldb/test/expression_command/test/TestExprs.py
@@ -87,23 +87,33 @@ class BasicExprCommandsTestCase(TestBase):
# runCmd: expression 'a'
# output: (char) $0 = 'a'
- self.runCmd("expression 'a'")
+ self.expect("expression 'a'",
+ substrs = ['(char) $',
+ "'a'"])
- # runCmd: expression printf ("\n\n\tHello there!")
- # output: (unsigned long) $1 = 15
- self.runCmd('expression printf ("\\n\\n\\tHello there!")')
+ # 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:
OpenPOWER on IntegriCloud