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