2 Test that nested persistent types work.
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class NestedPersistentTypesTestCase(TestBase):
15 mydir = TestBase.compute_mydir(__file__)
17 def test_persistent_types(self):
18 """Test that nested persistent types work."""
21 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
23 self.runCmd("breakpoint set --name main")
25 self.runCmd("run", RUN_SUCCEEDED)
27 self.runCmd("expression struct $foo { int a; int b; };")
30 "expression struct $bar { struct $foo start; struct $foo end; };")
32 self.runCmd("expression struct $bar $my_bar = {{ 2, 3 }, { 4, 5 }};")
34 self.expect("expression $my_bar",
35 substrs=['a = 2', 'b = 3', 'a = 4', 'b = 5'])
37 self.expect("expression $my_bar.start.b",
38 substrs=['(int)', '3'])
40 self.expect("expression $my_bar.end.b",
41 substrs=['(int)', '5'])