brintos

brintos / llvm-project-archived public Read only

0
0
Text · 861 B · 5ef1cb4 Raw
25 lines · python
1import lldb2from lldbsuite.test.lldbtest import *3from lldbsuite.test.decorators import *4from lldbsuite.test import lldbutil5 6 7class TestCase(TestBase):8    @skipUnlessDarwin9    def test_objc_self(self):10        self.build()11        lldbutil.run_to_source_breakpoint(12            self, "// check self", lldb.SBFileSpec("main.m")13        )14        self.expect("frame variable _ivar", startstr="(int) _ivar = 30")15 16    @skipUnlessDarwin17    def test_objc_self_capture_idiom(self):18        self.build()19        lldbutil.run_to_source_breakpoint(20            self, "// check idiomatic self", lldb.SBFileSpec("main.m")21        )22        self.expect("frame variable weakSelf", startstr="(Classic *) weakSelf = 0x")23        self.expect("frame variable self", startstr="(Classic *) self = 0x")24        self.expect("frame variable _ivar", startstr="(int) _ivar = 30")25