]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
Vendor import of lldb release_39 branch r276489:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / functionalities / data-formatter / data-formatter-stl / libcxx / set / TestDataFormatterLibcxxSet.py
1 """
2 Test lldb data formatter subsystem.
3 """
4
5 from __future__ import print_function
6
7
8
9 import os, time
10 import lldb
11 from lldbsuite.test.decorators import *
12 from lldbsuite.test.lldbtest import *
13 from lldbsuite.test import lldbutil
14
15 class LibcxxSetDataFormatterTestCase(TestBase):
16
17     mydir = TestBase.compute_mydir(__file__)
18
19     @skipIf(compiler="gcc")
20     @skipIfWindows # libc++ not ported to Windows yet
21     def test_with_run_command(self):
22         """Test that that file and class static variables display correctly."""
23         self.build()
24         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
25         
26 #        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line."))
27
28         self.runCmd("run", RUN_SUCCEEDED)
29
30 #        lldbutil.skip_if_library_missing(self, self.target(), lldbutil.PrintableRegex("libc\+\+"))
31 #
32 #        # The stop reason of the thread should be breakpoint.
33 #        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
34 #            substrs = ['stopped',
35 #                       'stop reason = breakpoint'])
36 #
37 #        # This is the function to remove the custom formats in order to have a
38 #        # clean slate for the next test case.
39 #        def cleanup():
40 #            self.runCmd('type format clear', check=False)
41 #            self.runCmd('type summary clear', check=False)
42 #            self.runCmd('type filter clear', check=False)
43 #            self.runCmd('type synth clear', check=False)
44 #            self.runCmd("settings set target.max-children-count 256", check=False)
45 #
46 #        # Execute the cleanup function during test case tear down.
47 #        self.addTearDownHook(cleanup)
48 #
49 #        self.expect('image list', substrs = self.getLibcPlusPlusLibs())
50 #
51 #        self.expect("frame variable ii",substrs = ["size=0","{}"])
52 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
53 #        self.expect("frame variable ii",substrs = ["size=6","[0] = 0","[1] = 1", "[2] = 2", "[3] = 3", "[4] = 4", "[5] = 5"])
54 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
55 #        self.expect("frame variable ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"])
56 #        self.expect("frame variable ii[2]",substrs = [" = 2"])
57 #        self.expect("p ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"])
58 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
59 #        self.expect("frame variable ii",substrs = ["size=0","{}"])
60 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
61 #        self.expect("frame variable ii",substrs = ["size=0","{}"])
62 #        self.expect("frame variable ss",substrs = ["size=0","{}"])
63 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
64 #        self.expect("frame variable ss",substrs = ["size=2",'[0] = "a"','[1] = "a very long string is right here"'])
65 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
66 #        self.expect("frame variable ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"'])
67 #        self.expect("p ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"'])
68 #        self.expect("frame variable ss[2]",substrs = [' = "b"'])
69 #        lldbutil.continue_to_breakpoint(self.process(), bkpt)
70 #        self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"'])