Files
clang-p2996/lldb/test/API/lang/objc/objc++/TestObjCXX.py
Michał Górny a852cf66ea [lldb] [test] Skip ObjC-based tests via 'objc' category
Replace the plethora of ObjC-implied 'skipUnlessDarwin' decorators
with marking tests as 'objc' category (whenever missing), and skip all
ObjC tests on non-Darwin platforms.  I have used '.categories' file
wherever it was present already or all (>1) tests were relying on ObjC,
and explicit add_test_categories() where there was only one test.

Differential Revision: https://reviews.llvm.org/D91056
2020-11-10 12:02:38 +01:00

33 lines
841 B
Python

"""
Make sure that ivars of Objective-C++ classes are visible in LLDB.
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCXXTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_break(self):
"""Test ivars of Objective-C++ classes"""
if self.getArchitecture() == 'i386':
self.skipTest("requires Objective-C 2.0 runtime")
self.build()
exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
lldbutil.run_break_set_by_source_regexp(
self, 'breakpoint 1', num_expected_locations=1)
self.runCmd("run", RUN_SUCCEEDED)
self.expect("expr f->f", "Found ivar in class",
substrs=["= 3"])