brintos

brintos / llvm-project-archived public Read only

0
0
Text · 882 B · 3364867 Raw
29 lines · python
1"""2Tests that frame variable --depth and --element-count options work correctly3together4"""5import lldb6from lldbsuite.test.lldbtest import *7import lldbsuite.test.lldbutil as lldbutil8 9 10class TestFrameVarDepthAndElemCount(TestBase):11    def test(self):12        """Test that bool types work in the expression parser"""13        self.build()14        lldbutil.run_to_source_breakpoint(15            self, "break here", lldb.SBFileSpec("main.cpp")16        )17 18        # Check that we print 5 elements but only 2 levels deep.19        self.expect(20            "frame var --depth 2 --element-count 5 -- c",21            substrs=[22                "[0] = {\n    b = {...}\n  }",23                "[1] = {\n    b = {...}\n  }",24                "[2] = {\n    b = {...}\n  }",25                "[3] = {\n    b = {...}\n  }",26                "[4] = {\n    b = {...}\n  }",27            ],28        )29