24 lines · python
1"""2Test the warnings that LLDB emits when parsing Objective-C expressions.3"""4 5import lldb6from lldbsuite.test.decorators import *7from lldbsuite.test.lldbtest import *8from lldbsuite.test import lldbutil9 10 11class TestCase(TestBase):12 @skipUnlessDarwin13 @no_debug_info_test14 def test(self):15 self.build()16 lldbutil.run_to_source_breakpoint(17 self, "// break here", lldb.SBFileSpec("main.m")18 )19 20 # Don't warn about not using the result of getters. This is perfectly21 # fine in the expression parser and LLDB shouldn't warn the user about that.22 result = self.frame().EvaluateExpression("m.m; unknown_var_to_cause_an_error")23 self.assertNotIn("getters should not", str(result.GetError()))24