1import lldb 2from lldbsuite.test.lldbtest import * 3from lldbsuite.test.decorators import * 4from lldbsuite.test import lldbutil 5 6 7class TestCase(TestBase): 8 @skipUnlessDarwin 9 def test_objc_self(self): 10 self.build() 11 lldbutil.run_to_source_breakpoint( 12 self, "check self", lldb.SBFileSpec("main.mm") 13 ) 14 self.expect("frame variable _ivar", startstr="(int) _ivar = 30") 15 16 @skipUnlessDarwin 17 def test_objc_explicit_self(self): 18 self.build() 19 lldbutil.run_to_source_breakpoint( 20 self, "check explicit self", lldb.SBFileSpec("main.mm") 21 ) 22 self.expect("frame variable _ivar", startstr="(int) _ivar = 30") 23 24 @skipUnlessDarwin 25 def test_cpp_this(self): 26 self.build() 27 lldbutil.run_to_source_breakpoint( 28 self, "check this", lldb.SBFileSpec("main.mm") 29 ) 30 self.expect("frame variable m_field", startstr="(int) m_field = 41") 31