From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 51F66395ACD2 for ; Tue, 3 Aug 2021 15:34:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51F66395ACD2 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-ldN7AtvvOHSqCYibyklIRA-1; Tue, 03 Aug 2021 11:34:20 -0400 X-MC-Unique: ldN7AtvvOHSqCYibyklIRA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 73B991B18BC3; Tue, 3 Aug 2021 15:34:19 +0000 (UTC) Received: from localhost (unknown [10.33.36.118]) by smtp.corp.redhat.com (Postfix) with ESMTP id E881E5D9DC; Tue, 3 Aug 2021 15:34:18 +0000 (UTC) Date: Tue, 3 Aug 2021 16:34:18 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove trailing whitespace in some tests Message-ID: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="1omhPn6bNuvcuoBD" Content-Disposition: inline X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2021 15:34:24 -0000 --1omhPn6bNuvcuoBD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/20_util/function_objects/binders/3113.cc: Remove trailing whitespace. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Likewise. * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc: Likewise. Tested powerpc64le-linux. Committed to trunk. --1omhPn6bNuvcuoBD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit 9bd87e388724baab9597ef232ea7e855c99eb7d7 Author: Jonathan Wakely Date: Tue Aug 3 00:05:01 2021 libstdc++: Remove trailing whitespace in some tests Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/20_util/function_objects/binders/3113.cc: Remove trailing whitespace. * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise. * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc: Likewise. * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Likewise. * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc: Likewise. * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc: Likewise. diff --git a/libstdc++-v3/testsuite/20_util/function_objects/binders/3113.cc b/libstdc++-v3/testsuite/20_util/function_objects/binders/3113.cc index 0b671ae4a0e..03118b291b1 100644 --- a/libstdc++-v3/testsuite/20_util/function_objects/binders/3113.cc +++ b/libstdc++-v3/testsuite/20_util/function_objects/binders/3113.cc @@ -25,22 +25,22 @@ #include // for_each #include -class Elem -{ -public: - void print(int) const { } - void modify(int) { } -}; +class Elem +{ +public: + void print(int) const { } + void modify(int) { } +}; // libstdc++/3113 void test01() -{ - std::vector coll(2); - // OK - std::for_each(coll.begin(), coll.end(), +{ + std::vector coll(2); + // OK + std::for_each(coll.begin(), coll.end(), std::bind2nd(std::mem_fun_ref(&Elem::print), 42)); // OK - std::for_each(coll.begin(), coll.end(), + std::for_each(coll.begin(), coll.end(), std::bind2nd(std::mem_fun_ref(&Elem::modify), 42)); } diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc index 82750dca9a9..39574984c7d 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr.cc @@ -78,7 +78,7 @@ test01() return 0; } -int +int main() { test01(); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc index 32af6001366..9d0393be22a 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc @@ -40,7 +40,7 @@ test01() return 0; } -int +int main() { test01(); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc index 2f6e4db18d9..503fb348aa2 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc @@ -44,7 +44,7 @@ test02() a = std::move(au); } -int +int main() { test01(); diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc index 87e89375d28..25ff611f8d6 100644 --- a/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc +++ b/libstdc++-v3/testsuite/20_util/shared_ptr/creation/dr925.cc @@ -28,19 +28,19 @@ struct A { }; -std::unique_ptr +std::unique_ptr create_unique_ptr() { return std::unique_ptr(new A()); } -std::auto_ptr +std::auto_ptr create_auto_ptr() { return std::auto_ptr(new A()); } -void +void process(std::shared_ptr a) { VERIFY( a.get() != 0 ); diff --git a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc index dbf58fb64a6..68f5d425b4d 100644 --- a/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc +++ b/libstdc++-v3/testsuite/25_algorithms/headers/algorithm/synopsis.cc @@ -24,12 +24,12 @@ namespace std // 25.1, non-modifying sequence operations: template _GLIBCXX20_CONSTEXPR - _Funct + _Funct for_each(_IIter, _IIter, _Funct); template _GLIBCXX20_CONSTEXPR - _IIter + _IIter find(_IIter, _IIter, const _Tp&); template @@ -91,12 +91,12 @@ namespace std template _GLIBCXX20_CONSTEXPR - _FIter + _FIter adjacent_find(_FIter, _FIter); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter adjacent_find(_FIter, _FIter, _BinaryPredicate); template @@ -121,40 +121,40 @@ namespace std template _GLIBCXX20_CONSTEXPR - bool + bool equal(_IIter1, _IIter1, _IIter2); template _GLIBCXX20_CONSTEXPR - bool + bool equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template _GLIBCXX20_CONSTEXPR - _FIter1 + _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2); template _GLIBCXX20_CONSTEXPR - _FIter1 + _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter search_n(_FIter, _FIter, _Size, const _Tp&); - template _GLIBCXX20_CONSTEXPR - _FIter + _FIter search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); // 25.2, modifying sequence operations: // 25.2.1, copy: template _GLIBCXX20_CONSTEXPR - _OIter + _OIter copy(_IIter, _IIter, _OIter); template @@ -164,9 +164,9 @@ namespace std // 25.2.2, swap: #if __cplusplus < 201103L - template + template _GLIBCXX20_CONSTEXPR - void + void swap(_Tp&, _Tp& b); template @@ -181,89 +181,89 @@ namespace std template _GLIBCXX20_CONSTEXPR - _FIter2 + _FIter2 swap_ranges(_FIter1 first1, _FIter1, _FIter2); template _GLIBCXX20_CONSTEXPR - void + void iter_swap(_FIter1, _FIter2 b); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter transform(_IIter, _IIter, _OIter, _UnaryOperation op); - template _GLIBCXX20_CONSTEXPR - _OIter + _OIter transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); template _GLIBCXX20_CONSTEXPR - void + void replace(_FIter, _FIter, const _Tp&, const _Tp&); template _GLIBCXX20_CONSTEXPR - void + void replace_if(_FIter, _FIter, _Predicate, const _Tp&); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); template _GLIBCXX20_CONSTEXPR - void + void fill(_FIter, _FIter, const _Tp&); template _GLIBCXX20_CONSTEXPR - void + void fill_n(_OIter, _Size n, const _Tp&); template _GLIBCXX20_CONSTEXPR - void + void generate(_FIter, _FIter, _Generator); template _GLIBCXX20_CONSTEXPR - void + void generate_n(_OIter, _Size, _Generator); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter remove(_FIter, _FIter, const _Tp&); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter remove_if(_FIter, _FIter, _Predicate); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter remove_copy(_IIter, _IIter, _OIter, const _Tp&); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter remove_copy_if(_IIter, _IIter, _OIter, _Predicate); #if __cplusplus >= 201103L template _GLIBCXX20_CONSTEXPR - _OIter + _OIter copy_if(_IIter, _IIter, _OIter, _Predicate); template @@ -280,51 +280,51 @@ namespace std template _GLIBCXX20_CONSTEXPR - _FIter + _FIter unique(_FIter, _FIter); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter unique(_FIter, _FIter, _BinaryPredicate); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter unique_copy(_IIter, _IIter, _OIter); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); template _GLIBCXX20_CONSTEXPR - void + void reverse(_BIter, _BIter); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter reverse_copy(_BIter, _BIter, _OIter); template _GLIBCXX20_CONSTEXPR - void + void rotate(_FIter, _FIter, _FIter); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter rotate_copy (_FIter, _FIter, _FIter, _OIter); #if __cplusplus <= 201103L template - void + void random_shuffle(_RAIter, _RAIter); template - void + void random_shuffle(_RAIter, _RAIter, _Generator&); #endif @@ -337,41 +337,41 @@ namespace std // 25.2.12, partitions: template _GLIBCXX20_CONSTEXPR - _BIter + _BIter partition(_BIter, _BIter, _Predicate); template - _BIter + _BIter stable_partition(_BIter, _BIter, _Predicate); // 25.3, sorting and related operations: // 25.3.1, sorting: template _GLIBCXX20_CONSTEXPR - void + void sort(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void sort(_RAIter, _RAIter, _Compare); template - void + void stable_sort(_RAIter, _RAIter); template - void + void stable_sort(_RAIter, _RAIter, _Compare); template _GLIBCXX20_CONSTEXPR - void + void partial_sort(_RAIter, _RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void partial_sort(_RAIter, _RAIter, _RAIter, _Compare); template @@ -386,33 +386,33 @@ namespace std template _GLIBCXX20_CONSTEXPR - void + void nth_element(_RAIter, _RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void nth_element(_RAIter, _RAIter, _RAIter, _Compare); // 25.3.3, binary search: template _GLIBCXX20_CONSTEXPR - _FIter + _FIter lower_bound(_FIter, _FIter, const _Tp&); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter lower_bound(_FIter, _FIter, const _Tp&, _Compare); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter upper_bound(_FIter, _FIter, const _Tp&); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter upper_bound(_FIter, _FIter, const _Tp&, _Compare); template @@ -427,76 +427,76 @@ namespace std template _GLIBCXX20_CONSTEXPR - bool + bool binary_search(_FIter, _FIter, const _Tp&); template _GLIBCXX20_CONSTEXPR - bool + bool binary_search(_FIter, _FIter, const _Tp&, _Compare); // 25.3.4, merge: template _GLIBCXX20_CONSTEXPR - _OIter + _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); - template _GLIBCXX20_CONSTEXPR - _OIter + _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template - void + void inplace_merge(_BIter, _BIter, _BIter); template - void + void inplace_merge(_BIter, _BIter, _BIter, _Compare); // 25.3.5, set operations: template _GLIBCXX20_CONSTEXPR - bool + bool includes(_IIter1, _IIter1, _IIter2, _IIter2); template _GLIBCXX20_CONSTEXPR - bool + bool includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _GLIBCXX20_CONSTEXPR - _OIter + _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); - template _GLIBCXX20_CONSTEXPR - _OIter + _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template @@ -504,135 +504,135 @@ namespace std _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); - template _GLIBCXX20_CONSTEXPR _OIter - set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); // 25.3.6, heap operations: template _GLIBCXX20_CONSTEXPR - void + void push_heap(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void push_heap(_RAIter, _RAIter, _Compare); template _GLIBCXX20_CONSTEXPR - void + void pop_heap(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void pop_heap(_RAIter, _RAIter, _Compare); template _GLIBCXX20_CONSTEXPR - void + void make_heap(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void make_heap(_RAIter, _RAIter, _Compare); template _GLIBCXX20_CONSTEXPR - void + void sort_heap(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - void + void sort_heap(_RAIter, _RAIter, _Compare); #if __cplusplus >= 201103L template _GLIBCXX20_CONSTEXPR - bool + bool is_heap(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - bool + bool is_heap(_RAIter, _RAIter, _Compare); template _GLIBCXX20_CONSTEXPR - _RAIter + _RAIter is_heap_until(_RAIter, _RAIter); template _GLIBCXX20_CONSTEXPR - _RAIter + _RAIter is_heap_until(_RAIter, _RAIter, _Compare); template _GLIBCXX20_CONSTEXPR - bool + bool is_sorted(_FIter, _FIter); template _GLIBCXX20_CONSTEXPR - bool + bool is_sorted(_FIter, _FIter, _Compare); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter is_sorted_until(_FIter, _FIter); template _GLIBCXX20_CONSTEXPR - _FIter + _FIter is_sorted_until(_FIter, _FIter, _Compare); #endif // 25.3.7, minimum and maximum: - template + template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& min(const _Tp&, const _Tp&); template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& min(const _Tp&, const _Tp&, _Compare); - template + template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& max(const _Tp&, const _Tp&); template _GLIBCXX14_CONSTEXPR - const _Tp& + const _Tp& max(const _Tp&, const _Tp&, _Compare); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter min_element(_FIter, _FIter); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter min_element(_FIter, _FIter, _Compare); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter max_element(_FIter, _FIter); template _GLIBCXX14_CONSTEXPR - _FIter + _FIter max_element(_FIter, _FIter, _Compare); #if __cplusplus >= 201103L @@ -689,32 +689,32 @@ namespace std template _GLIBCXX20_CONSTEXPR - bool + bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); template _GLIBCXX20_CONSTEXPR - bool + bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); // 25.3.9, permutations template _GLIBCXX20_CONSTEXPR - bool + bool next_permutation(_BIter, _BIter); template _GLIBCXX20_CONSTEXPR - bool + bool next_permutation(_BIter, _BIter, _Compare); template _GLIBCXX20_CONSTEXPR - bool + bool prev_permutation(_BIter, _BIter); template _GLIBCXX20_CONSTEXPR - bool + bool prev_permutation(_BIter, _BIter, _Compare); } diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc index 206c237cbc6..7a12bef063e 100644 --- a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc @@ -34,6 +34,6 @@ namespace std typedef std::pointer_to_unary_function generator_type; template void random_shuffle(iterator_type, iterator_type); - template void random_shuffle(iterator_type, iterator_type, + template void random_shuffle(iterator_type, iterator_type, generator_type&); -} +} diff --git a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc index 5e69aa60420..774c39a6aa6 100644 --- a/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc +++ b/libstdc++-v3/testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc @@ -33,6 +33,6 @@ namespace std typedef std::pointer_to_unary_function generator_type; template void random_shuffle(iterator_type, iterator_type); - template void random_shuffle(iterator_type, iterator_type, + template void random_shuffle(iterator_type, iterator_type, generator_type&); -} +} --1omhPn6bNuvcuoBD--