llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Michael Buch (Michael137)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/147705.diff


3 Files Affected:

- (renamed) 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/Makefile
 (-2) 
- (renamed) 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/TestDataFormatterStdRangesRefView.py
 (+9-5) 
- (renamed) 
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/ranges/ref_view/main.cpp
 () 


``````````diff
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

``````````

</details>


https://github.com/llvm/llvm-project/pull/147705
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to