2 Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
7 from lldbsuite
.test
.decorators
import *
8 from lldbsuite
.test
.lldbtest
import *
9 from lldbsuite
.test
import lldbutil
12 class Rdar10967107TestCase(TestBase
):
14 # Call super's setUp().
16 # We'll use the test method name as the exe_name.
17 self
.exe_name
= self
.testMethodName
18 # Find the line number to break inside main().
19 self
.main_source
= "main.m"
20 self
.line
= line_number(self
.main_source
, "// Set breakpoint here.")
22 def test_cfrange_diff_cfgregoriandate(self
):
23 """Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued."""
24 d
= {"EXE": self
.exe_name
}
25 self
.build(dictionary
=d
)
26 self
.setTearDownCleanup(dictionary
=d
)
28 exe
= self
.getBuildArtifact(self
.exe_name
)
29 self
.runCmd("file " + exe
, CURRENT_EXECUTABLE_SET
)
31 lldbutil
.run_break_set_by_file_and_line(
32 self
, self
.main_source
, self
.line
, num_expected_locations
=1, loc_exact
=True
35 self
.runCmd("run", RUN_SUCCEEDED
)
36 # check that each type is correctly bound to its list of children
38 "frame variable cf_greg_date --raw",
39 substrs
=["year", "month", "day", "hour", "minute", "second"],
41 self
.expect("frame variable cf_range --raw", substrs
=["location", "length"])
42 # check that printing both does not somehow confuse LLDB
44 "frame variable --raw",