2 Regression test for <rdar://problem/8981098>:
4 The expression parser's type search only looks in the current compilation unit for types.
10 from lldbsuite.test.decorators import *
11 from lldbsuite.test.lldbtest import *
12 from lldbsuite.test import lldbutil
15 class ObjCTypeQueryTestCase(TestBase):
17 mydir = TestBase.compute_mydir(__file__)
20 # Call super's setUp().
22 # Find the line number to break for main.m.
23 self.line = line_number(
24 'main.m', "// Set breakpoint here, then do 'expr (NSArray*)array_token'.")
28 """The expression parser's type search should be wider than the current compilation unit."""
30 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
32 lldbutil.run_break_set_by_file_and_line(
33 self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
35 self.runCmd("run", RUN_SUCCEEDED)
37 # Now do a NSArry type query from the 'main.m' compile uint.
38 self.expect("expression (NSArray*)array_token",
39 substrs=['(NSArray *) $0 = 0x'])
40 # (NSArray *) $0 = 0x00007fff70118398