[Lldb-commits] [PATCH] D11447: Specify a language to use when parsing expressions.

Greg Clayton clayborg at gmail.com
Thu Jul 23 15:20:30 PDT 2015


clayborg added a comment.

See inlined comments.


================
Comment at: test/expression_command/options/TestExprOptions.py:46-55
@@ +45,12 @@
+
+        # FIXME: runCmd (called by expect) fails if an error is
+        # returned making it impossible to add negative tests.  As a
+        # workaround, we'll expect runCmd to fail using the following
+        # method:
+        try:
+            self.expect("expression blabla",
+                startstr = "unexpected value")
+            self.assertTrue(false, "runCmd didn't fail")
+        except:
+            print "OK"
+
----------------
use self.runCmd(check=False,...) instead of self.expect(...). You should actually use the "lldb.SB*" API if possible unless you are explicitly trying to test textual output from commands. Please don't use self.expect() or self.runCmd() if you can use "lldb.SB*" API calls.


Repository:
  rL LLVM

http://reviews.llvm.org/D11447







More information about the lldb-commits mailing list