[libcxx-commits] [libcxx] [libc++][NFC] Centralize test for support of == and != in ranges (PR #78481)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 17 09:52:24 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 705d9273c5417e04dc542f0e46b90960c235c753 85a2acee65ff0157f6388eaaf0b7332c2d59ba3c -- libcxx/test/std/ranges/range.adaptors/range.elements/iterator/compare.pass.cpp libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/equality.pass.cpp libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/eq.pass.cpp libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/equal.pass.cpp libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/equal.pass.cpp libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/equality.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/eq.pass.cpp libcxx/test/support/test_range.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/equality.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/equality.pass.cpp
index e2ae7c6539..3db607b554 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/equality.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.elements/sentinel/equality.pass.cpp
@@ -69,28 +69,28 @@ using std::ranges::iterator_t;
 using std::ranges::sentinel_t;
 
 static_assert(weakly_equality_comparable_with<iterator_t<elements_view<R, 0>>, //
-                       sentinel_t<elements_view<R, 0>>>);
+                                              sentinel_t<elements_view<R, 0>>>);
 
 static_assert(!weakly_equality_comparable_with<iterator_t<const elements_view<R, 0>>, //
-                        sentinel_t<elements_view<R, 0>>>);
+                                               sentinel_t<elements_view<R, 0>>>);
 
 static_assert(!weakly_equality_comparable_with<iterator_t<elements_view<R, 0>>, //
-                        sentinel_t<const elements_view<R, 0>>>);
+                                               sentinel_t<const elements_view<R, 0>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<const elements_view<R, 0>>, //
-                       sentinel_t<const elements_view<R, 0>>>);
+                                              sentinel_t<const elements_view<R, 0>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<elements_view<R, 0>>, //
-                       sentinel_t<elements_view<R, 0>>>);
+                                              sentinel_t<elements_view<R, 0>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<const elements_view<CrossComparableR, 0>>, //
-                       sentinel_t<elements_view<CrossComparableR, 0>>>);
+                                              sentinel_t<elements_view<CrossComparableR, 0>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<elements_view<CrossComparableR, 0>>, //
-                       sentinel_t<const elements_view<CrossComparableR, 0>>>);
+                                              sentinel_t<const elements_view<CrossComparableR, 0>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<const elements_view<CrossComparableR, 0>>, //
-                       sentinel_t<const elements_view<CrossComparableR, 0>>>);
+                                              sentinel_t<const elements_view<CrossComparableR, 0>>>);
 
 template <class R, bool ConstIter, bool ConstSent>
 constexpr void testOne() {
diff --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
index 9dec5d81dd..fcbc503aab 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
@@ -24,7 +24,6 @@
 
 #include "../types.h"
 
-
 template <class Iterator>
 constexpr void test() {
   using Sentinel = sentinel_wrapper<Iterator>;
diff --git a/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/eq.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/eq.pass.cpp
index 823f112cbc..9d6cb76902 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join/range.join.sentinel/eq.pass.cpp
@@ -52,9 +52,9 @@ struct ConstComparableView : BufferView<BufferView<int*>*> {
 };
 
 static_assert(weakly_equality_comparable_with<std::ranges::iterator_t<ConstComparableView>,
-                                 std::ranges::sentinel_t<const ConstComparableView>>);
+                                              std::ranges::sentinel_t<const ConstComparableView>>);
 static_assert(weakly_equality_comparable_with<std::ranges::iterator_t<const ConstComparableView>,
-                                 std::ranges::sentinel_t<ConstComparableView>>);
+                                              std::ranges::sentinel_t<ConstComparableView>>);
 
 constexpr bool test() {
   int buffer[4][4] = {{1111, 2222, 3333, 4444}, {555, 666, 777, 888}, {99, 1010, 1111, 1212}, {13, 14, 15, 16}};
diff --git a/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/equality.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/equality.pass.cpp
index 2533b5128c..76e337ded5 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/equality.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take.while/sentinel/equality.pass.cpp
@@ -75,28 +75,28 @@ using std::ranges::sentinel_t;
 using std::ranges::take_while_view;
 
 static_assert(weakly_equality_comparable_with<iterator_t<take_while_view<R, LessThan3>>, //
-                       sentinel_t<take_while_view<R, LessThan3>>>);
+                                              sentinel_t<take_while_view<R, LessThan3>>>);
 
 static_assert(!weakly_equality_comparable_with<iterator_t<const take_while_view<R, LessThan3>>, //
-                        sentinel_t<take_while_view<R, LessThan3>>>);
+                                               sentinel_t<take_while_view<R, LessThan3>>>);
 
 static_assert(!weakly_equality_comparable_with<iterator_t<take_while_view<R, LessThan3>>, //
-                        sentinel_t<const take_while_view<R, LessThan3>>>);
+                                               sentinel_t<const take_while_view<R, LessThan3>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<const take_while_view<R, LessThan3>>, //
-                       sentinel_t<const take_while_view<R, LessThan3>>>);
+                                              sentinel_t<const take_while_view<R, LessThan3>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<take_while_view<R, LessThan3>>, //
-                       sentinel_t<take_while_view<R, LessThan3>>>);
+                                              sentinel_t<take_while_view<R, LessThan3>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<const take_while_view<CrossComparableR, LessThan3>>, //
-                       sentinel_t<take_while_view<CrossComparableR, LessThan3>>>);
+                                              sentinel_t<take_while_view<CrossComparableR, LessThan3>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<take_while_view<CrossComparableR, LessThan3>>, //
-                       sentinel_t<const take_while_view<CrossComparableR, LessThan3>>>);
+                                              sentinel_t<const take_while_view<CrossComparableR, LessThan3>>>);
 
 static_assert(weakly_equality_comparable_with<iterator_t<const take_while_view<CrossComparableR, LessThan3>>, //
-                       sentinel_t<const take_while_view<CrossComparableR, LessThan3>>>);
+                                              sentinel_t<const take_while_view<CrossComparableR, LessThan3>>>);
 
 template <class R, bool ConstIter, bool ConstSent>
 constexpr void testOne() {

``````````

</details>


https://github.com/llvm/llvm-project/pull/78481


More information about the libcxx-commits mailing list