2 Test lldb data formatter subsystem.
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test.lldbtest import *
9 from lldbsuite.test import lldbutil
12 class StdSmartPtrDataFormatterTestCase(TestBase):
13 mydir = TestBase.compute_mydir(__file__)
15 @add_test_categories(["libstdcxx"])
16 def test_with_run_command(self):
18 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
20 lldbutil.run_break_set_by_source_regexp(
21 self, "Set break point at this line.")
22 self.runCmd("run", RUN_SUCCEEDED)
24 # The stop reason of the thread should be breakpoint.
25 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
26 substrs=['stopped', 'stop reason = breakpoint'])
28 self.expect("frame variable nsp", substrs=['nsp = nullptr'])
29 self.expect("frame variable isp", substrs=['isp = 123'])
30 self.expect("frame variable ssp", substrs=['ssp = "foobar"'])
32 self.expect("frame variable nwp", substrs=['nwp = nullptr'])
33 self.expect("frame variable iwp", substrs=['iwp = 123'])
34 self.expect("frame variable swp", substrs=['swp = "foobar"'])
36 self.runCmd("continue")
38 self.expect("frame variable nsp", substrs=['nsp = nullptr'])
39 self.expect("frame variable isp", substrs=['isp = nullptr'])
40 self.expect("frame variable ssp", substrs=['ssp = nullptr'])
42 self.expect("frame variable nwp", substrs=['nwp = nullptr'])
43 self.expect("frame variable iwp", substrs=['iwp = nullptr'])
44 self.expect("frame variable swp", substrs=['swp = nullptr'])