[mlir][acc] Introduce MappableType interface (#122146)
[llvm-project.git] / lldb / test / API / lang / objc / modules-auto-import / TestModulesAutoImport.py
blob142d27ddad37f035d051e83ecccef1b68ebbaa60
1 """Test that importing modules in Objective-C works as expected."""
4 import lldb
6 from lldbsuite.test.decorators import *
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test import lldbutil
11 class ObjCModulesAutoImportTestCase(TestBase):
12 def setUp(self):
13 # Call super's setUp().
14 TestBase.setUp(self)
15 # Find the line number to break inside main().
16 self.line = line_number("main.m", "// Set breakpoint 0 here.")
18 @skipIf(macos_version=["<", "10.12"])
19 def test_expr(self):
20 self.build()
21 exe = self.getBuildArtifact("a.out")
22 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
24 # Break inside the foo function which takes a bar_ptr argument.
25 lldbutil.run_break_set_by_file_and_line(
26 self, "main.m", self.line, num_expected_locations=1, loc_exact=True
29 self.runCmd("run", RUN_SUCCEEDED)
31 # The stop reason of the thread should be breakpoint.
32 self.expect(
33 "thread list",
34 STOPPED_DUE_TO_BREAKPOINT,
35 substrs=["stopped", "stop reason = breakpoint"],
38 # The breakpoint should have a hit count of 1.
39 lldbutil.check_breakpoint(self, bpno=1, expected_hit_count=1)
41 self.runCmd("settings set target.auto-import-clang-modules true")
43 self.expect(
44 "expression getpid()", VARIABLES_DISPLAYED_CORRECTLY, substrs=["pid_t"]