clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed.
Please use SB API calls for expression evaluation instead of self.expect calls. ================ Comment at: test/expression_command/options/TestExprOptions.py:57-87 @@ +56,33 @@ + + # -- test --language on ObjC builtin type -- + # Make sure we can evaluate the ObjC builtin type 'id': + self.expect("expr id my_id = 0; my_id", + substrs = ["= nil"]) + # Make sure it still works if language is set to ObjC: + self.expect("expr -l objc -- id my_id = 0; my_id", + substrs = ["= nil"]) + # Make sure it fails if language is set to C: + self.expect("expr -l c -- id my_id = 0; my_id", error=True, + startstr = "error") + # Make sure it fails if the target's language is set to C: + self.runCmd("settings set target.language c") + self.expect("expr id my_id = 0; my_id", error=True, + startstr = "error") + self.runCmd("settings clear target.language") + + # -- test --language on C++ expression -- + # Make sure we can evaluate 'ns::func'. + self.expect("expr ns::func", + patterns = ["\(int .* = 0x.*"]) + # Make sure it still works if language is set to C++: + self.expect("expr -l c++ -- ns::func", + patterns = ["\(int .* = 0x.*"]) + # Make sure it fails if language is set to C: + self.expect("expr -l c -- ns::func", error=True, + startstr = "error") + # Make sure it fails if the target's language is set to C: + self.runCmd("settings set target.language c") + self.expect("expr ns::func", error=True, + startstr = "error") + self.runCmd("settings clear target.language") + ---------------- Please use SB API calls for expression evaluation instead of self.expect calls. Repository: rL LLVM http://reviews.llvm.org/D11447 _______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits