From 343210656cf7c2b89336adf1c063d7e8a305be4b Mon Sep 17 00:00:00 2001 From: Alex Langford Date: Thu, 2 Apr 2026 11:12:00 -0700 Subject: [PATCH] [lldb] Standardize TestVectorOfEnums.py as a C++ data formatter test (#189757) This is explicitly marked as a libc++ test and functionally tests the formatter for a vector of enums. I put it in the generic directory because there's no reason this couldn't work for other c++ stdlibs. Additionally, this should be using the custom libc++ like the other tests. --- .../data-formatter-stl/generic}/vector_of_enums/Makefile | 0 .../generic}/vector_of_enums/TestVectorOfEnums.py | 5 +++-- .../data-formatter-stl/generic}/vector_of_enums/main.cpp | 7 +------ 3 files changed, 4 insertions(+), 8 deletions(-) rename lldb/test/API/{commands/expression => functionalities/data-formatter/data-formatter-stl/generic}/vector_of_enums/Makefile (100%) rename lldb/test/API/{commands/expression => functionalities/data-formatter/data-formatter-stl/generic}/vector_of_enums/TestVectorOfEnums.py (87%) rename lldb/test/API/{commands/expression => functionalities/data-formatter/data-formatter-stl/generic}/vector_of_enums/main.cpp (82%) diff --git a/lldb/test/API/commands/expression/vector_of_enums/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/Makefile similarity index 100% rename from lldb/test/API/commands/expression/vector_of_enums/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/Makefile diff --git a/lldb/test/API/commands/expression/vector_of_enums/TestVectorOfEnums.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/TestVectorOfEnums.py similarity index 87% rename from lldb/test/API/commands/expression/vector_of_enums/TestVectorOfEnums.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/TestVectorOfEnums.py index 8580cadac3e2..254f701cc00c 100644 --- a/lldb/test/API/commands/expression/vector_of_enums/TestVectorOfEnums.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/TestVectorOfEnums.py @@ -3,7 +3,6 @@ Test Expression Parser regression test to ensure that we handle enums correctly, in this case specifically std::vector of enums. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -11,9 +10,11 @@ from lldbsuite.test import lldbutil class TestVectorOfEnums(TestBase): + SHARED_BUILD_TESTCASE = False + @add_test_categories(["libc++"]) def test_vector_of_enums(self): - self.build() + self.build(dictionary={"USE_LIBCPP": 1}) lldbutil.run_to_source_breakpoint( self, "// break here", lldb.SBFileSpec("main.cpp", False) diff --git a/lldb/test/API/commands/expression/vector_of_enums/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/main.cpp similarity index 82% rename from lldb/test/API/commands/expression/vector_of_enums/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/main.cpp index 10d3ae569a5f..101c461c1ee7 100644 --- a/lldb/test/API/commands/expression/vector_of_enums/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector_of_enums/main.cpp @@ -1,11 +1,6 @@ #include -enum E { -a, -b, -c, -d -} ; +enum E { a, b, c, d }; int main() { std::vector v = {E::a, E::b, E::c};