5fef10e6d3edeca2e9b7f4f280e006851be1e517
[openbsd] /
1 """
2 Test lldb data formatter subsystem.
3 """
4
5
6
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
11
12
13 class InitializerListTestCase(TestBase):
14
15     mydir = TestBase.compute_mydir(__file__)
16
17     @skipIfWindows  # libc++ not ported to Windows yet
18     @skipIf(compiler="gcc")
19     @expectedFailureAll(
20         oslist=["linux"],
21         bugnumber="fails on clang 3.5 and tot")
22     def test(self):
23         """Test that that file and class static variables display correctly."""
24         self.build()
25         self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
26
27         bkpt = self.target().FindBreakpointByID(
28             lldbutil.run_break_set_by_source_regexp(
29                 self, "Set break point at this line."))
30
31         self.runCmd("run", RUN_SUCCEEDED)
32
33         lldbutil.skip_if_library_missing(
34             self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
35
36         # The stop reason of the thread should be breakpoint.
37         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
38                     substrs=['stopped',
39                              'stop reason = breakpoint'])
40
41         self.expect("frame variable ili", substrs=['[1] = 2', '[4] = 5'])
42         self.expect("frame variable ils", substrs=[
43                     '[4] = "surprise it is a long string!! yay!!"'])
44
45         self.expect('image list', substrs=self.getLibcPlusPlusLibs())