From 66a4fdb156d493bf994fd5c0050cfd2d7352732d Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Jul 2025 15:01:27 +0100 Subject: [PATCH 1/6] [lldb][test] Turn (most) libcxx data-formatters tests into generic tests This patch moves all the data-formatter tests that were only run for libc++ to the generic directory. There's nothing libc++ specific about these tests. For aynthing tied to libcxx we can have a dedicated subdirectory. But for now lets move as much into `generic` as possible. This involved renaming a bunch of files and passing the `USE_LIBCPP` and `USE_LIBSTDCPP` Makefile variables from within the python test-cases instead of the Makefiles. This is how the existing `generic` tests already worked. The only tests I haven't turned into "generic" ones are the ones for `std::string`. Next steps: 1. Move libstdcpp tests into the `generic` directory 2. Move as much of the `std::string` libc++ tests into `generic` --- .../{libcxx => generic}/atomic/Makefile | 1 - .../atomic/TestDataFormatterStdAtomic.py} | 18 +++-- .../{libcxx => generic}/atomic/main.cpp | 0 .../{libcxx => generic}/chrono/Makefile | 2 - .../chrono/TestDataFormatterStdChrono.py} | 16 +++- .../{libcxx => generic}/chrono/main.cpp | 0 .../{libcxx => generic}/function/Makefile | 1 - .../function/TestDataFormatterStdFunction.py} | 18 +++-- .../{libcxx => generic}/function/main.cpp | 0 .../initializerlist}/Makefile | 1 - .../TestDataFormatterStdInitializerList.py} | 16 +++- .../initializerlist/main.cpp | 0 .../iterator}/Makefile | 2 - .../iterator/TestDataFormatterIterator.py} | 18 +++-- .../{libcxx => generic}/iterator/main.cpp | 0 .../{libcxx/tuple => generic/map}/Makefile | 1 - .../map/TestDataFormatterMap.py} | 16 +++- .../{libcxx => generic}/map/main.cpp | 0 .../{libcxx/vbool => generic/queue}/Makefile | 3 +- .../queue/TestDataFormatterStdQueue.py} | 16 +++- .../{libcxx => generic}/queue/main.cpp | 0 .../span => generic/ranges/ref_view}/Makefile | 3 - .../TestDataFormatterLibcxxRangesRefView.py | 16 +++- .../TestDataFormatterStdRangesRefView.py | 79 +++++++++++++++++++ .../ranges/ref_view/main.cpp | 0 .../set/TestDataFormatterGenericSet.py | 2 +- .../{libcxx => generic}/shared_ptr/Makefile | 2 - .../TestDataFormatterStdSharedPtr.py} | 17 ++-- .../{libcxx => generic}/shared_ptr/main.cpp | 0 .../ranges/ref_view => generic/span}/Makefile | 3 +- .../span/TestDataFormatterStdSpan.py} | 32 ++++++-- .../{libcxx => generic}/span/main.cpp | 0 .../{libcxx => generic}/string_view/Makefile | 2 - .../TestDataFormatterStdStringView.py} | 26 ++++-- .../{libcxx => generic}/string_view/main.cpp | 0 .../valarray => generic/tuple}/Makefile | 2 - .../tuple/TestDataFormatterTuple.py} | 16 +++- .../{libcxx => generic}/tuple/main.cpp | 0 .../{libcxx => generic}/unique_ptr/Makefile | 2 - .../unique_ptr/TestDataFormatterUniquePtr.py} | 17 ++-- .../{libcxx => generic}/unique_ptr/main.cpp | 0 .../generic/unordered_map-iterator/Makefile | 3 + ...stDataFormatterStdUnorderedMapIterator.py} | 16 +++- .../unordered_map-iterator/main.cpp | 0 .../generic/valarray/Makefile | 3 + .../valarray/TestDataFormatterStdValarray.py} | 16 +++- .../{libcxx => generic}/valarray/main.cpp | 0 .../{libcxx => generic}/variant/Makefile | 2 - .../variant/TestDataFormatterStdVariant.py} | 16 +++- .../{libcxx => generic}/variant/main.cpp | 0 .../data-formatter-stl/generic/vbool/Makefile | 3 + .../vbool/TestDataFormatterVBool.py} | 16 +++- .../{libcxx => generic}/vbool/main.cpp | 0 .../generic/vector/Makefile | 3 + .../vector/TestDataFormatterVector.py} | 28 +++++-- .../{libcxx => generic}/vector/main.cpp | 0 .../libcxx/initializerlist/Makefile | 6 -- .../libcxx/iterator/Makefile | 6 -- .../data-formatter-stl/libcxx/map/Makefile | 6 -- .../data-formatter-stl/libcxx/vector/Makefile | 6 -- 60 files changed, 342 insertions(+), 136 deletions(-) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/atomic/Makefile (82%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/atomic/TestLibCxxAtomic.py => generic/atomic/TestDataFormatterStdAtomic.py} (85%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/atomic/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/chrono/Makefile (82%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/chrono/TestDataFormatterLibcxxChrono.py => generic/chrono/TestDataFormatterStdChrono.py} (98%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/chrono/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/function/Makefile (82%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/function/TestLibCxxFunction.py => generic/function/TestDataFormatterStdFunction.py} (87%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/function/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/queue => generic/initializerlist}/Makefile (75%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/initializerlist/TestInitializerList.py => generic/initializerlist/TestDataFormatterStdInitializerList.py} (78%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/initializerlist/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/unordered_map-iterator => generic/iterator}/Makefile (80%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/iterator/TestDataFormatterLibccIterator.py => generic/iterator/TestDataFormatterIterator.py} (90%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/iterator/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/tuple => generic/map}/Makefile (75%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/map/TestDataFormatterLibccMap.py => generic/map/TestDataFormatterMap.py} (97%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/map/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/vbool => generic/queue}/Makefile (75%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/queue/TestDataFormatterLibcxxQueue.py => generic/queue/TestDataFormatterStdQueue.py} (77%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/queue/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/span => generic/ranges/ref_view}/Makefile (81%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py (87%) create mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/ranges/ref_view/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/shared_ptr/Makefile (92%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py => generic/shared_ptr/TestDataFormatterStdSharedPtr.py} (91%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/shared_ptr/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/ranges/ref_view => generic/span}/Makefile (83%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/span/TestDataFormatterLibcxxSpan.py => generic/span/TestDataFormatterStdSpan.py} (88%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/span/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/string_view/Makefile (82%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/string_view/TestDataFormatterLibcxxStringView.py => generic/string_view/TestDataFormatterStdStringView.py} (93%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/string_view/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/valarray => generic/tuple}/Makefile (73%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/tuple/TestDataFormatterLibcxxTuple.py => generic/tuple/TestDataFormatterTuple.py} (77%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/tuple/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/unique_ptr/Makefile (92%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py => generic/unique_ptr/TestDataFormatterUniquePtr.py} (93%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/unique_ptr/main.cpp (100%) create mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py => generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py} (91%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/unordered_map-iterator/main.cpp (100%) create mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/Makefile rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/valarray/TestDataFormatterLibcxxValarray.py => generic/valarray/TestDataFormatterStdValarray.py} (94%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/valarray/main.cpp (100%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/variant/Makefile (82%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/variant/TestDataFormatterLibcxxVariant.py => generic/variant/TestDataFormatterStdVariant.py} (89%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/variant/main.cpp (100%) create mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/Makefile rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/vbool/TestDataFormatterLibcxxVBool.py => generic/vbool/TestDataFormatterVBool.py} (87%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/vbool/main.cpp (100%) create mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/Makefile rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx/vector/TestDataFormatterLibcxxVector.py => generic/vector/TestDataFormatterVector.py} (90%) rename lldb/test/API/functionalities/data-formatter/data-formatter-stl/{libcxx => generic}/vector/main.cpp (100%) delete mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile delete mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile delete mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile delete mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/Makefile similarity index 82% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/Makefile index b016f006747da..e78030cbf7528 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/Makefile @@ -1,5 +1,4 @@ CXX_SOURCES := main.cpp CXXFLAGS_EXTRAS := -std=c++11 -USE_LIBCPP := 1 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py similarity index 85% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py index c6592ede03147..87e7541dbfe24 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -class LibCxxAtomicTestCase(TestBase): +class StdAtomicTestCase(TestBase): def get_variable(self, name): var = self.frame().FindVariable(name) var.SetPreferDynamicValue(lldb.eDynamicCanRunTarget) @@ -17,10 +17,8 @@ def get_variable(self, name): return var @skipIf(compiler=["gcc"]) - @add_test_categories(["libc++"]) - def test(self): - """Test that std::atomic as defined by libc++ is correctly printed by LLDB""" - self.build() + def do_test(self): + """Test that std::atomic is correctly printed by LLDB""" self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) bkpt = self.target().FindBreakpointByID( @@ -66,3 +64,13 @@ def test(self): self.expect( "frame var p.child.parent", substrs=["p.child.parent = {\n Value = 0x"] ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/Makefile similarity index 82% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/Makefile index 57540fc1a2816..ac12cb120f853 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/Makefile @@ -1,6 +1,4 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - CXXFLAGS_EXTRAS := -std=c++20 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py similarity index 98% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py index 0737a5bc7e6eb..626633e322b14 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/TestDataFormatterLibcxxChrono.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py @@ -9,13 +9,11 @@ from lldbsuite.test import lldbutil -class LibcxxChronoDataFormatterTestCase(TestBase): - @add_test_categories(["libc++"]) +class StdChronoDataFormatterTestCase(TestBase): @skipIf(compiler="clang", compiler_version=["<", "17.0"]) - def test_with_run_command(self): + def do_test(self): """Test that that file and class static variables display correctly.""" isNotWindowsHost = lldbplatformutil.getHostPlatform() != "windows" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "break here", lldb.SBFileSpec("main.cpp", False) ) @@ -433,3 +431,13 @@ def test_with_run_command(self): "ymwdl_2024_last_tuesday_january = year=2024 month=January weekday=Tuesday index=last" ], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/chrono/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/Makefile similarity index 82% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/Makefile index b016f006747da..e78030cbf7528 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/Makefile @@ -1,5 +1,4 @@ CXX_SOURCES := main.cpp CXXFLAGS_EXTRAS := -std=c++11 -USE_LIBCPP := 1 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py similarity index 87% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py index 80461b996328f..8f68afb91af27 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -class LibCxxFunctionTestCase(TestBase): +class StdFunctionTestCase(TestBase): # Run frame var for a variable twice. Verify we do not hit the cache # the first time but do the second time. def run_frame_var_check_cache_use( @@ -34,10 +34,8 @@ def run_frame_var_check_cache_use( substrs=["lldb_private::CompileUnit::FindFunction"], ) - @add_test_categories(["libc++"]) - def test(self): - """Test that std::function as defined by libc++ is correctly printed by LLDB""" - self.build() + def do_test(self): + """Test that std::function is correctly printed by LLDB""" self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) bkpt = self.target().FindBreakpointByID( @@ -82,3 +80,13 @@ def test(self): self.expect( "frame variable f5", substrs=["f5 = Function = Bar::add_num(int) const"] ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/Makefile similarity index 75% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/Makefile index 680e1abfbef58..99998b20bcb05 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/Makefile @@ -1,4 +1,3 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py similarity index 78% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py index b8a1dd3569d77..b37b043f3a3a4 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py @@ -10,11 +10,9 @@ from lldbsuite.test import lldbutil -class InitializerListTestCase(TestBase): - @add_test_categories(["libc++"]) - def test(self): +class StdInitializerListTestCase(TestBase): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) bkpt = self.target().FindBreakpointByID( @@ -39,3 +37,13 @@ def test(self): "frame variable ils", substrs=['[4] = "surprise it is a long string!! yay!!"'], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/Makefile similarity index 80% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/Makefile index 564cbada74e08..a149c7f81bfab 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/Makefile @@ -1,6 +1,4 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - CXXFLAGS_EXTRAS := -O0 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py similarity index 90% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py index c43ee46fb658a..eff4aaac7b031 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -class LibcxxIteratorDataFormatterTestCase(TestBase): +class StdIteratorDataFormatterTestCase(TestBase): def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -17,10 +17,8 @@ def setUp(self): self.line = line_number("main.cpp", "// Set break point at this line.") self.namespace = "std" - @add_test_categories(["libc++"]) - def test_with_run_command(self): - """Test that libc++ iterators format properly.""" - self.build() + def do_test(self): + """Test that STL iterators format properly.""" self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( @@ -84,3 +82,13 @@ def cleanup(): self.expect("frame variable siumI.first", substrs=["second"], matching=False) self.expect("frame variable siumI.second", substrs=["second = 137"]) self.expect("frame variable siumI.second", substrs=["first"], matching=False) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/Makefile similarity index 75% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/Makefile index 680e1abfbef58..99998b20bcb05 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/Makefile @@ -1,4 +1,3 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py similarity index 97% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py index b2b83a3b46114..c6ae24e8992cf 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -class LibcxxMapDataFormatterTestCase(TestBase): +class StdMapDataFormatterTestCase(TestBase): def setUp(self): TestBase.setUp(self) ns = "ndk" if lldbplatformutil.target_is_android() else "" @@ -22,10 +22,8 @@ def check_pair(self, first_value, second_value): ] return ValueCheck(children=pair_children) - @add_test_categories(["libc++"]) - def test_with_run_command(self): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) bkpt = self.target().FindBreakpointByID( @@ -326,3 +324,13 @@ def cleanup(): lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss", substrs=["%s::map" % ns, "size=0", "{}"]) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/Makefile similarity index 75% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/Makefile index d87cf7d402787..99998b20bcb05 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/Makefile @@ -1,4 +1,3 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 -include Makefile.rules +include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py similarity index 77% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py index 53eaf5a23cc07..02898ffa0d881 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -class TestDataFormatterLibcxxQueue(TestBase): +class TestDataFormatterStdQueue(TestBase): def setUp(self): TestBase.setUp(self) self.namespace = "std" @@ -29,13 +29,21 @@ def check_variable(self, name): @expectedFailureAll( bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" ) - @add_test_categories(["libc++"]) - def test(self): + def do_test(self): """Test that std::queue is displayed correctly""" - self.build() lldbutil.run_to_source_breakpoint( self, "// break here", lldb.SBFileSpec("main.cpp", False) ) self.check_variable("q1") self.check_variable("q2") + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/Makefile similarity index 81% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/Makefile index 20c9cf06b1a63..4f79c0a900c3a 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/Makefile @@ -1,7 +1,4 @@ CXX_SOURCES := main.cpp - -USE_LIBCPP := 1 - CXXFLAGS_EXTRAS := -std=c++20 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py similarity index 87% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py index 9b5194be91e78..5603435168247 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -class LibcxxRangesRefViewDataFormatterTestCase(TestBase): +class StdRangesRefViewDataFormatterTestCase(TestBase): def check_string_vec_children(self): return [ ValueCheck(name="[0]", summary='"First"'), @@ -27,12 +27,10 @@ def check_string_vec_ref_view(self): def check_foo(self): return ValueCheck(name="vec", children=self.check_string_vec_children()) - @add_test_categories(["libc++"]) @skipIf(compiler=no_match("clang")) @skipIf(compiler="clang", compiler_version=["<", "16.0"]) - def test_with_run_command(self): + def do_test(self): """Test that std::ranges::ref_view is formatted correctly when printed.""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "Break here", lldb.SBFileSpec("main.cpp", False) ) @@ -69,3 +67,13 @@ def test_with_run_command(self): ) ], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcpp(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py new file mode 100644 index 0000000000000..5603435168247 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py @@ -0,0 +1,79 @@ +""" +Test LLDB's std::ranges::ref_view formatter +""" + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class StdRangesRefViewDataFormatterTestCase(TestBase): + def check_string_vec_children(self): + return [ + ValueCheck(name="[0]", summary='"First"'), + ValueCheck(name="[1]", summary='"Second"'), + ValueCheck(name="[2]", summary='"Third"'), + ValueCheck(name="[3]", summary='"Fourth"'), + ] + + def check_string_vec_ref_view(self): + return ValueCheck( + name="*__range_", + summary="size=4", + children=self.check_string_vec_children(), + ) + + def check_foo(self): + return ValueCheck(name="vec", children=self.check_string_vec_children()) + + @skipIf(compiler=no_match("clang")) + @skipIf(compiler="clang", compiler_version=["<", "16.0"]) + def do_test(self): + """Test that std::ranges::ref_view is formatted correctly when printed.""" + (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( + self, "Break here", lldb.SBFileSpec("main.cpp", False) + ) + + # Check ref_view over a std::string + self.expect_var_path( + "single", children=[ValueCheck(name="*__range_", summary='"First"')] + ) + + # Check all_view, which is a ref_view in this case + self.expect_var_path("all", children=[self.check_string_vec_ref_view()]) + + # Check take_view format. Embeds a ref_view + self.expect_var_path( + "subset", + children=[ + ValueCheck(children=[self.check_string_vec_ref_view()]), + ValueCheck(name="__count_", value="2"), + ], + ) + + lldbutil.continue_to_breakpoint(self.process(), bkpt) + + # Check ref_view over custom type 'struct Foo' + self.expect_var_path( + "view", + children=[ + ValueCheck( + name="*__range_", + children=[ + ValueCheck(name="[0]", type="Foo", children=[self.check_foo()]), + ValueCheck(name="[1]", type="Foo", children=[self.check_foo()]), + ], + ) + ], + ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcpp(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py index 03e18ff4335e5..d3d6ef55c6ff0 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py @@ -137,7 +137,7 @@ def test_with_run_command_libcpp(self): def do_test_ref_and_ptr(self, stdlib_type): """Test that the data formatters work on ref and ptr.""" - self.build() + self.build(dictionary={stdlib_type: "1"}) (self.target, process, _, bkpt) = lldbutil.run_to_source_breakpoint( self, "Stop here to check by ref and ptr.", diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/Makefile similarity index 92% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/Makefile index c1c8b4a2a0a53..ece665a0fd5b7 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/Makefile @@ -1,7 +1,5 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - # We need debug info tuning for lldb in order to emit the preferred name for # std::string. See https://reviews.llvm.org/D145803. CXXFLAGS_EXTRAS := -std=c++14 -glldb diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py similarity index 91% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py index 61c050b3bfa01..e2c04ec059f2b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py @@ -1,5 +1,5 @@ """ -Test lldb data formatter for libc++ std::shared_ptr. +Test lldb data formatter for std::shared_ptr. """ @@ -10,11 +10,8 @@ class TestCase(TestBase): - @add_test_categories(["libc++"]) - def test_shared_ptr_variables(self): + def do_test(self): """Test `frame variable` output for `std::shared_ptr` types.""" - self.build() - lldbutil.run_to_source_breakpoint( self, "// break here", lldb.SBFileSpec("main.cpp") ) @@ -96,3 +93,13 @@ def test_shared_ptr_variables(self): self.expect_var_path("ptr_node->next->value", value="2") self.expect_var_path("(*ptr_node).value", value="1") self.expect_var_path("(*(*ptr_node).next).value", value="2") + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/Makefile similarity index 83% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/Makefile index 3c4f9b45f41de..344f9e1d7fd7b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/Makefile @@ -1,6 +1,5 @@ -USE_LIBCPP := 1 - CXX_SOURCES := main.cpp + CXXFLAGS_EXTRAS := -std=c++20 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/TestDataFormatterLibcxxSpan.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py similarity index 88% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/TestDataFormatterLibcxxSpan.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py index 42efe415b6acf..cfef1cad3d295 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/TestDataFormatterLibcxxSpan.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -class LibcxxSpanDataFormatterTestCase(TestBase): +class StdSpanDataFormatterTestCase(TestBase): def findVariable(self, name): var = self.frame().FindVariable(name) self.assertTrue(var.IsValid()) @@ -44,11 +44,8 @@ def check_numbers(self, var_name): self.expect_var_path(f"{var_name}[3]", type="int", value="1234") self.expect_var_path(f"{var_name}[4]", type="int", value="12345") - @add_test_categories(["libc++"]) - @skipIf(compiler="clang", compiler_version=["<", "11.0"]) - def test_with_run_command(self): + def do_test(self): """Test that std::span variables are formatted correctly when printed.""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "break here", lldb.SBFileSpec("main.cpp", False) ) @@ -160,9 +157,18 @@ def test_with_run_command(self): @add_test_categories(["libc++"]) @skipIf(compiler="clang", compiler_version=["<", "11.0"]) - def test_ref_and_ptr(self): + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + @skipIf(compiler="clang", compiler_version=["<", "11.0"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() + + def do_test_ref_and_ptr(self): """Test that std::span is correctly formatted when passed by ref and ptr""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "Stop here to check by ref", lldb.SBFileSpec("main.cpp", False) ) @@ -173,3 +179,15 @@ def test_ref_and_ptr(self): # The pointer should just show the right number of elements: self.expect("frame variable ptr", patterns=["ptr = 0x[0-9a-f]+ size=5"]) + + @add_test_categories(["libc++"]) + @skipIf(compiler="clang", compiler_version=["<", "11.0"]) + def test_ref_and_ptr_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test_ref_and_ptr() + + @add_test_categories(["libstdcxx"]) + @skipIf(compiler="clang", compiler_version=["<", "11.0"]) + def test_ref_and_ptr_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test_ref_and_ptr() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/span/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/Makefile similarity index 82% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/Makefile index c7c91da728d1e..7025148aa9eb5 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/Makefile @@ -1,6 +1,4 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - CXXFLAGS_EXTRAS := -std=c++11 -O0 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py similarity index 93% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py index 3883395f23924..0df3686127b71 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py @@ -10,7 +10,7 @@ from lldbsuite.test import lldbutil -class LibcxxStringViewDataFormatterTestCase(TestBase): +class StdStringViewDataFormatterTestCase(TestBase): def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -20,16 +20,10 @@ def setUp(self): "main.cpp", "// Break here to look at bad string view." ) - @add_test_categories(["libc++"]) - @expectedFailureAll( - bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" - ) # Inline namespace is randomly ignored as Clang due to broken lookup inside # the std namespace. - @expectedFailureAll(debug_info="gmodules") - def test_with_run_command(self): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( @@ -160,3 +154,19 @@ def cleanup(): broken_obj = self.frame().GetValueForVariablePath("in_str_view") self.assertEqual(broken_obj.GetSummary(), "Summary Unavailable") + + @expectedFailureAll( + bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" + ) + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @expectedFailureAll( + bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" + ) + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/Makefile similarity index 73% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/Makefile index c5df567e01a2a..99998b20bcb05 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/Makefile @@ -1,5 +1,3 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py similarity index 77% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py index 5b6dfaf5e5d9d..34b747cdbe291 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py @@ -9,16 +9,14 @@ from lldbsuite.test import lldbutil -class TestDataFormatterLibcxxTuple(TestBase): +class TestDataFormatterStdTuple(TestBase): def setUp(self): TestBase.setUp(self) self.line = line_number("main.cpp", "// break here") self.namespace = "std" - @add_test_categories(["libc++"]) - def test(self): + def do_test(self): """Test that std::tuple is displayed correctly""" - self.build() lldbutil.run_to_source_breakpoint( self, "// break here", lldb.SBFileSpec("main.cpp", False) ) @@ -43,3 +41,13 @@ def test(self): "}", ], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/Makefile similarity index 92% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/Makefile index c1c8b4a2a0a53..ece665a0fd5b7 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/Makefile @@ -1,7 +1,5 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - # We need debug info tuning for lldb in order to emit the preferred name for # std::string. See https://reviews.llvm.org/D145803. CXXFLAGS_EXTRAS := -std=c++14 -glldb diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py similarity index 93% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py index 25a1cd82a4baa..8fca83ce80893 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py @@ -1,5 +1,5 @@ """ -Test lldb data formatter for libc++ std::unique_ptr. +Test lldb data formatter for std::unique_ptr. """ @@ -32,11 +32,8 @@ def make_expected_basic_string_ptr(self) -> str: "std::default_delete, std::allocator > > >" ) - @add_test_categories(["libc++"]) - def test_unique_ptr_variables(self): + def do_test(self): """Test `frame variable` output for `std::unique_ptr` types.""" - self.build() - lldbutil.run_to_source_breakpoint( self, "// break here", lldb.SBFileSpec("main.cpp") ) @@ -121,3 +118,13 @@ def test_unique_ptr_variables(self): self.expect_var_path("ptr_node->next->value", value="2") self.expect_var_path("(*ptr_node).value", value="1") self.expect_var_path("(*(*ptr_node).next).value", value="2") + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile new file mode 100644 index 0000000000000..99998b20bcb05 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/Makefile @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp + +include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py similarity index 91% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py index bf103aa78baba..e950bd677a3e0 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/TestDataFormatterLibccUnorderedMap.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py @@ -8,7 +8,7 @@ from lldbsuite.test import lldbutil -class LibcxxUnorderedMapDataFormatterTestCase(TestBase): +class StdUnorderedMapIteratorDataFormatterTestCase(TestBase): def check_ptr_or_ref(self, var_name: str): var = self.frame().FindVariable(var_name) self.assertTrue(var) @@ -32,12 +32,10 @@ def check_ptr_ptr(self, var_name: str): self.assertEqual(pair.GetChildAtIndex(0).summary, '"Hello"') self.assertEqual(pair.GetChildAtIndex(1).summary, '"World"') - @add_test_categories(["libc++"]) - def test_iterator_formatters(self): + def do_test(self): """Test that std::unordered_map related structures are formatted correctly when printed. Currently only tests format of std::unordered_map iterators. """ - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "Break here", lldb.SBFileSpec("main.cpp", False) ) @@ -113,3 +111,13 @@ def test_iterator_formatters(self): self.check_ptr_ptr("ptr4") self.check_ptr_ptr("ptr5") self.check_ptr_ptr("ptr6") + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unordered_map-iterator/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/Makefile new file mode 100644 index 0000000000000..99998b20bcb05 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/Makefile @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp + +include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/TestDataFormatterLibcxxValarray.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py similarity index 94% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/TestDataFormatterLibcxxValarray.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py index 613546b50a770..42cbaeba45115 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/TestDataFormatterLibcxxValarray.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py @@ -9,11 +9,9 @@ from lldbsuite.test import lldbutil -class LibcxxChronoDataFormatterTestCase(TestBase): - @add_test_categories(["libc++"]) - def test_with_run_command(self): +class StdValarrayDataFormatterTestCase(TestBase): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "break here", lldb.SBFileSpec("main.cpp", False) ) @@ -179,3 +177,13 @@ def test_with_run_command(self): error=True, substrs=['array index 3 is not valid for "(indirect_array) ia"'], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/valarray/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/Makefile similarity index 82% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/Makefile index 7eeff7407804d..8783ac3ad8a4e 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/Makefile @@ -1,6 +1,4 @@ CXX_SOURCES := main.cpp -USE_LIBCPP := 1 - CXXFLAGS_EXTRAS := -std=c++17 include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py similarity index 89% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py index 47e07a5ce3f5b..19d18d6b4ed9b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py @@ -9,8 +9,7 @@ from lldbsuite.test import lldbutil -class LibcxxVariantDataFormatterTestCase(TestBase): - @add_test_categories(["libc++"]) +class StdVariantDataFormatterTestCase(TestBase): ## Clang 7.0 is the oldest Clang that can reliably parse newer libc++ versions ## with -std=c++17. @skipIf( @@ -20,9 +19,8 @@ class LibcxxVariantDataFormatterTestCase(TestBase): @skipIf(compiler="gcc", compiler_version=["<", "5.1"]) ## std::get is unavailable for std::variant before macOS 10.14 @skipIf(macos_version=["<", "10.14"]) - def test_with_run_command(self): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint( self, "// break here", lldb.SBFileSpec("main.cpp", False) @@ -86,3 +84,13 @@ def test_with_run_command(self): "frame variable v_300_types_no_value", substrs=["v_300_types_no_value = No Value"], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/Makefile new file mode 100644 index 0000000000000..8046b0bca5533 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/Makefile @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp +include Makefile.rules + diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py similarity index 87% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py index 24dddee62e1e7..cd5478b178b75 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py @@ -9,17 +9,15 @@ from lldbsuite.test import lldbutil -class LibcxxVBoolDataFormatterTestCase(TestBase): +class StdVBoolDataFormatterTestCase(TestBase): def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break at. self.line = line_number("main.cpp", "// Set break point at this line.") - @add_test_categories(["libc++"]) - def test_with_run_command(self): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( @@ -74,3 +72,13 @@ def cleanup(): "[48] = true", ], ) + + @add_test_categories(["libc++"]) + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/Makefile new file mode 100644 index 0000000000000..99998b20bcb05 --- /dev/null +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/Makefile @@ -0,0 +1,3 @@ +CXX_SOURCES := main.cpp + +include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py similarity index 90% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py index 13341a9b274be..698d583f30f3d 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py @@ -9,7 +9,7 @@ from lldbsuite.test import lldbutil -class LibcxxVectorDataFormatterTestCase(TestBase): +class StdVectorDataFormatterTestCase(TestBase): def check_numbers(self, var_name, show_ptr=False): patterns = [] substrs = [ @@ -52,10 +52,8 @@ def check_numbers(self, var_name, show_ptr=False): self.expect("frame variable " + var_name + "[2]", substrs=["123"]) self.expect("frame variable " + var_name + "[3]", substrs=["1234"]) - @add_test_categories(["libc++"]) - def test_with_run_command(self): + def do_test(self): """Test that that file and class static variables display correctly.""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "break here", lldb.SBFileSpec("main.cpp", False) ) @@ -171,9 +169,17 @@ def cleanup(): self.expect("frame variable strings", substrs=["vector has 0 items"]) @add_test_categories(["libc++"]) - def test_ref_and_ptr(self): + def test_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test() + + @add_test_categories(["libstdcxx"]) + def test_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test() + + def do_test_ref_and_ptr(self): """Test that that file and class static variables display correctly.""" - self.build() (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( self, "Stop here to check by ref", lldb.SBFileSpec("main.cpp", False) ) @@ -186,3 +192,13 @@ def test_ref_and_ptr(self): self.expect("frame variable ptr", substrs=["ptr =", " size=7"]) self.expect("expression ptr", substrs=["$", "size=7"]) + + @add_test_categories(["libc++"]) + def test_ref_and_ptr_libcxx(self): + self.build(dictionary={"USE_LIBCPP" : 1}) + self.do_test_ref_and_ptr() + + @add_test_categories(["libstdcxx"]) + def test_ref_and_ptr_libstdcxx(self): + self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.do_test_ref_and_ptr() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp similarity index 100% rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/main.cpp rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile deleted file mode 100644 index 98af672c70fbe..0000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -CXX_SOURCES := main.cpp -CXXFLAGS_EXTRAS := -std=c++11 - -USE_LIBCPP := 1 - -include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile deleted file mode 100644 index 564cbada74e08..0000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -CXX_SOURCES := main.cpp - -USE_LIBCPP := 1 - -CXXFLAGS_EXTRAS := -O0 -include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile deleted file mode 100644 index 564cbada74e08..0000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -CXX_SOURCES := main.cpp - -USE_LIBCPP := 1 - -CXXFLAGS_EXTRAS := -O0 -include Makefile.rules diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile deleted file mode 100644 index 564cbada74e08..0000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -CXX_SOURCES := main.cpp - -USE_LIBCPP := 1 - -CXXFLAGS_EXTRAS := -O0 -include Makefile.rules From 46db059ab35c2e504555cd9124fc678222d73889 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Jul 2025 17:21:03 +0100 Subject: [PATCH 2/6] fixup! delete leftover test --- .../TestDataFormatterLibcxxRangesRefView.py | 79 ------------------- 1 file changed, 79 deletions(-) delete mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py deleted file mode 100644 index 5603435168247..0000000000000 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py +++ /dev/null @@ -1,79 +0,0 @@ -""" -Test LLDB's std::ranges::ref_view formatter -""" - -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class StdRangesRefViewDataFormatterTestCase(TestBase): - def check_string_vec_children(self): - return [ - ValueCheck(name="[0]", summary='"First"'), - ValueCheck(name="[1]", summary='"Second"'), - ValueCheck(name="[2]", summary='"Third"'), - ValueCheck(name="[3]", summary='"Fourth"'), - ] - - def check_string_vec_ref_view(self): - return ValueCheck( - name="*__range_", - summary="size=4", - children=self.check_string_vec_children(), - ) - - def check_foo(self): - return ValueCheck(name="vec", children=self.check_string_vec_children()) - - @skipIf(compiler=no_match("clang")) - @skipIf(compiler="clang", compiler_version=["<", "16.0"]) - def do_test(self): - """Test that std::ranges::ref_view is formatted correctly when printed.""" - (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( - self, "Break here", lldb.SBFileSpec("main.cpp", False) - ) - - # Check ref_view over a std::string - self.expect_var_path( - "single", children=[ValueCheck(name="*__range_", summary='"First"')] - ) - - # Check all_view, which is a ref_view in this case - self.expect_var_path("all", children=[self.check_string_vec_ref_view()]) - - # Check take_view format. Embeds a ref_view - self.expect_var_path( - "subset", - children=[ - ValueCheck(children=[self.check_string_vec_ref_view()]), - ValueCheck(name="__count_", value="2"), - ], - ) - - lldbutil.continue_to_breakpoint(self.process(), bkpt) - - # Check ref_view over custom type 'struct Foo' - self.expect_var_path( - "view", - children=[ - ValueCheck( - name="*__range_", - children=[ - ValueCheck(name="[0]", type="Foo", children=[self.check_foo()]), - ValueCheck(name="[1]", type="Foo", children=[self.check_foo()]), - ], - ) - ], - ) - - @add_test_categories(["libc++"]) - def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) - self.do_test() - - @add_test_categories(["libstdcxx"]) - def test_libstdcpp(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) - self.do_test() From 255b6ea870e010add59d6c922be2d3e359148f19 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Jul 2025 17:22:30 +0100 Subject: [PATCH 3/6] fixup! move decorators --- .../atomic/TestDataFormatterStdAtomic.py | 3 ++- .../chrono/TestDataFormatterStdChrono.py | 3 ++- .../queue/TestDataFormatterStdQueue.py | 9 ++++--- .../TestDataFormatterStdRangesRefView.py | 6 +++-- .../variant/TestDataFormatterStdVariant.py | 27 ++++++++++++------- 5 files changed, 32 insertions(+), 16 deletions(-) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py index 87e7541dbfe24..04c4831cb2b4b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py @@ -16,7 +16,6 @@ def get_variable(self, name): var.SetPreferSyntheticValue(True) return var - @skipIf(compiler=["gcc"]) def do_test(self): """Test that std::atomic is correctly printed by LLDB""" self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) @@ -65,11 +64,13 @@ def do_test(self): "frame var p.child.parent", substrs=["p.child.parent = {\n Value = 0x"] ) + @skipIf(compiler=["gcc"]) @add_test_categories(["libc++"]) def test_libcxx(self): self.build(dictionary={"USE_LIBCPP" : 1}) self.do_test() + @skipIf(compiler=["gcc"]) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): self.build(dictionary={"USE_LIBSTDCPP" : 1}) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py index 626633e322b14..a69fb95729442 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py @@ -10,7 +10,6 @@ class StdChronoDataFormatterTestCase(TestBase): - @skipIf(compiler="clang", compiler_version=["<", "17.0"]) def do_test(self): """Test that that file and class static variables display correctly.""" isNotWindowsHost = lldbplatformutil.getHostPlatform() != "windows" @@ -432,11 +431,13 @@ def do_test(self): ], ) + @skipIf(compiler="clang", compiler_version=["<", "17.0"]) @add_test_categories(["libc++"]) def test_libcxx(self): self.build(dictionary={"USE_LIBCPP" : 1}) self.do_test() + @skipIf(compiler="clang", compiler_version=["<", "17.0"]) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): self.build(dictionary={"USE_LIBSTDCPP" : 1}) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py index 02898ffa0d881..c48488cdec88b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py @@ -26,9 +26,6 @@ def check_variable(self, name): self.assertTrue(ch.IsValid()) self.assertEqual(ch.GetValueAsSigned(), i + 1) - @expectedFailureAll( - bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" - ) def do_test(self): """Test that std::queue is displayed correctly""" lldbutil.run_to_source_breakpoint( @@ -38,11 +35,17 @@ def do_test(self): self.check_variable("q1") self.check_variable("q2") + @expectedFailureAll( + bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" + ) @add_test_categories(["libc++"]) def test_libcxx(self): self.build(dictionary={"USE_LIBCPP" : 1}) self.do_test() + @expectedFailureAll( + bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android" + ) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): self.build(dictionary={"USE_LIBSTDCPP" : 1}) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py index 5603435168247..27047fe56a7ea 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py @@ -27,8 +27,6 @@ def check_string_vec_ref_view(self): def check_foo(self): return ValueCheck(name="vec", children=self.check_string_vec_children()) - @skipIf(compiler=no_match("clang")) - @skipIf(compiler="clang", compiler_version=["<", "16.0"]) def do_test(self): """Test that std::ranges::ref_view is formatted correctly when printed.""" (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint( @@ -68,11 +66,15 @@ def do_test(self): ], ) + @skipIf(compiler=no_match("clang")) + @skipIf(compiler="clang", compiler_version=["<", "16.0"]) @add_test_categories(["libc++"]) def test_libcxx(self): self.build(dictionary={"USE_LIBCPP" : 1}) self.do_test() + @skipIf(compiler=no_match("clang")) + @skipIf(compiler="clang", compiler_version=["<", "16.0"]) @add_test_categories(["libstdcxx"]) def test_libstdcpp(self): self.build(dictionary={"USE_LIBSTDCPP" : 1}) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py index 19d18d6b4ed9b..3d7444623993d 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py @@ -10,15 +10,6 @@ class StdVariantDataFormatterTestCase(TestBase): - ## Clang 7.0 is the oldest Clang that can reliably parse newer libc++ versions - ## with -std=c++17. - @skipIf( - oslist=no_match(["macosx"]), compiler="clang", compiler_version=["<", "7.0"] - ) - ## We are skipping gcc version less that 5.1 since this test requires -std=c++17 - @skipIf(compiler="gcc", compiler_version=["<", "5.1"]) - ## std::get is unavailable for std::variant before macOS 10.14 - @skipIf(macos_version=["<", "10.14"]) def do_test(self): """Test that that file and class static variables display correctly.""" @@ -85,11 +76,29 @@ def do_test(self): substrs=["v_300_types_no_value = No Value"], ) + ## Clang 7.0 is the oldest Clang that can reliably parse newer libc++ versions + ## with -std=c++17. + @skipIf( + oslist=no_match(["macosx"]), compiler="clang", compiler_version=["<", "7.0"] + ) + ## We are skipping gcc version less that 5.1 since this test requires -std=c++17 + @skipIf(compiler="gcc", compiler_version=["<", "5.1"]) + ## std::get is unavailable for std::variant before macOS 10.14 + @skipIf(macos_version=["<", "10.14"]) @add_test_categories(["libc++"]) def test_libcxx(self): self.build(dictionary={"USE_LIBCPP" : 1}) self.do_test() + ## Clang 7.0 is the oldest Clang that can reliably parse newer libc++ versions + ## with -std=c++17. + @skipIf( + oslist=no_match(["macosx"]), compiler="clang", compiler_version=["<", "7.0"] + ) + ## We are skipping gcc version less that 5.1 since this test requires -std=c++17 + @skipIf(compiler="gcc", compiler_version=["<", "5.1"]) + ## std::get is unavailable for std::variant before macOS 10.14 + @skipIf(macos_version=["<", "10.14"]) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): self.build(dictionary={"USE_LIBSTDCPP" : 1}) From e77068b37f62722953e7a2003ddd8515174b9269 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Jul 2025 17:22:58 +0100 Subject: [PATCH 4/6] fixup! clang-format --- .../generic/atomic/main.cpp | 26 ++-- .../generic/function/main.cpp | 54 +++---- .../generic/initializerlist/main.cpp | 15 +- .../data-formatter-stl/generic/map/main.cpp | 146 +++++++++--------- .../data-formatter-stl/generic/queue/main.cpp | 4 +- .../data-formatter-stl/generic/tuple/main.cpp | 2 +- .../generic/unique_ptr/main.cpp | 2 +- .../generic/variant/main.cpp | 130 ++++++++-------- .../data-formatter-stl/generic/vbool/main.cpp | 109 +++++++------ .../generic/vector/main.cpp | 55 ++++--- 10 files changed, 263 insertions(+), 280 deletions(-) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/main.cpp index 760d2384a772b..ee77a880a0c5d 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/main.cpp @@ -6,28 +6,26 @@ struct Child { // This should point to the parent which in turn owns this // child instance. This cycle should not cause LLDB to infinite loop // during printing. - std::atomic parent{nullptr}; + std::atomic parent{nullptr}; }; struct Parent { Child child; }; struct S { - int x = 1; - int y = 2; + int x = 1; + int y = 2; }; -int main () -{ - std::atomic s; - s.store(S()); - std::atomic i; - i.store(5); +int main() { + std::atomic s; + s.store(S()); + std::atomic i; + i.store(5); - Parent p; - // Let the child node know what its parent is. - p.child.parent = &p; + Parent p; + // Let the child node know what its parent is. + p.child.parent = &p; - return 0; // Set break point at this line. + return 0; // Set break point at this line. } - diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp index ef7c97470652f..86ab18fd9cc43 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp @@ -1,51 +1,43 @@ #include -int foo(int x, int y) { - return x + y - 1; -} +int foo(int x, int y) { return x + y - 1; } struct Bar { - int operator()() { - return 66 ; - } - int add_num(int i) const { return i + 3 ; } - int add_num2(int i) { - std::function add_num2_f = [](int x) { - return x+1; - }; - - return add_num2_f(i); // Set break point at this line. - } -} ; + int operator()() { return 66; } + int add_num(int i) const { return i + 3; } + int add_num2(int i) { + std::function add_num2_f = [](int x) { return x + 1; }; + + return add_num2_f(i); // Set break point at this line. + } +}; int foo2() { - auto f = [](int x) { - return x+1; - }; + auto f = [](int x) { return x + 1; }; - std::function foo2_f = f; + std::function foo2_f = f; - return foo2_f(10); // Set break point at this line. + return foo2_f(10); // Set break point at this line. } -int main (int argc, char *argv[]) -{ +int main(int argc, char *argv[]) { int acc = 42; - std::function f1 = foo; - std::function f2 = [acc,f1] (int x) -> int { - return x+f1(acc,x); + std::function f1 = foo; + std::function f2 = [acc, f1](int x) -> int { + return x + f1(acc, x); }; auto f = [](int x, int y) { return x + y; }; - auto g = [](int x, int y) { return x * y; } ; - std::function f3 = argc %2 ? f : g ; + auto g = [](int x, int y) { return x * y; }; + std::function f3 = argc % 2 ? f : g; - Bar bar1 ; - std::function f4( bar1 ) ; - std::function f5 = &Bar::add_num; + Bar bar1; + std::function f4(bar1); + std::function f5 = &Bar::add_num; int foo2_result = foo2(); int bar_add_num2_result = bar1.add_num2(10); - return f1(acc,acc) + f2(acc) + f3(acc+1,acc+2) + f4() + f5(bar1, 10); // Set break point at this line. + return f1(acc, acc) + f2(acc) + f3(acc + 1, acc + 2) + f4() + + f5(bar1, 10); // Set break point at this line. } diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/main.cpp index 88fe273ae8e3e..a9d159e0be28a 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/main.cpp @@ -1,12 +1,11 @@ +#include #include #include -#include -int main () -{ - std::initializer_list ili{1,2,3,4,5}; - std::initializer_list ils{"1","2","3","4","surprise it is a long string!! yay!!"}; - - return 0; // Set break point at this line. -} +int main() { + std::initializer_list ili{1, 2, 3, 4, 5}; + std::initializer_list ils{ + "1", "2", "3", "4", "surprise it is a long string!! yay!!"}; + return 0; // Set break point at this line. +} diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/main.cpp index 43ce6aeefd2a2..91bdf0b58d9e4 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/main.cpp @@ -1,82 +1,80 @@ -#include #include +#include -#define intint_map std::map -#define strint_map std::map -#define intstr_map std::map -#define strstr_map std::map +#define intint_map std::map +#define strint_map std::map +#define intstr_map std::map +#define strstr_map std::map int g_the_foo = 0; -int thefoo_rw(int arg = 1) -{ - if (arg < 0) - arg = 0; - if (!arg) - arg = 1; - g_the_foo += arg; - return g_the_foo; +int thefoo_rw(int arg = 1) { + if (arg < 0) + arg = 0; + if (!arg) + arg = 1; + g_the_foo += arg; + return g_the_foo; } -int main() -{ - intint_map ii; - - ii[0] = 0; // Set break point at this line. - ii[1] = 1; - - intint_map::iterator it = ii.begin(); - intint_map::const_iterator const_it = ii.cbegin(); - std::printf("%d %d\n", it->second, const_it->second); - - thefoo_rw(1); // Set break point at this line. - ii[2] = 0; - ii[3] = 1; - thefoo_rw(1); // Set break point at this line. - ii[4] = 0; - ii[5] = 1; - ii[6] = 0; - ii[7] = 1; - thefoo_rw(1); // Set break point at this line. - ii[85] = 1234567; - - ii.clear(); - - strint_map si; - thefoo_rw(1); // Set break point at this line. - - si["zero"] = 0; - thefoo_rw(1); // Set break point at this line. - si["one"] = 1; - si["two"] = 2; - si["three"] = 3; - thefoo_rw(1); // Set break point at this line. - si["four"] = 4; - - si.clear(); - thefoo_rw(1); // Set break point at this line. - - intstr_map is; - thefoo_rw(1); // Set break point at this line. - is[85] = "goofy"; - is[1] = "is"; - is[2] = "smart"; - is[3] = "!!!"; - thefoo_rw(1); // Set break point at this line. - - is.clear(); - thefoo_rw(1); // Set break point at this line. - - strstr_map ss; - thefoo_rw(1); // Set break point at this line. - - ss["ciao"] = "hello"; - ss["casa"] = "house"; - ss["gatto"] = "cat"; - thefoo_rw(1); // Set break point at this line. - ss["a Mac.."] = "..is always a Mac!"; - - ss.clear(); - thefoo_rw(1); // Set break point at this line. - return 0; +int main() { + intint_map ii; + + ii[0] = 0; // Set break point at this line. + ii[1] = 1; + + intint_map::iterator it = ii.begin(); + intint_map::const_iterator const_it = ii.cbegin(); + std::printf("%d %d\n", it->second, const_it->second); + + thefoo_rw(1); // Set break point at this line. + ii[2] = 0; + ii[3] = 1; + thefoo_rw(1); // Set break point at this line. + ii[4] = 0; + ii[5] = 1; + ii[6] = 0; + ii[7] = 1; + thefoo_rw(1); // Set break point at this line. + ii[85] = 1234567; + + ii.clear(); + + strint_map si; + thefoo_rw(1); // Set break point at this line. + + si["zero"] = 0; + thefoo_rw(1); // Set break point at this line. + si["one"] = 1; + si["two"] = 2; + si["three"] = 3; + thefoo_rw(1); // Set break point at this line. + si["four"] = 4; + + si.clear(); + thefoo_rw(1); // Set break point at this line. + + intstr_map is; + thefoo_rw(1); // Set break point at this line. + is[85] = "goofy"; + is[1] = "is"; + is[2] = "smart"; + is[3] = "!!!"; + thefoo_rw(1); // Set break point at this line. + + is.clear(); + thefoo_rw(1); // Set break point at this line. + + strstr_map ss; + thefoo_rw(1); // Set break point at this line. + + ss["ciao"] = "hello"; + ss["casa"] = "house"; + ss["gatto"] = "cat"; + thefoo_rw(1); // Set break point at this line. + ss["a Mac.."] = "..is always a Mac!"; + + ss.clear(); + thefoo_rw(1); // Set break point at this line. + return 0; } diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp index f3b5f32817970..406b437914932 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp @@ -2,8 +2,8 @@ #include int main() { - std::queue q1{{1,2,3,4,5}}; - std::queue> q2{{1,2,3,4,5}}; + std::queue q1{{1, 2, 3, 4, 5}}; + std::queue> q2{{1, 2, 3, 4, 5}}; int ret = q1.size() + q2.size(); // break here return ret; } diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/main.cpp index beb44cd960005..1ef59bbc6146b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/main.cpp @@ -1,5 +1,5 @@ -#include #include +#include int main() { std::tuple<> empty; diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/main.cpp index afdddf0bbaf16..16e2ad614dcb8 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/main.cpp @@ -15,7 +15,7 @@ struct NodeU { // representation when the type of the second element is an empty class. So // we need a deleter class with a dummy data member to trigger the other path. struct NonEmptyIntDeleter { - void operator()(int* ptr) { delete ptr; } + void operator()(int *ptr) { delete ptr; } int dummy_ = 9999; }; diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/main.cpp index 560ec692f30ed..b136b05d3abd7 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/main.cpp @@ -3,7 +3,8 @@ #include // If we have libc++ 4.0 or greater we should have -// According to libc++ C++1z status page https://libcxx.llvm.org/cxx1z_status.html +// According to libc++ C++1z status page +// https://libcxx.llvm.org/cxx1z_status.html #if _LIBCPP_VERSION >= 4000 #include #define HAVE_VARIANT 1 @@ -13,83 +14,80 @@ struct S { operator int() { throw 42; } -} ; +}; +int main() { + bool has_variant = HAVE_VARIANT; -int main() -{ - bool has_variant = HAVE_VARIANT ; - - printf( "%d\n", has_variant ) ; // break here + printf("%d\n", has_variant); // break here #if HAVE_VARIANT == 1 - std::variant v1; - std::variant &v1_ref = v1; - std::variant v2; - std::variant v3; - std::variant> v_v1 ; - std::variant v_no_value; - // The next variant has 300 types, meaning the type index does not fit in - // a byte and must be `unsigned short` instead of `unsigned char` when - // using the unstable libc++ ABI. With stable libc++ ABI, the type index - // is always just `unsigned int`. - std::variant< - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int, int, int, int, int, int, - int, int, int, int, int, int> - v_300_types_no_value; + std::variant v1; + std::variant &v1_ref = v1; + std::variant v2; + std::variant v3; + std::variant> v_v1; + std::variant v_no_value; + // The next variant has 300 types, meaning the type index does not fit in + // a byte and must be `unsigned short` instead of `unsigned char` when + // using the unstable libc++ ABI. With stable libc++ ABI, the type index + // is always just `unsigned int`. + std::variant< + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int, int, int, int, int, int, int> + v_300_types_no_value; - v1 = 12; // v contains int - v_v1 = v1 ; - int i = std::get(v1); - printf( "%d\n", i ); // break here + v1 = 12; // v contains int + v_v1 = v1; + int i = std::get(v1); + printf("%d\n", i); // break here - v2 = 2.0 ; - double d = std::get(v2) ; - printf( "%f\n", d ); + v2 = 2.0; + double d = std::get(v2); + printf("%f\n", d); - v3 = 'A' ; - char c = std::get(v3) ; - printf( "%d\n", c ); + v3 = 'A'; + char c = std::get(v3); + printf("%d\n", c); - // Checking v1 above and here to make sure we done maintain the incorrect - // state when we change its value. - v1 = 2.0; - d = std::get(v1) ; - printf( "%f\n", d ); // break here + // Checking v1 above and here to make sure we done maintain the incorrect + // state when we change its value. + v1 = 2.0; + d = std::get(v1); + printf("%f\n", d); // break here - try { - v_no_value.emplace<0>(S()); - } catch( ... ) {} + try { + v_no_value.emplace<0>(S()); + } catch (...) { + } - printf( "%zu\n", v_no_value.index() ) ; + printf("%zu\n", v_no_value.index()); - try { - v_300_types_no_value.emplace<0>(S()); - } catch (...) { - } + try { + v_300_types_no_value.emplace<0>(S()); + } catch (...) { + } - printf("%zu\n", v_300_types_no_value.index()); + printf("%zu\n", v_300_types_no_value.index()); #endif - return 0; // break here + return 0; // break here } diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp index 026cfc863f2c0..0f0c6560121e5 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/main.cpp @@ -1,65 +1,64 @@ #include #include -int main() -{ - std::vector vBool; +int main() { + std::vector vBool; - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(false); - vBool.push_back(true); - vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); - printf ("size: %d", (int) vBool.size()); // Set break point at this line. - return 0; + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(false); + vBool.push_back(true); + vBool.push_back(true); + + printf("size: %d", (int)vBool.size()); // Set break point at this line. + return 0; } diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp index 0e1dbe4f03e2b..19cd1893bd22a 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp @@ -7,35 +7,34 @@ typedef std::vector string_vect; template void by_ref_and_ptr(std::vector &ref, std::vector *ptr) { // Stop here to check by ref - return; + return; } -int main() -{ - int_vect numbers; - (numbers.push_back(1)); // break here - (numbers.push_back(12)); // break here - (numbers.push_back(123)); - (numbers.push_back(1234)); - (numbers.push_back(12345)); // break here - (numbers.push_back(123456)); - (numbers.push_back(1234567)); - by_ref_and_ptr(numbers, &numbers); - - printf("break here"); - numbers.clear(); - - (numbers.push_back(7)); // break here +int main() { + int_vect numbers; + (numbers.push_back(1)); // break here + (numbers.push_back(12)); // break here + (numbers.push_back(123)); + (numbers.push_back(1234)); + (numbers.push_back(12345)); // break here + (numbers.push_back(123456)); + (numbers.push_back(1234567)); + by_ref_and_ptr(numbers, &numbers); - string_vect strings; - (strings.push_back(std::string("goofy"))); - (strings.push_back(std::string("is"))); - (strings.push_back(std::string("smart"))); - printf("break here"); - (strings.push_back(std::string("!!!"))); - - printf("break here"); - strings.clear(); - - return 0; // break here + printf("break here"); + numbers.clear(); + + (numbers.push_back(7)); // break here + + string_vect strings; + (strings.push_back(std::string("goofy"))); + (strings.push_back(std::string("is"))); + (strings.push_back(std::string("smart"))); + printf("break here"); + (strings.push_back(std::string("!!!"))); + + printf("break here"); + strings.clear(); + + return 0; // break here } From c7663c276e11920ccada8285870dfe2a96d0b9e0 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Jul 2025 17:27:55 +0100 Subject: [PATCH 5/6] fixup! python format --- .../generic/atomic/TestDataFormatterStdAtomic.py | 4 ++-- .../generic/chrono/TestDataFormatterStdChrono.py | 5 ++--- .../generic/function/TestDataFormatterStdFunction.py | 5 ++--- .../TestDataFormatterStdInitializerList.py | 5 ++--- .../generic/iterator/TestDataFormatterIterator.py | 5 ++--- .../generic/map/TestDataFormatterMap.py | 5 ++--- .../generic/queue/TestDataFormatterStdQueue.py | 5 ++--- .../ref_view/TestDataFormatterStdRangesRefView.py | 4 ++-- .../generic/set/TestDataFormatterGenericSet.py | 1 - .../shared_ptr/TestDataFormatterStdSharedPtr.py | 5 ++--- .../generic/span/TestDataFormatterStdSpan.py | 8 ++++---- .../string_view/TestDataFormatterStdStringView.py | 12 ++++++++---- .../generic/tuple/TestDataFormatterTuple.py | 7 +++---- .../generic/unique_ptr/TestDataFormatterUniquePtr.py | 5 ++--- .../TestDataFormatterStdUnorderedMapIterator.py | 4 ++-- .../generic/valarray/TestDataFormatterStdValarray.py | 5 ++--- .../generic/variant/TestDataFormatterStdVariant.py | 5 ++--- .../generic/vbool/TestDataFormatterVBool.py | 5 ++--- .../generic/vector/TestDataFormatterVector.py | 9 ++++----- 19 files changed, 47 insertions(+), 57 deletions(-) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py index 04c4831cb2b4b..92904e4b64526 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/atomic/TestDataFormatterStdAtomic.py @@ -67,11 +67,11 @@ def do_test(self): @skipIf(compiler=["gcc"]) @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @skipIf(compiler=["gcc"]) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py index a69fb95729442..eb5686a51023d 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/chrono/TestDataFormatterStdChrono.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -434,11 +433,11 @@ def do_test(self): @skipIf(compiler="clang", compiler_version=["<", "17.0"]) @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @skipIf(compiler="clang", compiler_version=["<", "17.0"]) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py index 8f68afb91af27..cbcda40ddd1bd 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -83,10 +82,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py index b37b043f3a3a4..09ad19140077f 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializerlist/TestDataFormatterStdInitializerList.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import re import lldb from lldbsuite.test.decorators import * @@ -40,10 +39,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py index eff4aaac7b031..b95775df6dbb6 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/iterator/TestDataFormatterIterator.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -85,10 +84,10 @@ def cleanup(): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py index c6ae24e8992cf..2ba2dbc6ec176 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/map/TestDataFormatterMap.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -327,10 +326,10 @@ def cleanup(): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py index c48488cdec88b..5966e59f20dad 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/TestDataFormatterStdQueue.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -40,7 +39,7 @@ def do_test(self): ) @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @expectedFailureAll( @@ -48,5 +47,5 @@ def test_libcxx(self): ) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py index 27047fe56a7ea..aa753ffeaa6fb 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py @@ -70,12 +70,12 @@ def do_test(self): @skipIf(compiler="clang", compiler_version=["<", "16.0"]) @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @skipIf(compiler=no_match("clang")) @skipIf(compiler="clang", compiler_version=["<", "16.0"]) @add_test_categories(["libstdcxx"]) def test_libstdcpp(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py index d3d6ef55c6ff0..5f80bc8b38b9b 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/set/TestDataFormatterGenericSet.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py index e2c04ec059f2b..d8390b757bb11 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/shared_ptr/TestDataFormatterStdSharedPtr.py @@ -2,7 +2,6 @@ Test lldb data formatter for std::shared_ptr. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -96,10 +95,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py index cfef1cad3d295..e8868fb0e11a4 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/span/TestDataFormatterStdSpan.py @@ -158,13 +158,13 @@ def do_test(self): @add_test_categories(["libc++"]) @skipIf(compiler="clang", compiler_version=["<", "11.0"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) @skipIf(compiler="clang", compiler_version=["<", "11.0"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() def do_test_ref_and_ptr(self): @@ -183,11 +183,11 @@ def do_test_ref_and_ptr(self): @add_test_categories(["libc++"]) @skipIf(compiler="clang", compiler_version=["<", "11.0"]) def test_ref_and_ptr_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test_ref_and_ptr() @add_test_categories(["libstdcxx"]) @skipIf(compiler="clang", compiler_version=["<", "11.0"]) def test_ref_and_ptr_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test_ref_and_ptr() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py index 0df3686127b71..9713f3a72cd19 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py @@ -74,7 +74,9 @@ def cleanup(): type="std::wstring_view", summary='L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"', ) - self.expect_var_path("u16_string", type="std::u16string_view", summary='u"ß水氶"') + self.expect_var_path( + "u16_string", type="std::u16string_view", summary='u"ß水氶"' + ) self.expect_var_path("u16_empty", type="std::u16string_view", summary='u""') self.expect_var_path( "u32_string", type="std::u32string_view", summary='U"🍄🍅🍆🍌"' @@ -138,7 +140,9 @@ def cleanup(): type="std::wstring_view", summary='L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"', ) - self.expect_var_path("u16_string", type="std::u16string_view", summary='u"ß水氶"') + self.expect_var_path( + "u16_string", type="std::u16string_view", summary='u"ß水氶"' + ) self.expect_var_path("u16_empty", type="std::u16string_view", summary='u""') self.expect_var_path( "u32_string", type="std::u32string_view", summary='U"🍄🍅🍆🍌"' @@ -160,7 +164,7 @@ def cleanup(): ) @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @expectedFailureAll( @@ -168,5 +172,5 @@ def test_libcxx(self): ) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py index 34b747cdbe291..01a7beb0667a1 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/tuple/TestDataFormatterTuple.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -44,10 +43,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() - + @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py index 8fca83ce80893..673f453b18bbe 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unique_ptr/TestDataFormatterUniquePtr.py @@ -2,7 +2,6 @@ Test lldb data formatter for std::unique_ptr. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -121,10 +120,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py index e950bd677a3e0..f908136f288fb 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered_map-iterator/TestDataFormatterStdUnorderedMapIterator.py @@ -114,10 +114,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py index 42cbaeba45115..1fdfa6bfdbf33 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -180,10 +179,10 @@ def do_test(self): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py index 3d7444623993d..3b19b1fac5bc2 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/variant/TestDataFormatterStdVariant.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -87,7 +86,7 @@ def do_test(self): @skipIf(macos_version=["<", "10.14"]) @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() ## Clang 7.0 is the oldest Clang that can reliably parse newer libc++ versions @@ -101,5 +100,5 @@ def test_libcxx(self): @skipIf(macos_version=["<", "10.14"]) @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py index cd5478b178b75..425b30d925835 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vbool/TestDataFormatterVBool.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -75,10 +74,10 @@ def cleanup(): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py index 698d583f30f3d..63d2c29f7ea54 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterVector.py @@ -2,7 +2,6 @@ Test lldb data formatter subsystem. """ - import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * @@ -170,12 +169,12 @@ def cleanup(): @add_test_categories(["libc++"]) def test_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test() @add_test_categories(["libstdcxx"]) def test_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test() def do_test_ref_and_ptr(self): @@ -195,10 +194,10 @@ def do_test_ref_and_ptr(self): @add_test_categories(["libc++"]) def test_ref_and_ptr_libcxx(self): - self.build(dictionary={"USE_LIBCPP" : 1}) + self.build(dictionary={"USE_LIBCPP": 1}) self.do_test_ref_and_ptr() @add_test_categories(["libstdcxx"]) def test_ref_and_ptr_libstdcxx(self): - self.build(dictionary={"USE_LIBSTDCPP" : 1}) + self.build(dictionary={"USE_LIBSTDCPP": 1}) self.do_test_ref_and_ptr() From f4c0754834f9c1761fd01e69ede15a1fdf03aaa0 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Wed, 2 Jul 2025 18:37:02 +0100 Subject: [PATCH 6/6] fixup! python format --- .../generic/string_view/TestDataFormatterStdStringView.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py index 9713f3a72cd19..4d7c745475720 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/string_view/TestDataFormatterStdStringView.py @@ -74,9 +74,7 @@ def cleanup(): type="std::wstring_view", summary='L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"', ) - self.expect_var_path( - "u16_string", type="std::u16string_view", summary='u"ß水氶"' - ) + self.expect_var_path("u16_string", type="std::u16string_view", summary='u"ß水氶"') self.expect_var_path("u16_empty", type="std::u16string_view", summary='u""') self.expect_var_path( "u32_string", type="std::u32string_view", summary='U"🍄🍅🍆🍌"' @@ -140,9 +138,7 @@ def cleanup(): type="std::wstring_view", summary='L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"', ) - self.expect_var_path( - "u16_string", type="std::u16string_view", summary='u"ß水氶"' - ) + self.expect_var_path("u16_string", type="std::u16string_view", summary='u"ß水氶"') self.expect_var_path("u16_empty", type="std::u16string_view", summary='u""') self.expect_var_path( "u32_string", type="std::u32string_view", summary='U"🍄🍅🍆🍌"'