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