]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
Vendor import of lldb trunk r256945:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / expression_command / persist_objc_pointeetype / TestPersistObjCPointeeType.py
1 """
2 Test that we can p *objcObject
3 """
4
5 from __future__ import print_function
6
7
8
9 import lldb
10 import lldbsuite.test.lldbutil as lldbutil
11 from lldbsuite.test.lldbtest import *
12
13 class PersistObjCPointeeType(TestBase):
14
15     mydir = TestBase.compute_mydir(__file__)
16
17     def setUp(self):
18         # Call super's setUp().
19         TestBase.setUp(self)
20         # Find the line number to break for main.cpp.
21         self.line = line_number('main.m','// break here')
22
23     @skipUnlessDarwin
24     @expectedFailureAll(
25         bugnumber='http://llvm.org/pr23504',
26         oslist=['macosx'], compiler='clang', compiler_version=['<', '7.0.0'])
27     def test_with(self):
28         """Test that we can p *objcObject"""
29         self.build()
30
31         def cleanup():
32             pass
33
34         # Execute the cleanup function during test case tear down.
35         self.addTearDownHook(cleanup)
36
37         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
38
39         lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, loc_exact=True)
40
41         self.runCmd("run", RUN_SUCCEEDED)
42         
43         self.expect("p *self", substrs=['_sc_name = nil',
44         '_sc_name2 = nil',
45         '_sc_name3 = nil',
46         '_sc_name4 = nil',
47         '_sc_name5 = nil',
48         '_sc_name6 = nil',
49         '_sc_name7 = nil',
50         '_sc_name8 = nil'])