Author: Michael Buch Date: 2025-07-09T14:20:57+01:00 New Revision: fa80a1a4d46d3efedd82855dc3b8c1031b11e4e1
URL: https://github.com/llvm/llvm-project/commit/fa80a1a4d46d3efedd82855dc3b8c1031b11e4e1 DIFF: https://github.com/llvm/llvm-project/commit/fa80a1a4d46d3efedd82855dc3b8c1031b11e4e1.diff LOG: [lldb][test] Move std::ranges::ref_view from libcxx to generic directory (#147705) This just moves the test from `libcxx` to `generic`. There are currently no `std::ranges::ref_view` formatters for libstdc++ so I didn't add a test-case for it. Split out from https://github.com/llvm/llvm-project/pull/146740 Added: lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/Makefile lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/main.cpp Modified: Removed: lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/Makefile lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/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/ranges/ref_view/Makefile similarity index 82% 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/ranges/ref_view/Makefile index 3c4f9b45f41de..4f79c0a900c3a 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/ranges/ref_view/Makefile @@ -1,5 +1,3 @@ -USE_LIBCPP := 1 - CXX_SOURCES := main.cpp CXXFLAGS_EXTRAS := -std=c++20 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/TestDataFormatterStdRangesRefView.py similarity index 92% 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/TestDataFormatterStdRangesRefView.py index 9b5194be91e78..f135da70c7b47 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/TestDataFormatterStdRangesRefView.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,10 +27,7 @@ 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( @@ -69,3 +66,10 @@ def test_with_run_command(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() 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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits