2 Test lldb data formatter subsystem.
5 from __future__ import print_function
9 from lldbsuite.test.decorators import *
10 from lldbsuite.test.lldbtest import *
11 from lldbsuite.test import lldbutil
13 class StdSmartPtrDataFormatterTestCase(TestBase):
14 mydir = TestBase.compute_mydir(__file__)
17 @skipIfWindows # libstdcpp not ported to Windows
18 @skipIfDarwin # doesn't compile on Darwin
19 def test_with_run_command(self):
21 self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
23 lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")
24 self.runCmd("run", RUN_SUCCEEDED)
26 # The stop reason of the thread should be breakpoint.
27 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
28 substrs = ['stopped', 'stop reason = breakpoint'])
30 self.expect("frame variable nsp", substrs = ['nsp = nullptr'])
31 self.expect("frame variable isp", substrs = ['isp = 123'])
32 self.expect("frame variable ssp", substrs = ['ssp = "foobar"'])
34 self.expect("frame variable nwp", substrs = ['nwp = nullptr'])
35 self.expect("frame variable iwp", substrs = ['iwp = 123'])
36 self.expect("frame variable swp", substrs = ['swp = "foobar"'])
38 self.runCmd("continue")
40 self.expect("frame variable nsp", substrs = ['nsp = nullptr'])
41 self.expect("frame variable isp", substrs = ['isp = nullptr'])
42 self.expect("frame variable ssp", substrs = ['ssp = nullptr'])
44 self.expect("frame variable nwp", substrs = ['nwp = nullptr'])
45 self.expect("frame variable iwp", substrs = ['iwp = nullptr'])
46 self.expect("frame variable swp", substrs = ['swp = nullptr'])