xref: /llvm-project/lldb/test/API/commands/expression/vector_of_enums/TestVectorOfEnums.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
1"""
2Test Expression Parser regression test to ensure that we handle enums
3correctly, in this case specifically std::vector of enums.
4"""
5
6
7import lldb
8from lldbsuite.test.decorators import *
9from lldbsuite.test.lldbtest import *
10from lldbsuite.test import lldbutil
11
12
13class TestVectorOfEnums(TestBase):
14    @add_test_categories(["libc++"])
15    def test_vector_of_enums(self):
16        self.build()
17
18        lldbutil.run_to_source_breakpoint(
19            self, "// break here", lldb.SBFileSpec("main.cpp", False)
20        )
21
22        self.expect("expr v", substrs=["size=3", "[0] = a", "[1] = b", "[2] = c", "}"])
23