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