[libc++][NFC] Remove trailing whitespace from release notes
[llvm-project.git] / lldb / test / API / lang / objc / rdar-10967107 / TestRdar10967107.py
blob60906c1c8adb7c2583a5ded6c962db7854fa4433
1 """
2 Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
3 """
6 import lldb
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test.lldbtest import *
9 from lldbsuite.test import lldbutil
12 class Rdar10967107TestCase(TestBase):
13 def setUp(self):
14 # Call super's setUp().
15 TestBase.setUp(self)
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
37 self.expect(
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
43 self.expect(
44 "frame variable --raw",
45 substrs=[
46 "year",
47 "month",
48 "day",
49 "hour",
50 "minute",
51 "second",
52 "location",
53 "length",