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