diff options
Diffstat (limited to 'libcxx/test/std')
116 files changed, 752 insertions, 752 deletions
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp index ec0526c2dc5..b837a0e514c 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/count_if.pass.cpp @@ -21,10 +21,10 @@ #include "test_iterators.h" struct eq { - eq (int val) : v(val) {} - bool operator () (int v2) const { return v == v2; } - int v; - }; + eq (int val) : v(val) {} + bool operator () (int v2) const { return v == v2; } + int v; + }; int main() diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp index 761d71bbf28..fa1faf17e0f 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp @@ -21,10 +21,10 @@ #include "test_iterators.h" struct eq { - eq (int val) : v(val) {} - bool operator () (int v2) const { return v == v2; } - int v; - }; + eq (int val) : v(val) {} + bool operator () (int v2) const { return v == v2; } + int v; + }; int main() { diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp index 2e52e260336..1f3c34b2144 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/find_if_not.pass.cpp @@ -21,10 +21,10 @@ #include "test_iterators.h" struct ne { - ne (int val) : v(val) {} - bool operator () (int v2) const { return v != v2; } - int v; - }; + ne (int val) : v(val) {} + bool operator () (int v2) const { return v != v2; } + int v; + }; int main() diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp index 1e18720bfbb..7d734144ddc 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/clamp.pass.cpp @@ -18,13 +18,13 @@ #include <cassert> struct Tag { - Tag() : val(0), tag("Default") {} - Tag(int a, const char *b) : val(a), tag(b) {} - ~Tag() {} + Tag() : val(0), tag("Default") {} + Tag(int a, const char *b) : val(a), tag(b) {} + ~Tag() {} - int val; - const char *tag; - }; + int val; + const char *tag; + }; bool eq(const Tag& rhs, const Tag& lhs) { return rhs.val == lhs.val && rhs.tag == lhs.tag; } // bool operator==(const Tag& rhs, const Tag& lhs) { return rhs.val == lhs.val; } diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp index 683b07d3208..3743fa53523 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge.pass.cpp @@ -23,24 +23,24 @@ #if TEST_STD_VER >= 11 struct S { - S() : i_(0) {} - S(int i) : i_(i) {} + S() : i_(0) {} + S(int i) : i_(i) {} - S(const S& rhs) : i_(rhs.i_) {} - S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; } + S(const S& rhs) : i_(rhs.i_) {} + S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; } - S& operator =(const S& rhs) { i_ = rhs.i_; return *this; } - S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; } - S& operator =(int i) { i_ = i; return *this; } + S& operator =(const S& rhs) { i_ = rhs.i_; return *this; } + S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; } + S& operator =(int i) { i_ = i; return *this; } - bool operator <(const S& rhs) const { return i_ < rhs.i_; } - bool operator ==(const S& rhs) const { return i_ == rhs.i_; } - bool operator ==(int i) const { return i_ == i; } + bool operator <(const S& rhs) const { return i_ < rhs.i_; } + bool operator ==(const S& rhs) const { return i_ == rhs.i_; } + bool operator ==(int i) const { return i_ == i; } - void set(int i) { i_ = i; } + void set(int i) { i_ = i; } - int i_; - }; + int i_; + }; #endif std::mt19937 randomness; diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp index 3d8902ec227..369bccf9c83 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp @@ -33,25 +33,25 @@ struct indirect_less }; struct S { - S() : i_(0) {} - S(int i) : i_(i) {} + S() : i_(0) {} + S(int i) : i_(i) {} - S(const S& rhs) : i_(rhs.i_) {} - S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; } + S(const S& rhs) : i_(rhs.i_) {} + S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; } - S& operator =(const S& rhs) { i_ = rhs.i_; return *this; } - S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; } - S& operator =(int i) { i_ = i; return *this; } + S& operator =(const S& rhs) { i_ = rhs.i_; return *this; } + S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; } + S& operator =(int i) { i_ = i; return *this; } - bool operator <(const S& rhs) const { return i_ < rhs.i_; } - bool operator >(const S& rhs) const { return i_ > rhs.i_; } - bool operator ==(const S& rhs) const { return i_ == rhs.i_; } - bool operator ==(int i) const { return i_ == i; } + bool operator <(const S& rhs) const { return i_ < rhs.i_; } + bool operator >(const S& rhs) const { return i_ > rhs.i_; } + bool operator ==(const S& rhs) const { return i_ == rhs.i_; } + bool operator ==(int i) const { return i_ == i; } - void set(int i) { i_ = i; } + void set(int i) { i_ = i; } - int i_; - }; + int i_; + }; #endif // TEST_STD_VER >= 11 diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp index 402d57dae69..da76d2a36c1 100644 --- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp +++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/min_element_comp.pass.cpp @@ -87,8 +87,8 @@ struct less { constexpr bool operator ()( const int &x, const int &y) const { re void constexpr_test() { #if TEST_STD_VER >= 14 - constexpr auto p = std::min_element(il, il+8, less()); - static_assert(*p == 1, ""); + constexpr auto p = std::min_element(il, il+8, less()); + static_assert(*p == 1, ""); #endif } diff --git a/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp index 63cc02befb7..74b8c60a387 100644 --- a/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp +++ b/libcxx/test/std/atomics/atomics.types.generic/integral.pass.cpp @@ -187,14 +187,14 @@ int main() #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test<std::atomic_wchar_t, wchar_t>(); - test<std::atomic_int8_t, int8_t>(); - test<std::atomic_uint8_t, uint8_t>(); - test<std::atomic_int16_t, int16_t>(); - test<std::atomic_uint16_t, uint16_t>(); - test<std::atomic_int32_t, int32_t>(); - test<std::atomic_uint32_t, uint32_t>(); - test<std::atomic_int64_t, int64_t>(); - test<std::atomic_uint64_t, uint64_t>(); + test<std::atomic_int8_t, int8_t>(); + test<std::atomic_uint8_t, uint8_t>(); + test<std::atomic_int16_t, int16_t>(); + test<std::atomic_uint16_t, uint16_t>(); + test<std::atomic_int32_t, int32_t>(); + test<std::atomic_uint32_t, uint32_t>(); + test<std::atomic_int64_t, int64_t>(); + test<std::atomic_uint64_t, uint64_t>(); test<volatile std::atomic_char, char>(); test<volatile std::atomic_schar, signed char>(); @@ -213,12 +213,12 @@ int main() #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test<volatile std::atomic_wchar_t, wchar_t>(); - test<volatile std::atomic_int8_t, int8_t>(); - test<volatile std::atomic_uint8_t, uint8_t>(); - test<volatile std::atomic_int16_t, int16_t>(); - test<volatile std::atomic_uint16_t, uint16_t>(); - test<volatile std::atomic_int32_t, int32_t>(); - test<volatile std::atomic_uint32_t, uint32_t>(); - test<volatile std::atomic_int64_t, int64_t>(); - test<volatile std::atomic_uint64_t, uint64_t>(); + test<volatile std::atomic_int8_t, int8_t>(); + test<volatile std::atomic_uint8_t, uint8_t>(); + test<volatile std::atomic_int16_t, int16_t>(); + test<volatile std::atomic_uint16_t, uint16_t>(); + test<volatile std::atomic_int32_t, int32_t>(); + test<volatile std::atomic_uint32_t, uint32_t>(); + test<volatile std::atomic_int64_t, int64_t>(); + test<volatile std::atomic_uint64_t, uint64_t>(); } diff --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_helpers.h b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_helpers.h index 482b7319dab..2ba561fe2d3 100644 --- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_helpers.h +++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_helpers.h @@ -43,14 +43,14 @@ struct TestEachIntegralType { TestFunctor<char16_t>()(); TestFunctor<char32_t>()(); #endif - TestFunctor< int8_t>()(); - TestFunctor< uint8_t>()(); - TestFunctor< int16_t>()(); - TestFunctor<uint16_t>()(); - TestFunctor< int32_t>()(); - TestFunctor<uint32_t>()(); - TestFunctor< int64_t>()(); - TestFunctor<uint64_t>()(); + TestFunctor< int8_t>()(); + TestFunctor< uint8_t>()(); + TestFunctor< int16_t>()(); + TestFunctor<uint16_t>()(); + TestFunctor< int32_t>()(); + TestFunctor<uint32_t>()(); + TestFunctor< int64_t>()(); + TestFunctor<uint64_t>()(); } }; diff --git a/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp index 210c27050a6..a1fde845e9c 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/compare_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::map<int, int, Comp<int> > m; + std::map<int, int, Comp<int> > m; } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp index 3d33f721a56..ee96ed0a13a 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/compare_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::multimap<int, int, Comp<int> > m; + std::multimap<int, int, Comp<int> > m; } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp index 9287a035bec..4f9a6d61be4 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/compare_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::multiset<int, Comp<int> > m; + std::multiset<int, Comp<int> > m; } diff --git a/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp index 858ee4161f0..94ce9cd5524 100644 --- a/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/compare_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs < rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::set<int, Comp<int> > m; + std::set<int, Comp<int> > m; } diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp index 0d3025e1739..832f0905841 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/types.fail.cpp @@ -31,5 +31,5 @@ int main() { // LWG#2566 says that the first template param must match the second one's value type - std::priority_queue<double, std::deque<int>> t; + std::priority_queue<double, std::deque<int>> t; } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp index 2b8341fff00..4bd90a88b11 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.defn/types.fail.cpp @@ -16,5 +16,5 @@ int main() { // LWG#2566 says that the first template param must match the second one's value type - std::queue<double, std::deque<int>> t; + std::queue<double, std::deque<int>> t; } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp index ee4c5441e7c..1cfa8e4da3a 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.defn/types.fail.cpp @@ -31,5 +31,5 @@ int main() { // LWG#2566 says that the first template param must match the second one's value type - std::stack<double, std::deque<int>> t; + std::stack<double, std::deque<int>> t; } diff --git a/libcxx/test/std/containers/sequences/array/at.pass.cpp b/libcxx/test/std/containers/sequences/array/at.pass.cpp index efec4e40300..712a4da51f7 100644 --- a/libcxx/test/std/containers/sequences/array/at.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/at.pass.cpp @@ -27,7 +27,7 @@ constexpr bool check_idx( size_t idx, double val ) { std::array<double, 3> arr = {1, 2, 3.5}; - return arr.at(idx) == val; + return arr.at(idx) == val; } #endif diff --git a/libcxx/test/std/containers/sequences/array/front_back.pass.cpp b/libcxx/test/std/containers/sequences/array/front_back.pass.cpp index 68fc6cdc454..0591ca7fac3 100644 --- a/libcxx/test/std/containers/sequences/array/front_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/front_back.pass.cpp @@ -27,13 +27,13 @@ constexpr bool check_front( double val ) { std::array<double, 3> arr = {1, 2, 3.5}; - return arr.front() == val; + return arr.front() == val; } constexpr bool check_back( double val ) { std::array<double, 3> arr = {1, 2, 3.5}; - return arr.back() == val; + return arr.back() == val; } #endif diff --git a/libcxx/test/std/containers/sequences/array/indexing.pass.cpp b/libcxx/test/std/containers/sequences/array/indexing.pass.cpp index 3a5b9ee9727..43c494777a9 100644 --- a/libcxx/test/std/containers/sequences/array/indexing.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/indexing.pass.cpp @@ -27,7 +27,7 @@ constexpr bool check_idx( size_t idx, double val ) { std::array<double, 3> arr = {1, 2, 3.5}; - return arr[idx] == val; + return arr[idx] == val; } #endif diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp index db22086fd4c..4c1e15f7acb 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp @@ -80,17 +80,17 @@ int main() assert(false); } catch (...) { - gCopyConstructorShouldThow = false; + gCopyConstructorShouldThow = false; assert(vec==vec2); } - } + } - { - typedef std::deque<CMyClass, test_allocator<CMyClass> > C; + { + typedef std::deque<CMyClass, test_allocator<CMyClass> > C; C vec; C vec2(vec); - C::allocator_type::throw_after = 1; + C::allocator_type::throw_after = 1; try { vec.push_back(instance); assert(false); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp index 7a90c8a7596..0688ed02508 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp @@ -80,17 +80,17 @@ int main() assert(false); } catch (...) { - gCopyConstructorShouldThow = false; + gCopyConstructorShouldThow = false; assert(vec==vec2); } - } + } - { - typedef std::deque<CMyClass, test_allocator<CMyClass> > C; + { + typedef std::deque<CMyClass, test_allocator<CMyClass> > C; C vec; C vec2(vec); - C::allocator_type::throw_after = 1; + C::allocator_type::throw_after = 1; try { vec.push_front(instance); assert(false); diff --git a/libcxx/test/std/containers/sequences/list/types.pass.cpp b/libcxx/test/std/containers/sequences/list/types.pass.cpp index 7d5f5b6fa2f..8c47606fadc 100644 --- a/libcxx/test/std/containers/sequences/list/types.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/types.pass.cpp @@ -31,8 +31,8 @@ struct A { std::list<A> v; }; // incomplete type support int main() { - { - typedef std::list<int> C; + { + typedef std::list<int> C; static_assert((std::is_same<C::value_type, int>::value), ""); static_assert((std::is_same<C::allocator_type, std::allocator<int> >::value), ""); static_assert((std::is_same<C::reference, std::allocator<int>::reference>::value), ""); @@ -46,11 +46,11 @@ int main() typename std::iterator_traits<typename C::iterator>::difference_type>::value), ""); static_assert((std::is_same<typename C::difference_type, typename std::iterator_traits<typename C::const_iterator>::difference_type>::value), ""); - } + } #if TEST_STD_VER >= 11 { - typedef std::list<int, min_allocator<int>> C; + typedef std::list<int, min_allocator<int>> C; static_assert((std::is_same<C::value_type, int>::value), ""); static_assert((std::is_same<C::allocator_type, min_allocator<int> >::value), ""); static_assert((std::is_same<C::reference, int&>::value), ""); diff --git a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp index a18ba8fbaab..0f51c219ee4 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp @@ -24,9 +24,9 @@ void test0() { #if TEST_STD_VER > 14 - static_assert((noexcept(C{})), "" ); + static_assert((noexcept(C{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); + static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); #endif C c; LIBCPP_ASSERT(c.__invariants()); @@ -45,9 +45,9 @@ void test1(const typename C::allocator_type& a) { #if TEST_STD_VER > 14 - static_assert((noexcept(C{typename C::allocator_type{}})), "" ); + static_assert((noexcept(C{typename C::allocator_type{}})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); + static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); #endif C c(a); LIBCPP_ASSERT(c.__invariants()); diff --git a/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp index 06351e418ac..8fe18d4b4f8 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/reference.swap.pass.cpp @@ -23,17 +23,17 @@ int main() bool a[] = {false, true, false, true}; bool* an = a + sizeof(a)/sizeof(a[0]); - std::vector<bool> v(a, an); - std::vector<bool>::reference r1 = v[0]; - std::vector<bool>::reference r2 = v[3]; + std::vector<bool> v(a, an); + std::vector<bool>::reference r1 = v[0]; + std::vector<bool>::reference r2 = v[3]; #if TEST_STD_VER >= 11 static_assert((noexcept(v.swap(r1,r2))), ""); #endif - assert(!r1); - assert( r2); - v.swap(r1, r2); - assert( r1); - assert(!r2); + assert(!r1); + assert( r2); + v.swap(r1, r2); + assert( r1); + assert(!r2); } diff --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp index edeae04d7bd..a71f5b32c03 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp @@ -27,9 +27,9 @@ void test0() { #if TEST_STD_VER > 14 - static_assert((noexcept(C{})), "" ); + static_assert((noexcept(C{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); + static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" ); #endif C c; LIBCPP_ASSERT(c.__invariants()); @@ -50,9 +50,9 @@ void test1(const typename C::allocator_type& a) { #if TEST_STD_VER > 14 - static_assert((noexcept(C{typename C::allocator_type{}})), "" ); + static_assert((noexcept(C{typename C::allocator_type{}})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); + static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" ); #endif C c(a); LIBCPP_ASSERT(c.__invariants()); diff --git a/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp index b7ea3a286f3..0fc335f15ac 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.data/data.pass.cpp @@ -18,13 +18,13 @@ #include "asan_testing.h" struct Nasty { - Nasty() : i_(0) {} - Nasty(int i) : i_(i) {} - ~Nasty() {} + Nasty() : i_(0) {} + Nasty(int i) : i_(i) {} + ~Nasty() {} - Nasty * operator&() const { assert(false); return nullptr; } - int i_; - }; + Nasty * operator&() const { assert(false); return nullptr; } + int i_; + }; int main() { diff --git a/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp index 3c013c1ae8a..fa8b6a8afdf 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.data/data_const.pass.cpp @@ -18,13 +18,13 @@ #include "asan_testing.h" struct Nasty { - Nasty() : i_(0) {} - Nasty(int i) : i_(i) {} - ~Nasty() {} + Nasty() : i_(0) {} + Nasty(int i) : i_(i) {} + ~Nasty() {} - Nasty * operator&() const { assert(false); return nullptr; } - int i_; - }; + Nasty * operator&() const { assert(false); return nullptr; } + int i_; + }; int main() { diff --git a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp index 58222b7f924..41015726ef6 100644 --- a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp @@ -25,7 +25,7 @@ template <class C> void rehash_postcondition(const C& c, size_t n) { - assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); + assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } template <class C> diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp index 7f62a4fedf8..8f6f16c62a6 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/compare_copy_constructible.fail.cpp @@ -19,14 +19,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::unordered_map<int, int, std::hash<int>, Comp<int> > m; + std::unordered_map<int, int, std::hash<int>, Comp<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp index 2525c4444ff..aca2a5aa365 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/hash_copy_constructible.fail.cpp @@ -19,14 +19,14 @@ template <class T> struct Hash { - std::size_t operator () (const T& lhs) const { return 0; } + std::size_t operator () (const T& lhs) const { return 0; } - Hash () {} + Hash () {} private: - Hash (const Hash &); // declared but not defined + Hash (const Hash &); // declared but not defined }; int main() { - std::unordered_map<int, int, Hash<int> > m; + std::unordered_map<int, int, Hash<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp index 75807fa7888..9497b15233c 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp @@ -122,7 +122,7 @@ struct some_alloc3 int main() { - typedef std::pair<const MoveOnly, MoveOnly> MapType; + typedef std::pair<const MoveOnly, MoveOnly> MapType; { typedef std::unordered_map<MoveOnly, MoveOnly> C; static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), ""); diff --git a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp index 3d3832a2fe3..22202ccb612 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp @@ -28,7 +28,7 @@ template <class C> void rehash_postcondition(const C& c, size_t n) { - assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); + assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } template <class C> diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp index 1c46e7adeaf..cb0ce522d3f 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/compare_copy_constructible.fail.cpp @@ -19,14 +19,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::unordered_multimap<int, int, std::hash<int>, Comp<int> > m; + std::unordered_multimap<int, int, std::hash<int>, Comp<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp index 71e1c9f6d4b..f5f42e5d26a 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/hash_copy_constructible.fail.cpp @@ -19,14 +19,14 @@ template <class T> struct Hash { - std::size_t operator () (const T& lhs) const { return 0; } + std::size_t operator () (const T& lhs) const { return 0; } - Hash () {} + Hash () {} private: - Hash (const Hash &); // declared but not defined - }; + Hash (const Hash &); // declared but not defined + }; int main() { - std::unordered_multimap<int, int, Hash<int> > m; + std::unordered_multimap<int, int, Hash<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp index 2c5d509951a..83fb58d8a48 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp @@ -24,7 +24,7 @@ template <class C> void rehash_postcondition(const C& c, size_t n) { - assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); + assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } template <class C> diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp index 1cda95be6eb..1b81905b673 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/compare_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::unordered_multiset<int, std::hash<int>, Comp<int> > m; + std::unordered_multiset<int, std::hash<int>, Comp<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp index 6fa52a79490..cae8ab9733e 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/hash_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Hash { - std::size_t operator () (const T& lhs) const { return 0; } + std::size_t operator () (const T& lhs) const { return 0; } - Hash () {} + Hash () {} private: - Hash (const Hash &); // declared but not defined - }; + Hash (const Hash &); // declared but not defined + }; int main() { - std::unordered_multiset<int, Hash<int> > m; + std::unordered_multiset<int, Hash<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp index fd689bfd9df..dc3adccc6e7 100644 --- a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp @@ -24,7 +24,7 @@ template <class C> void rehash_postcondition(const C& c, size_t n) { - assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); + assert(c.bucket_count() >= c.size() / c.max_load_factor() && c.bucket_count() >= n); } template <class C> diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp index 79782550d0f..411731479cb 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/compare_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Comp { - bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } + bool operator () (const T& lhs, const T& rhs) const { return lhs == rhs; } - Comp () {} + Comp () {} private: - Comp (const Comp &); // declared but not defined - }; + Comp (const Comp &); // declared but not defined + }; int main() { - std::unordered_set<int, std::hash<int>, Comp<int> > m; + std::unordered_set<int, std::hash<int>, Comp<int> > m; } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp index 81ad16b7244..caa4bef0278 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp @@ -82,7 +82,7 @@ int main() assert(c.max_load_factor() == 1); } { - A a; + A a; C c(a); LIBCPP_ASSERT(c.bucket_count() == 0); assert(c.hash_function() == test_hash<std::hash<NotConstructible> >()); diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp index 9e135e2c141..da368a15423 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/hash_copy_constructible.fail.cpp @@ -16,14 +16,14 @@ template <class T> struct Hash { - std::size_t operator () (const T& lhs) const { return 0; } + std::size_t operator () (const T& lhs) const { return 0; } - Hash () {} + Hash () {} private: - Hash (const Hash &); // declared but not defined - }; + Hash (const Hash &); // declared but not defined + }; int main() { - std::unordered_set<int, Hash<int> > m; + std::unordered_set<int, Hash<int> > m; } diff --git a/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp b/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp index bd843621def..a74bd2f6bdf 100644 --- a/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/is_error_code_enum.pass.cpp @@ -28,8 +28,8 @@ test() } class A { - A(); - operator std::error_code () const { return std::error_code(); } + A(); + operator std::error_code () const { return std::error_code(); } }; // Specialize the template for my class diff --git a/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp b/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp index b2efd9e0775..1321dcc6b95 100644 --- a/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/is_error_condition_enum.pass.cpp @@ -28,8 +28,8 @@ test() } class A { - A(); - operator std::error_condition () const { return std::error_condition(); } + A(); + operator std::error_condition () const { return std::error_condition(); } }; // Specialize the template for my class diff --git a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp index 81d220ba1ae..126f7c8a8e5 100644 --- a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp +++ b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp @@ -15,7 +15,7 @@ // ForwardIterator search(ForwardIterator first, ForwardIterator last, // const Searcher& searcher); // -// returns searcher.operator(first, last).first +// returns searcher.operator(first, last).first // #include <experimental/algorithm> diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp index 467e09d5d2b..68c786bc7b1 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp @@ -39,7 +39,7 @@ #include "test_iterators.h" template <typename T> struct MyHash { - size_t operator () (T t) const { return static_cast<size_t>(t); } + size_t operator () (T t) const { return static_cast<size_t>(t); } }; template <typename Iter1, typename Iter2> diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp index b0e5e877dfe..fe03fa081bc 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp @@ -39,7 +39,7 @@ #include "test_iterators.h" template <typename T> struct MyHash { - size_t operator () (T t) const { return static_cast<size_t>(t); } + size_t operator () (T t) const { return static_cast<size_t>(t); } }; struct count_equal diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp index abfab17d02c..e2d34df8235 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp @@ -38,7 +38,7 @@ #include "test_iterators.h" template <typename T> struct MyHash { - size_t operator () (T t) const { return static_cast<size_t>(t); } + size_t operator () (T t) const { return static_cast<size_t>(t); } }; template <typename Iter1, typename Iter2> diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp index 28f3324966e..eaa5233d627 100644 --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp @@ -38,7 +38,7 @@ #include "test_iterators.h" template <typename T> struct MyHash { - size_t operator () (T t) const { return static_cast<size_t>(t); } + size_t operator () (T t) const { return static_cast<size_t>(t); } }; struct count_equal diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp index 5c84d210e53..0bae57e1b18 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.cons/ostream_joiner.cons.pass.cpp @@ -26,33 +26,33 @@ namespace exp = std::experimental; int main () { - const char eight = '8'; - const std::string nine = "9"; - const std::wstring ten = L"10"; - const int eleven = 11; - -// Narrow streams w/rvalues - { exp::ostream_joiner<char> oj(std::cout, '8'); } - { exp::ostream_joiner<std::string> oj(std::cout, std::string("9")); } - { exp::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); } - { exp::ostream_joiner<int> oj(std::cout, 11); } - -// Narrow streams w/lvalues - { exp::ostream_joiner<char> oj(std::cout, eight); } - { exp::ostream_joiner<std::string> oj(std::cout, nine); } - { exp::ostream_joiner<std::wstring> oj(std::cout, ten); } - { exp::ostream_joiner<int> oj(std::cout, eleven); } - -// Wide streams w/rvalues - { exp::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); } - { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); } - { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); } - { exp::ostream_joiner<int, wchar_t> oj(std::wcout, 11); } - -// Wide streams w/lvalues - { exp::ostream_joiner<char, wchar_t> oj(std::wcout, eight); } - { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, nine); } - { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, ten); } - { exp::ostream_joiner<int, wchar_t> oj(std::wcout, eleven); } - - } + const char eight = '8'; + const std::string nine = "9"; + const std::wstring ten = L"10"; + const int eleven = 11; + +// Narrow streams w/rvalues + { exp::ostream_joiner<char> oj(std::cout, '8'); } + { exp::ostream_joiner<std::string> oj(std::cout, std::string("9")); } + { exp::ostream_joiner<std::wstring> oj(std::cout, std::wstring(L"10")); } + { exp::ostream_joiner<int> oj(std::cout, 11); } + +// Narrow streams w/lvalues + { exp::ostream_joiner<char> oj(std::cout, eight); } + { exp::ostream_joiner<std::string> oj(std::cout, nine); } + { exp::ostream_joiner<std::wstring> oj(std::cout, ten); } + { exp::ostream_joiner<int> oj(std::cout, eleven); } + +// Wide streams w/rvalues + { exp::ostream_joiner<char, wchar_t> oj(std::wcout, '8'); } + { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, std::string("9")); } + { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, std::wstring(L"10")); } + { exp::ostream_joiner<int, wchar_t> oj(std::wcout, 11); } + +// Wide streams w/lvalues + { exp::ostream_joiner<char, wchar_t> oj(std::wcout, eight); } + { exp::ostream_joiner<std::string, wchar_t> oj(std::wcout, nine); } + { exp::ostream_joiner<std::wstring, wchar_t> oj(std::wcout, ten); } + { exp::ostream_joiner<int, wchar_t> oj(std::wcout, eleven); } + + } diff --git a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp index b2c294fd034..87ab1e271dc 100644 --- a/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp +++ b/libcxx/test/std/experimental/iterator/ostream.joiner/ostream.joiner.ops/ostream_joiner.op.assign.pass.cpp @@ -27,10 +27,10 @@ #include "test_iterators.h" struct mutating_delimiter { - mutating_delimiter(char c = ' ') : c_(c) {} - char get () const { return c_++; } - mutable char c_; - }; + mutating_delimiter(char c = ' ') : c_(c) {} + char get () const { return c_++; } + mutable char c_; + }; template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& @@ -39,10 +39,10 @@ operator<<(std::basic_ostream<_CharT, _Traits>& os, const mutating_delimiter &d) struct mutating_delimiter2 { // same as above, w/o the const and the mutable - mutating_delimiter2(char c = ' ') : c_(c) {} - char get () { return c_++; } - char c_; - }; + mutating_delimiter2(char c = ' ') : c_(c) {} + char get () { return c_++; } + char c_; + }; template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& @@ -54,67 +54,67 @@ namespace exp = std::experimental; template <class Delim, class Iter, class CharT = char, class Traits = std::char_traits<CharT>> void test (Delim &&d, Iter first, Iter last, const CharT *expected ) { - typedef exp::ostream_joiner<typename std::decay<Delim>::type, CharT, Traits> Joiner; + typedef exp::ostream_joiner<typename std::decay<Delim>::type, CharT, Traits> Joiner; - static_assert((std::is_copy_constructible<Joiner>::value == std::is_copy_constructible<typename std::decay<Delim>::type>::value), "" ); - static_assert((std::is_move_constructible<Joiner>::value == std::is_move_constructible<typename std::decay<Delim>::type>::value), "" ); - static_assert((std::is_copy_assignable<Joiner> ::value == std::is_copy_assignable<typename std::decay<Delim>::type> ::value), "" ); - static_assert((std::is_move_assignable<Joiner> ::value == std::is_move_assignable<typename std::decay<Delim>::type> ::value), "" ); + static_assert((std::is_copy_constructible<Joiner>::value == std::is_copy_constructible<typename std::decay<Delim>::type>::value), "" ); + static_assert((std::is_move_constructible<Joiner>::value == std::is_move_constructible<typename std::decay<Delim>::type>::value), "" ); + static_assert((std::is_copy_assignable<Joiner> ::value == std::is_copy_assignable<typename std::decay<Delim>::type> ::value), "" ); + static_assert((std::is_move_assignable<Joiner> ::value == std::is_move_assignable<typename std::decay<Delim>::type> ::value), "" ); - std::basic_stringstream<CharT, Traits> sstream; - Joiner joiner(sstream, d); - while (first != last) - *joiner++ = *first++; - assert(sstream.str() == expected); - } + std::basic_stringstream<CharT, Traits> sstream; + Joiner joiner(sstream, d); + while (first != last) + *joiner++ = *first++; + assert(sstream.str() == expected); + } int main () { { - const char chars[] = "0123456789"; - const int ints [] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; - - test('X', chars, chars+10, "0X1X2X3X4X5X6X7X8X9"); - test('x', ints, ints+10, "10x11x12x13x14x15x16x17x18x19"); - test('X', input_iterator<const char*>(chars), input_iterator<const char*>(chars+10), "0X1X2X3X4X5X6X7X8X9"); - test('x', input_iterator<const int*>(ints), input_iterator<const int*>(ints+10), "10x11x12x13x14x15x16x17x18x19"); - test('X', forward_iterator<const char*>(chars), forward_iterator<const char*>(chars+10), "0X1X2X3X4X5X6X7X8X9"); - test('x', forward_iterator<const int*>(ints), forward_iterator<const int*>(ints+10), "10x11x12x13x14x15x16x17x18x19"); - test('X', random_access_iterator<const char*>(chars), random_access_iterator<const char*>(chars+10), "0X1X2X3X4X5X6X7X8X9"); - test('x', random_access_iterator<const int*>(ints), random_access_iterator<const int*>(ints+10), "10x11x12x13x14x15x16x17x18x19"); - - test("Z", chars, chars+10, "0Z1Z2Z3Z4Z5Z6Z7Z8Z9"); - test("z", ints, ints+10, "10z11z12z13z14z15z16z17z18z19"); - - test<char, const char *, wchar_t> ('X', chars, chars+10, L"0X1X2X3X4X5X6X7X8X9"); - test<char, const int *, wchar_t> ('x', ints, ints+10, L"10x11x12x13x14x15x16x17x18x19"); -// test<char, const char *, char16_t>('X', chars, chars+10, u"0X1X2X3X4X5X6X7X8X9"); -// test<char, const int *, char16_t>('x', ints, ints+10, u"10x11x12x13x14x15x16x17x18x19"); -// test<char, const char *, char32_t>('X', chars, chars+10, U"0X1X2X3X4X5X6X7X8X9"); -// test<char, const int *, char32_t>('x', ints, ints+10, U"10x11x12x13x14x15x16x17x18x19"); - - test(mutating_delimiter(), chars, chars+10, "0 1!2\"3#4$5%6&7'8(9"); - test(mutating_delimiter2(), chars, chars+10, "0 1!2\"3#4$5%6&7'8(9"); - } - - { - const wchar_t chars[] = L"0123456789"; - const int ints [] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; - test(L'X', chars, chars+10, L"0X1X2X3X4X5X6X7X8X9"); - test(L'x', ints, ints+10, L"10x11x12x13x14x15x16x17x18x19"); - test(L'X', input_iterator<const wchar_t*>(chars), input_iterator<const wchar_t*>(chars+10), L"0X1X2X3X4X5X6X7X8X9"); - test(L'x', input_iterator<const int*>(ints), input_iterator<const int*>(ints+10), L"10x11x12x13x14x15x16x17x18x19"); - test(L'X', forward_iterator<const wchar_t*>(chars), forward_iterator<const wchar_t*>(chars+10), L"0X1X2X3X4X5X6X7X8X9"); - test(L'x', forward_iterator<const int*>(ints), forward_iterator<const int*>(ints+10), L"10x11x12x13x14x15x16x17x18x19"); - test(L'X', random_access_iterator<const wchar_t*>(chars), random_access_iterator<const wchar_t*>(chars+10), L"0X1X2X3X4X5X6X7X8X9"); - test(L'x', random_access_iterator<const int*>(ints), random_access_iterator<const int*>(ints+10), L"10x11x12x13x14x15x16x17x18x19"); - - test(L"Z", chars, chars+10, L"0Z1Z2Z3Z4Z5Z6Z7Z8Z9"); - test(L"z", ints, ints+10, L"10z11z12z13z14z15z16z17z18z19"); - - test<char, const wchar_t *, wchar_t> ('X', chars, chars+10, L"0X1X2X3X4X5X6X7X8X9"); - test<char, const int *, wchar_t> ('x', ints, ints+10, L"10x11x12x13x14x15x16x17x18x19"); - - test(mutating_delimiter(), chars, chars+10, L"0 1!2\"3#4$5%6&7'8(9"); - } + const char chars[] = "0123456789"; + const int ints [] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; + + test('X', chars, chars+10, "0X1X2X3X4X5X6X7X8X9"); + test('x', ints, ints+10, "10x11x12x13x14x15x16x17x18x19"); + test('X', input_iterator<const char*>(chars), input_iterator<const char*>(chars+10), "0X1X2X3X4X5X6X7X8X9"); + test('x', input_iterator<const int*>(ints), input_iterator<const int*>(ints+10), "10x11x12x13x14x15x16x17x18x19"); + test('X', forward_iterator<const char*>(chars), forward_iterator<const char*>(chars+10), "0X1X2X3X4X5X6X7X8X9"); + test('x', forward_iterator<const int*>(ints), forward_iterator<const int*>(ints+10), "10x11x12x13x14x15x16x17x18x19"); + test('X', random_access_iterator<const char*>(chars), random_access_iterator<const char*>(chars+10), "0X1X2X3X4X5X6X7X8X9"); + test('x', random_access_iterator<const int*>(ints), random_access_iterator<const int*>(ints+10), "10x11x12x13x14x15x16x17x18x19"); + + test("Z", chars, chars+10, "0Z1Z2Z3Z4Z5Z6Z7Z8Z9"); + test("z", ints, ints+10, "10z11z12z13z14z15z16z17z18z19"); + + test<char, const char *, wchar_t> ('X', chars, chars+10, L"0X1X2X3X4X5X6X7X8X9"); + test<char, const int *, wchar_t> ('x', ints, ints+10, L"10x11x12x13x14x15x16x17x18x19"); +// test<char, const char *, char16_t>('X', chars, chars+10, u"0X1X2X3X4X5X6X7X8X9"); +// test<char, const int *, char16_t>('x', ints, ints+10, u"10x11x12x13x14x15x16x17x18x19"); +// test<char, const char *, char32_t>('X', chars, chars+10, U"0X1X2X3X4X5X6X7X8X9"); +// test<char, const int *, char32_t>('x', ints, ints+10, U"10x11x12x13x14x15x16x17x18x19"); + + test(mutating_delimiter(), chars, chars+10, "0 1!2\"3#4$5%6&7'8(9"); + test(mutating_delimiter2(), chars, chars+10, "0 1!2\"3#4$5%6&7'8(9"); + } + + { + const wchar_t chars[] = L"0123456789"; + const int ints [] = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; + test(L'X', chars, chars+10, L"0X1X2X3X4X5X6X7X8X9"); + test(L'x', ints, ints+10, L"10x11x12x13x14x15x16x17x18x19"); + test(L'X', input_iterator<const wchar_t*>(chars), input_iterator<const wchar_t*>(chars+10), L"0X1X2X3X4X5X6X7X8X9"); + test(L'x', input_iterator<const int*>(ints), input_iterator<const int*>(ints+10), L"10x11x12x13x14x15x16x17x18x19"); + test(L'X', forward_iterator<const wchar_t*>(chars), forward_iterator<const wchar_t*>(chars+10), L"0X1X2X3X4X5X6X7X8X9"); + test(L'x', forward_iterator<const int*>(ints), forward_iterator<const int*>(ints+10), L"10x11x12x13x14x15x16x17x18x19"); + test(L'X', random_access_iterator<const wchar_t*>(chars), random_access_iterator<const wchar_t*>(chars+10), L"0X1X2X3X4X5X6X7X8X9"); + test(L'x', random_access_iterator<const int*>(ints), random_access_iterator<const int*>(ints+10), L"10x11x12x13x14x15x16x17x18x19"); + + test(L"Z", chars, chars+10, L"0Z1Z2Z3Z4Z5Z6Z7Z8Z9"); + test(L"z", ints, ints+10, L"10z11z12z13z14z15z16z17z18z19"); + + test<char, const wchar_t *, wchar_t> ('X', chars, chars+10, L"0X1X2X3X4X5X6X7X8X9"); + test<char, const int *, wchar_t> ('x', ints, ints+10, L"10x11x12x13x14x15x16x17x18x19"); + + test(mutating_delimiter(), chars, chars+10, L"0 1!2\"3#4$5%6&7'8(9"); + } } diff --git a/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index fd463e88e63..211363aeac6 100644 --- a/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/experimental/numeric/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -132,8 +132,8 @@ int main() // LWG#2792 { auto res1 = std::experimental::lcm((int64_t)1234, (int32_t)-2147483648); - (void) std::experimental::lcm<int, unsigned long>(INT_MIN, 2); // this used to trigger UBSAN + (void) std::experimental::lcm<int, unsigned long>(INT_MIN, 2); // this used to trigger UBSAN static_assert( std::is_same<decltype(res1), std::common_type<int64_t, int32_t>::type>::value, ""); - assert(res1 == 1324997410816LL); + assert(res1 == 1324997410816LL); } } diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp index 6b550b5dabe..5a8369c2c88 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp @@ -18,7 +18,7 @@ #include "test_macros.h" -// Test that mismatches between strings and wide streams are diagnosed +// Test that mismatches between strings and wide streams are diagnosed #if TEST_STD_VER > 11 diff --git a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp index 109674d1660..9c0d3366c34 100644 --- a/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp +++ b/libcxx/test/std/input.output/iostream.format/quoted.manip/quoted_traits.fail.cpp @@ -20,7 +20,7 @@ #if TEST_STD_VER > 11 -// Test that mismatches in the traits between the quoted object and the dest string are diagnosed. +// Test that mismatches in the traits between the quoted object and the dest string are diagnosed. template <class charT> struct test_traits diff --git a/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp b/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp index 94a3d8c2004..335d8358ada 100644 --- a/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp +++ b/libcxx/test/std/iterators/iterator.range/begin-end.fail.cpp @@ -26,26 +26,26 @@ #include <cassert> namespace Foo { - struct FakeContainer {}; - typedef int FakeIter; - - FakeIter begin(const FakeContainer &) { return 1; } - FakeIter end (const FakeContainer &) { return 2; } - FakeIter rbegin(const FakeContainer &) { return 3; } - FakeIter rend (const FakeContainer &) { return 4; } - - FakeIter cbegin(const FakeContainer &) { return 11; } - FakeIter cend (const FakeContainer &) { return 12; } - FakeIter crbegin(const FakeContainer &) { return 13; } - FakeIter crend (const FakeContainer &) { return 14; } + struct FakeContainer {}; + typedef int FakeIter; + + FakeIter begin(const FakeContainer &) { return 1; } + FakeIter end (const FakeContainer &) { return 2; } + FakeIter rbegin(const FakeContainer &) { return 3; } + FakeIter rend (const FakeContainer &) { return 4; } + + FakeIter cbegin(const FakeContainer &) { return 11; } + FakeIter cend (const FakeContainer &) { return 12; } + FakeIter crbegin(const FakeContainer &) { return 13; } + FakeIter crend (const FakeContainer &) { return 14; } } int main(){ // Bug #28927 - shouldn't find these via ADL - (void) std::cbegin (Foo::FakeContainer()); - (void) std::cend (Foo::FakeContainer()); - (void) std::crbegin(Foo::FakeContainer()); - (void) std::crend (Foo::FakeContainer()); + (void) std::cbegin (Foo::FakeContainer()); + (void) std::cend (Foo::FakeContainer()); + (void) std::crbegin(Foo::FakeContainer()); + (void) std::crend (Foo::FakeContainer()); } #endif diff --git a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp index 88e2253d08c..43a11bab3fd 100644 --- a/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp +++ b/libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp @@ -46,8 +46,8 @@ public: class C { public: - virtual ~C() {} - C * operator&() const { assert(false); return nullptr; } // should not be called + virtual ~C() {} + C * operator&() const { assert(false); return nullptr; } // should not be called }; class D : private std::nested_exception {}; diff --git a/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp index ec1c3805a6c..4aea7909dfa 100644 --- a/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp @@ -16,24 +16,24 @@ constexpr std::byte test(std::byte b1, std::byte b2) { - std::byte bret = b1; - return bret &= b2; - } + std::byte bret = b1; + return bret &= b2; + } int main () { - std::byte b; // not constexpr, just used in noexcept check - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; - constexpr std::byte b9{static_cast<std::byte>(9)}; + std::byte b; // not constexpr, just used in noexcept check + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; + constexpr std::byte b9{static_cast<std::byte>(9)}; - static_assert(noexcept(b &= b), "" ); + static_assert(noexcept(b &= b), "" ); - static_assert(std::to_integer<int>(test(b1, b8)) == 0, ""); - static_assert(std::to_integer<int>(test(b1, b9)) == 1, ""); - static_assert(std::to_integer<int>(test(b8, b9)) == 8, ""); + static_assert(std::to_integer<int>(test(b1, b8)) == 0, ""); + static_assert(std::to_integer<int>(test(b1, b9)) == 1, ""); + static_assert(std::to_integer<int>(test(b8, b9)) == 8, ""); - static_assert(std::to_integer<int>(test(b8, b1)) == 0, ""); - static_assert(std::to_integer<int>(test(b9, b1)) == 1, ""); - static_assert(std::to_integer<int>(test(b9, b8)) == 8, ""); + static_assert(std::to_integer<int>(test(b8, b1)) == 0, ""); + static_assert(std::to_integer<int>(test(b9, b1)) == 1, ""); + static_assert(std::to_integer<int>(test(b9, b8)) == 8, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp index 6c5419cfc2a..32c0bdaee84 100644 --- a/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/and.pass.cpp @@ -15,17 +15,17 @@ // constexpr byte operator&(byte l, byte r) noexcept; int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; - constexpr std::byte b9{static_cast<std::byte>(9)}; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; + constexpr std::byte b9{static_cast<std::byte>(9)}; - static_assert(noexcept(b1 & b8), "" ); + static_assert(noexcept(b1 & b8), "" ); - static_assert(std::to_integer<int>(b1 & b8) == 0, ""); - static_assert(std::to_integer<int>(b1 & b9) == 1, ""); - static_assert(std::to_integer<int>(b8 & b9) == 8, ""); + static_assert(std::to_integer<int>(b1 & b8) == 0, ""); + static_assert(std::to_integer<int>(b1 & b9) == 1, ""); + static_assert(std::to_integer<int>(b8 & b9) == 8, ""); - static_assert(std::to_integer<int>(b8 & b1) == 0, ""); - static_assert(std::to_integer<int>(b9 & b1) == 1, ""); - static_assert(std::to_integer<int>(b9 & b8) == 8, ""); + static_assert(std::to_integer<int>(b8 & b1) == 0, ""); + static_assert(std::to_integer<int>(b9 & b1) == 1, ""); + static_assert(std::to_integer<int>(b9 & b8) == 8, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp index 8f6822932ac..66946b4647b 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.fail.cpp @@ -22,10 +22,10 @@ constexpr std::byte test(std::byte b) { - return b <<= 2.0; - } + return b <<= 2.0; + } int main () { - constexpr std::byte b1 = test(std::byte{1}); + constexpr std::byte b1 = test(std::byte{1}); } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp index abfeebf2b02..6883dccfb99 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp @@ -19,18 +19,18 @@ constexpr std::byte test(std::byte b) { - return b <<= 2; - } + return b <<= 2; + } int main () { - std::byte b; // not constexpr, just used in noexcept check - constexpr std::byte b2{static_cast<std::byte>(2)}; - constexpr std::byte b3{static_cast<std::byte>(3)}; + std::byte b; // not constexpr, just used in noexcept check + constexpr std::byte b2{static_cast<std::byte>(2)}; + constexpr std::byte b3{static_cast<std::byte>(3)}; - static_assert(noexcept(b <<= 2), "" ); + static_assert(noexcept(b <<= 2), "" ); - static_assert(std::to_integer<int>(test(b2)) == 8, "" ); - static_assert(std::to_integer<int>(test(b3)) == 12, "" ); + static_assert(std::to_integer<int>(test(b2)) == 8, "" ); + static_assert(std::to_integer<int>(test(b3)) == 12, "" ); } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp index 707258c6df3..c213935912c 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.fail.cpp @@ -18,6 +18,6 @@ // is_integral_v<IntegerType> is true. int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b2 = b1 << 2.0f; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b2 = b1 << 2.0f; } diff --git a/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp index 15ad796cbe9..a1731b9904c 100644 --- a/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp @@ -18,13 +18,13 @@ // is_integral_v<IntegerType> is true. int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b3{static_cast<std::byte>(3)}; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b3{static_cast<std::byte>(3)}; - static_assert(noexcept(b3 << 2), "" ); + static_assert(noexcept(b3 << 2), "" ); - static_assert(std::to_integer<int>(b1 << 1) == 2, ""); - static_assert(std::to_integer<int>(b1 << 2) == 4, ""); - static_assert(std::to_integer<int>(b3 << 4) == 48, ""); - static_assert(std::to_integer<int>(b3 << 6) == 192, ""); + static_assert(std::to_integer<int>(b1 << 1) == 2, ""); + static_assert(std::to_integer<int>(b1 << 2) == 4, ""); + static_assert(std::to_integer<int>(b3 << 4) == 48, ""); + static_assert(std::to_integer<int>(b3 << 6) == 192, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp index 53f1d91faf2..2629001e96a 100644 --- a/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/not.pass.cpp @@ -15,13 +15,13 @@ // constexpr byte operator~(byte b) noexcept; int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b2{static_cast<std::byte>(2)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b2{static_cast<std::byte>(2)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; - static_assert(noexcept(~b1), "" ); + static_assert(noexcept(~b1), "" ); - static_assert(std::to_integer<int>(~b1) == 254, ""); - static_assert(std::to_integer<int>(~b2) == 253, ""); - static_assert(std::to_integer<int>(~b8) == 247, ""); + static_assert(std::to_integer<int>(~b1) == 254, ""); + static_assert(std::to_integer<int>(~b2) == 253, ""); + static_assert(std::to_integer<int>(~b8) == 247, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp index bb4a84ec6c7..0cceeaaece1 100644 --- a/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp @@ -16,25 +16,25 @@ constexpr std::byte test(std::byte b1, std::byte b2) { - std::byte bret = b1; - return bret |= b2; - } + std::byte bret = b1; + return bret |= b2; + } int main () { - std::byte b; // not constexpr, just used in noexcept check - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b2{static_cast<std::byte>(2)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; + std::byte b; // not constexpr, just used in noexcept check + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b2{static_cast<std::byte>(2)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; - static_assert(noexcept(b |= b), "" ); + static_assert(noexcept(b |= b), "" ); - static_assert(std::to_integer<int>(test(b1, b2)) == 3, ""); - static_assert(std::to_integer<int>(test(b1, b8)) == 9, ""); - static_assert(std::to_integer<int>(test(b2, b8)) == 10, ""); + static_assert(std::to_integer<int>(test(b1, b2)) == 3, ""); + static_assert(std::to_integer<int>(test(b1, b8)) == 9, ""); + static_assert(std::to_integer<int>(test(b2, b8)) == 10, ""); - static_assert(std::to_integer<int>(test(b2, b1)) == 3, ""); - static_assert(std::to_integer<int>(test(b8, b1)) == 9, ""); - static_assert(std::to_integer<int>(test(b8, b2)) == 10, ""); + static_assert(std::to_integer<int>(test(b2, b1)) == 3, ""); + static_assert(std::to_integer<int>(test(b8, b1)) == 9, ""); + static_assert(std::to_integer<int>(test(b8, b2)) == 10, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp index e2b734982c0..62260f27bd2 100644 --- a/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/or.pass.cpp @@ -15,17 +15,17 @@ // constexpr byte operator|(byte l, byte r) noexcept; int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b2{static_cast<std::byte>(2)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b2{static_cast<std::byte>(2)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; - static_assert(noexcept(b1 | b2), "" ); + static_assert(noexcept(b1 | b2), "" ); - static_assert(std::to_integer<int>(b1 | b2) == 3, ""); - static_assert(std::to_integer<int>(b1 | b8) == 9, ""); - static_assert(std::to_integer<int>(b2 | b8) == 10, ""); + static_assert(std::to_integer<int>(b1 | b2) == 3, ""); + static_assert(std::to_integer<int>(b1 | b8) == 9, ""); + static_assert(std::to_integer<int>(b2 | b8) == 10, ""); - static_assert(std::to_integer<int>(b2 | b1) == 3, ""); - static_assert(std::to_integer<int>(b8 | b1) == 9, ""); - static_assert(std::to_integer<int>(b8 | b2) == 10, ""); + static_assert(std::to_integer<int>(b2 | b1) == 3, ""); + static_assert(std::to_integer<int>(b8 | b1) == 9, ""); + static_assert(std::to_integer<int>(b8 | b2) == 10, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp index 44992fa98c3..80f0bd7bcf5 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.fail.cpp @@ -22,10 +22,10 @@ constexpr std::byte test(std::byte b) { - return b >>= 2.0; - } + return b >>= 2.0; + } int main () { - constexpr std::byte b1 = test(std::byte{1}); + constexpr std::byte b1 = test(std::byte{1}); } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp index 82c611cfdfc..6763995f6d4 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp @@ -19,17 +19,17 @@ constexpr std::byte test(std::byte b) { - return b >>= 2; - } + return b >>= 2; + } int main () { - std::byte b; // not constexpr, just used in noexcept check - constexpr std::byte b16{static_cast<std::byte>(16)}; - constexpr std::byte b192{static_cast<std::byte>(192)}; + std::byte b; // not constexpr, just used in noexcept check + constexpr std::byte b16{static_cast<std::byte>(16)}; + constexpr std::byte b192{static_cast<std::byte>(192)}; - static_assert(noexcept(b >>= 2), "" ); + static_assert(noexcept(b >>= 2), "" ); - static_assert(std::to_integer<int>(test(b16)) == 4, "" ); - static_assert(std::to_integer<int>(test(b192)) == 48, "" ); + static_assert(std::to_integer<int>(test(b16)) == 4, "" ); + static_assert(std::to_integer<int>(test(b192)) == 48, "" ); } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp index 8e142dd90a5..b78af2eb260 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.fail.cpp @@ -18,6 +18,6 @@ // is_integral_v<IntegerType> is true. int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b2 = b1 >> 2.0f; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b2 = b1 >> 2.0f; } diff --git a/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp index 22d399130bb..eec3ad6839b 100644 --- a/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp @@ -19,19 +19,19 @@ constexpr std::byte test(std::byte b) { - return b <<= 2; - } + return b <<= 2; + } int main () { - constexpr std::byte b100{static_cast<std::byte>(100)}; - constexpr std::byte b115{static_cast<std::byte>(115)}; + constexpr std::byte b100{static_cast<std::byte>(100)}; + constexpr std::byte b115{static_cast<std::byte>(115)}; - static_assert(noexcept(b100 << 2), "" ); + static_assert(noexcept(b100 << 2), "" ); - static_assert(std::to_integer<int>(b100 >> 1) == 50, ""); - static_assert(std::to_integer<int>(b100 >> 2) == 25, ""); - static_assert(std::to_integer<int>(b115 >> 3) == 14, ""); - static_assert(std::to_integer<int>(b115 >> 6) == 1, ""); + static_assert(std::to_integer<int>(b100 >> 1) == 50, ""); + static_assert(std::to_integer<int>(b100 >> 2) == 25, ""); + static_assert(std::to_integer<int>(b115 >> 3) == 14, ""); + static_assert(std::to_integer<int>(b115 >> 6) == 1, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp b/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp index fb4928956f5..86f2ad95bf1 100644 --- a/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/to_integer.fail.cpp @@ -18,6 +18,6 @@ // is_integral_v<IntegerType> is true. int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - auto f = std::to_integer<float>(b1); + constexpr std::byte b1{static_cast<std::byte>(1)}; + auto f = std::to_integer<float>(b1); } diff --git a/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp index 4f34363447f..065e6d1278a 100644 --- a/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp @@ -18,14 +18,14 @@ // is_integral_v<IntegerType> is true. int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b3{static_cast<std::byte>(3)}; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b3{static_cast<std::byte>(3)}; - static_assert(noexcept(std::to_integer<int>(b1)), "" ); - static_assert(std::is_same<int, decltype(std::to_integer<int>(b1))>::value, "" ); - static_assert(std::is_same<long, decltype(std::to_integer<long>(b1))>::value, "" ); - static_assert(std::is_same<unsigned short, decltype(std::to_integer<unsigned short>(b1))>::value, "" ); + static_assert(noexcept(std::to_integer<int>(b1)), "" ); + static_assert(std::is_same<int, decltype(std::to_integer<int>(b1))>::value, "" ); + static_assert(std::is_same<long, decltype(std::to_integer<long>(b1))>::value, "" ); + static_assert(std::is_same<unsigned short, decltype(std::to_integer<unsigned short>(b1))>::value, "" ); - static_assert(std::to_integer<int>(b1) == 1, ""); - static_assert(std::to_integer<int>(b3) == 3, ""); + static_assert(std::to_integer<int>(b1) == 1, ""); + static_assert(std::to_integer<int>(b3) == 3, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp index 6a526da3d71..07727ec9eb1 100644 --- a/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp @@ -16,24 +16,24 @@ constexpr std::byte test(std::byte b1, std::byte b2) { - std::byte bret = b1; - return bret ^= b2; - } + std::byte bret = b1; + return bret ^= b2; + } int main () { - std::byte b; // not constexpr, just used in noexcept check - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; - constexpr std::byte b9{static_cast<std::byte>(9)}; + std::byte b; // not constexpr, just used in noexcept check + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; + constexpr std::byte b9{static_cast<std::byte>(9)}; - static_assert(noexcept(b ^= b), "" ); + static_assert(noexcept(b ^= b), "" ); - static_assert(std::to_integer<int>(test(b1, b8)) == 9, ""); - static_assert(std::to_integer<int>(test(b1, b9)) == 8, ""); - static_assert(std::to_integer<int>(test(b8, b9)) == 1, ""); + static_assert(std::to_integer<int>(test(b1, b8)) == 9, ""); + static_assert(std::to_integer<int>(test(b1, b9)) == 8, ""); + static_assert(std::to_integer<int>(test(b8, b9)) == 1, ""); - static_assert(std::to_integer<int>(test(b8, b1)) == 9, ""); - static_assert(std::to_integer<int>(test(b9, b1)) == 8, ""); - static_assert(std::to_integer<int>(test(b9, b8)) == 1, ""); + static_assert(std::to_integer<int>(test(b8, b1)) == 9, ""); + static_assert(std::to_integer<int>(test(b9, b1)) == 8, ""); + static_assert(std::to_integer<int>(test(b9, b8)) == 1, ""); } diff --git a/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp b/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp index e8c3b987578..d7e18c91b04 100644 --- a/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp @@ -15,17 +15,17 @@ // constexpr byte operator^(byte l, byte r) noexcept; int main () { - constexpr std::byte b1{static_cast<std::byte>(1)}; - constexpr std::byte b8{static_cast<std::byte>(8)}; - constexpr std::byte b9{static_cast<std::byte>(9)}; + constexpr std::byte b1{static_cast<std::byte>(1)}; + constexpr std::byte b8{static_cast<std::byte>(8)}; + constexpr std::byte b9{static_cast<std::byte>(9)}; - static_assert(noexcept(b1 ^ b8), "" ); + static_assert(noexcept(b1 ^ b8), "" ); - static_assert(std::to_integer<int>(b1 ^ b8) == 9, ""); - static_assert(std::to_integer<int>(b1 ^ b9) == 8, ""); - static_assert(std::to_integer<int>(b8 ^ b9) == 1, ""); + static_assert(std::to_integer<int>(b1 ^ b8) == 9, ""); + static_assert(std::to_integer<int>(b1 ^ b9) == 8, ""); + static_assert(std::to_integer<int>(b8 ^ b9) == 1, ""); - static_assert(std::to_integer<int>(b8 ^ b1) == 9, ""); - static_assert(std::to_integer<int>(b9 ^ b1) == 8, ""); - static_assert(std::to_integer<int>(b9 ^ b8) == 1, ""); + static_assert(std::to_integer<int>(b8 ^ b1) == 9, ""); + static_assert(std::to_integer<int>(b9 ^ b1) == 8, ""); + static_assert(std::to_integer<int>(b9 ^ b8) == 1, ""); } diff --git a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp index 6bd8a4f1e61..1ca454330a5 100644 --- a/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/numeric.ops.lcm/lcm.pass.cpp @@ -137,7 +137,7 @@ int main() // LWG#2837 { auto res1 = std::lcm(static_cast<std::int64_t>(1234), INT32_MIN); - (void)std::lcm(INT_MIN, 2UL); // this used to trigger UBSAN + (void)std::lcm(INT_MIN, 2UL); // this used to trigger UBSAN static_assert(std::is_same_v<decltype(res1), std::int64_t>, ""); assert(res1 == 1324997410816LL); } diff --git a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp index e3e2ffe7be0..cff1b8c0ab4 100644 --- a/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp @@ -65,10 +65,10 @@ int main() test<random_access_iterator<const int*> >(); test<const int*>(); -// Make sure the math is done using the correct type +// Make sure the math is done using the correct type { auto v = {1, 2, 3, 4, 5, 6, 7, 8}; unsigned res = std::reduce(v.begin(), v.end(), 1U, std::multiplies<>()); - assert(res == 40320); // 8! will not fit into a char + assert(res == 40320); // 8! will not fit into a char } } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp index a6f5a513db5..62fba023eb6 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp @@ -90,8 +90,8 @@ void basic_tests() std::vector<int> v(10); std::fill(v.begin(), v.end(), 3); std::transform_inclusive_scan(v.begin(), v.end(), v.begin(), std::plus<>(), identity<>()); - std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout, " ")); - std::cout << std::endl; + std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout, " ")); + std::cout << std::endl; for (size_t i = 0; i < v.size(); ++i) assert(v[i] == (int)(i+1) * 3); } diff --git a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp index b05792ddeb5..55c897d5101 100644 --- a/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp +++ b/libcxx/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp @@ -41,7 +41,7 @@ struct identity<void> template <class _Tp = void> struct twice { - constexpr const _Tp operator()(const _Tp& __x) const noexcept { return 2 * __x; } + constexpr const _Tp operator()(const _Tp& __x) const noexcept { return 2 * __x; } }; template <> @@ -115,10 +115,10 @@ int main() test<const int*>(); test< int*>(); -// Make sure the math is done using the correct type +// Make sure the math is done using the correct type { auto v = {1, 2, 3, 4, 5, 6}; unsigned res = std::transform_reduce(v.begin(), v.end(), 1U, std::multiplies<>(), twice<>()); - assert(res == 46080); // 6! * 64 will not fit into a char + assert(res == 46080); // 6! * 64 will not fit into a char } } diff --git a/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp index 81537ba52bb..9e3fb072260 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp @@ -24,9 +24,9 @@ test() { { #if TEST_STD_VER > 14 - static_assert((noexcept(S{})), "" ); + static_assert((noexcept(S{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" ); + static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" ); #endif S s; LIBCPP_ASSERT(s.__invariants()); @@ -37,9 +37,9 @@ test() } { #if TEST_STD_VER > 14 - static_assert((noexcept(S{typename S::allocator_type{}})), "" ); + static_assert((noexcept(S{typename S::allocator_type{}})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" ); + static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" ); #endif S s(typename S::allocator_type(5)); LIBCPP_ASSERT(s.__invariants()); @@ -58,9 +58,9 @@ test2() { { #if TEST_STD_VER > 14 - static_assert((noexcept(S{})), "" ); + static_assert((noexcept(S{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" ); + static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" ); #endif S s; LIBCPP_ASSERT(s.__invariants()); @@ -71,9 +71,9 @@ test2() } { #if TEST_STD_VER > 14 - static_assert((noexcept(S{typename S::allocator_type{}})), "" ); + static_assert((noexcept(S{typename S::allocator_type{}})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" ); + static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" ); #endif S s(typename S::allocator_type{}); LIBCPP_ASSERT(s.__invariants()); diff --git a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp index 982bb43289d..edd5c6e32d5 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp @@ -69,9 +69,9 @@ bool operator!=(const poca_alloc<T>& lhs, const poca_alloc<U>& rhs) template <class S> void test_assign(S &s1, const S& s2) { - try { s1 = s2; } - catch ( std::bad_alloc &) { return; } - assert(false); + try { s1 = s2; } + catch ( std::bad_alloc &) { return; } + assert(false); } #endif @@ -110,21 +110,21 @@ int main() { typedef poca_alloc<char> A; typedef std::basic_string<char, std::char_traits<char>, A> S; - const char * p1 = "This is my first string"; - const char * p2 = "This is my second string"; + const char * p1 = "This is my first string"; + const char * p2 = "This is my second string"; alloc_imp<char> imp1; alloc_imp<char> imp2; - S s1(p1, A(&imp1)); - S s2(p2, A(&imp2)); + S s1(p1, A(&imp1)); + S s2(p2, A(&imp2)); - assert(s1 == p1); - assert(s2 == p2); + assert(s1 == p1); + assert(s2 == p2); - imp2.deactivate(); - test_assign(s1, s2); - assert(s1 == p1); - assert(s2 == p2); + imp2.deactivate(); + test_assign(s1, s2); + assert(s1 == p1); + assert(s2 == p2); } #endif #endif diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp index d4866921af7..bb7bdcd1434 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp @@ -41,9 +41,9 @@ int main() typedef test_allocator<char> A; typedef std::basic_string<char, std::char_traits<char>, A> S; #if TEST_STD_VER > 14 - static_assert((noexcept(S{})), "" ); + static_assert((noexcept(S{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S()) == std::is_nothrow_move_constructible<A>::value), "" ); + static_assert((noexcept(S()) == std::is_nothrow_move_constructible<A>::value), "" ); #endif test(S(), A(3)); test(S("1"), A(5)); @@ -55,9 +55,9 @@ int main() typedef test_allocator<char> A; typedef std::basic_string<char, std::char_traits<char>, A> S; #if TEST_STD_VER > 14 - static_assert((noexcept(S{})), "" ); + static_assert((noexcept(S{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S()) == std::is_nothrow_move_constructible<A>::value), "" ); + static_assert((noexcept(S()) == std::is_nothrow_move_constructible<A>::value), "" ); #endif S s1 ( "Twas brillig, and the slivy toves did gyre and gymbal in the wabe" ); S s2 (std::move(s1), A(1)); @@ -67,9 +67,9 @@ int main() typedef min_allocator<char> A; typedef std::basic_string<char, std::char_traits<char>, A> S; #if TEST_STD_VER > 14 - static_assert((noexcept(S{})), "" ); + static_assert((noexcept(S{})), "" ); #elif TEST_STD_VER >= 11 - static_assert((noexcept(S()) == std::is_nothrow_move_constructible<A>::value), "" ); + static_assert((noexcept(S()) == std::is_nothrow_move_constructible<A>::value), "" ); #endif test(S(), A()); test(S("1"), A()); diff --git a/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp index 136a60fe627..0720543420a 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp @@ -16,7 +16,7 @@ // allocator_traits<allocator_type>::propagate_on_container_move_assignment::value || // allocator_traits<allocator_type>::is_always_equal::value); // C++17 // -// before C++17, we use the conforming extension +// before C++17, we use the conforming extension // noexcept( // allocator_type::propagate_on_container_move_assignment::value && // is_nothrow_move_assignable<allocator_type>::value); @@ -81,12 +81,12 @@ int main() } #if TEST_STD_VER > 14 { - // POCMA is false, always equal + // POCMA is false, always equal typedef std::basic_string<char, std::char_traits<char>, some_alloc2<char>> C; static_assert( std::is_nothrow_move_assignable<C>::value, ""); } { - // POCMA is false, not always equal + // POCMA is false, not always equal typedef std::basic_string<char, std::char_traits<char>, some_alloc3<char>> C; static_assert(!std::is_nothrow_move_assignable<C>::value, ""); } diff --git a/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp index 70459b2dcfb..3d3bf4178fd 100644 --- a/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp +++ b/libcxx/test/std/strings/basic.string/string.cons/string_view.fail.cpp @@ -18,6 +18,6 @@ void foo ( const string &s ) {} int main() { - std::string_view sv = "ABCDE"; - foo(sv); // requires implicit conversion from string_view to string + std::string_view sv = "ABCDE"; + foo(sv); // requires implicit conversion from string_view to string } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp index b464291d4c5..7ed55403927 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp @@ -32,11 +32,11 @@ template <class S, class It> void test_exceptions(S s, It first, It last) { - S aCopy = s; + S aCopy = s; try { - s.append(first, last); - assert(false); - } + s.append(first, last); + assert(false); + } catch (...) {} LIBCPP_ASSERT(s.__invariants()); assert(s == aCopy); @@ -164,7 +164,7 @@ int main() } #endif #ifndef TEST_HAS_NO_EXCEPTIONS - { // test iterator operations that throw + { // test iterator operations that throw typedef std::string S; typedef ThrowingIterator<char> TIter; typedef input_iterator<TIter> IIter; @@ -176,33 +176,33 @@ int main() test_exceptions(S(), TIter(s, s+10, 4, TIter::TAIncrement), TIter()); test_exceptions(S(), TIter(s, s+10, 5, TIter::TADereference), TIter()); test_exceptions(S(), TIter(s, s+10, 6, TIter::TAComparison), TIter()); - } + } #endif - { // test appending to self + { // test appending to self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - - s_short.append(s_short.begin(), s_short.end()); - assert(s_short == "123/123/"); - s_short.append(s_short.begin(), s_short.end()); - assert(s_short == "123/123/123/123/"); - s_short.append(s_short.begin(), s_short.end()); - assert(s_short == "123/123/123/123/123/123/123/123/"); - - s_long.append(s_long.begin(), s_long.end()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + + s_short.append(s_short.begin(), s_short.end()); + assert(s_short == "123/123/"); + s_short.append(s_short.begin(), s_short.end()); + assert(s_short == "123/123/123/123/"); + s_short.append(s_short.begin(), s_short.end()); + assert(s_short == "123/123/123/123/123/123/123/123/"); + + s_long.append(s_long.begin(), s_long.end()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } - { // test appending a different type + { // test appending a different type typedef std::string S; - const uint8_t p[] = "ABCD"; + const uint8_t p[] = "ABCD"; - S s; - s.append(p, p + 4); - assert(s == "ABCD"); - } + S s; + s.append(p, p + 4); + assert(s == "ABCD"); + } { // test with a move iterator that returns char&& typedef forward_iterator<const char*> It; diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp index eb552ca8392..823905df4a1 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp @@ -62,19 +62,19 @@ int main() } #endif - { // test appending to self + { // test appending to self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.append(s_short.c_str()); - assert(s_short == "123/123/"); - s_short.append(s_short.c_str()); - assert(s_short == "123/123/123/123/"); - s_short.append(s_short.c_str()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.append(s_short.c_str()); + assert(s_short == "123/123/"); + s_short.append(s_short.c_str()); + assert(s_short == "123/123/123/123/"); + s_short.append(s_short.c_str()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.append(s_long.c_str()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.append(s_long.c_str()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp index fc80d7cccce..f09ec682e9f 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp @@ -71,19 +71,19 @@ int main() } #endif - { // test appending to self + { // test appending to self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.append(s_short.data(), s_short.size()); - assert(s_short == "123/123/"); - s_short.append(s_short.data(), s_short.size()); - assert(s_short == "123/123/123/123/"); - s_short.append(s_short.data(), s_short.size()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.append(s_short.data(), s_short.size()); + assert(s_short == "123/123/"); + s_short.append(s_short.data(), s_short.size()); + assert(s_short == "123/123/123/123/"); + s_short.append(s_short.data(), s_short.size()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.append(s_long.data(), s_long.size()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.append(s_long.data(), s_long.size()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp index e5312e6db6c..cb83f25d711 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp @@ -33,10 +33,10 @@ template <class S, class It> void test_exceptions(S s, It first, It last) { - S aCopy = s; + S aCopy = s; try { - s.assign(first, last); - assert(false); + s.assign(first, last); + assert(false); } catch (...) {} LIBCPP_ASSERT(s.__invariants()); @@ -165,7 +165,7 @@ int main() } #endif #ifndef TEST_HAS_NO_EXCEPTIONS - { // test iterator operations that throw + { // test iterator operations that throw typedef std::string S; typedef ThrowingIterator<char> TIter; typedef input_iterator<TIter> IIter; @@ -177,32 +177,32 @@ int main() test_exceptions(S(), TIter(s, s+10, 4, TIter::TAIncrement), TIter()); test_exceptions(S(), TIter(s, s+10, 5, TIter::TADereference), TIter()); test_exceptions(S(), TIter(s, s+10, 6, TIter::TAComparison), TIter()); - } + } #endif - { // test assigning to self + { // test assigning to self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.assign(s_short.begin(), s_short.end()); - assert(s_short == "123/"); - s_short.assign(s_short.begin() + 2, s_short.end()); - assert(s_short == "3/"); + s_short.assign(s_short.begin(), s_short.end()); + assert(s_short == "123/"); + s_short.assign(s_short.begin() + 2, s_short.end()); + assert(s_short == "3/"); - s_long.assign(s_long.begin(), s_long.end()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/"); + s_long.assign(s_long.begin(), s_long.end()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/"); - s_long.assign(s_long.begin() + 30, s_long.end()); - assert(s_long == "nsectetur/"); - } + s_long.assign(s_long.begin() + 30, s_long.end()); + assert(s_long == "nsectetur/"); + } - { // test assigning a different type + { // test assigning a different type typedef std::string S; - const uint8_t p[] = "ABCD"; + const uint8_t p[] = "ABCD"; - S s; - s.assign(p, p + 4); - assert(s == "ABCD"); - } + S s; + s.assign(p, p + 4); + assert(s == "ABCD"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp index b0876b388d8..b592455a350 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp @@ -62,17 +62,17 @@ int main() } #endif - { // test assignment to self + { // test assignment to self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.assign(s_short.c_str()); - assert(s_short == "123/"); - s_short.assign(s_short.c_str() + 2); - assert(s_short == "3/"); + s_short.assign(s_short.c_str()); + assert(s_short == "123/"); + s_short.assign(s_short.c_str() + 2); + assert(s_short == "3/"); - s_long.assign(s_long.c_str() + 30); - assert(s_long == "nsectetur/"); - } + s_long.assign(s_long.c_str() + 30); + assert(s_long == "nsectetur/"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp index 97a9990f518..70b00619a91 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp @@ -70,20 +70,20 @@ int main() S("12345678901234567890")); } #endif - { // test assign to self + { // test assign to self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.assign(s_short.data(), s_short.size()); - assert(s_short == "123/"); - s_short.assign(s_short.data() + 2, s_short.size() - 2); - assert(s_short == "3/"); + s_short.assign(s_short.data(), s_short.size()); + assert(s_short == "123/"); + s_short.assign(s_short.data() + 2, s_short.size() - 2); + assert(s_short == "3/"); - s_long.assign(s_long.data(), s_long.size()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/"); + s_long.assign(s_long.data(), s_long.size()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/"); - s_long.assign(s_long.data() + 2, 8 ); - assert(s_long == "rem ipsu"); - } + s_long.assign(s_long.data() + 2, 8 ); + assert(s_long == "rem ipsu"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp index 2c8b6e4a188..cb4b40f9e8c 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp @@ -39,7 +39,7 @@ void test_exceptions(S s, typename S::difference_type pos, It first, It last) { typename S::const_iterator p = s.cbegin() + pos; - S aCopy = s; + S aCopy = s; try { s.insert(p, first, last); assert(false); @@ -145,7 +145,7 @@ int main() } #endif #ifndef TEST_HAS_NO_EXCEPTIONS - { // test iterator operations that throw + { // test iterator operations that throw typedef std::string S; typedef ThrowingIterator<char> TIter; typedef input_iterator<TIter> IIter; @@ -157,7 +157,7 @@ int main() test_exceptions(S(), 0, TIter(s, s+10, 4, TIter::TAIncrement), TIter()); test_exceptions(S(), 0, TIter(s, s+10, 5, TIter::TADereference), TIter()); test_exceptions(S(), 0, TIter(s, s+10, 6, TIter::TAComparison), TIter()); - } + } #endif #if _LIBCPP_DEBUG >= 1 { @@ -170,30 +170,30 @@ int main() } #endif - { // test inserting into self + { // test inserting into self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - - s_short.insert(s_short.begin(), s_short.begin(), s_short.end()); - assert(s_short == "123/123/"); - s_short.insert(s_short.begin(), s_short.begin(), s_short.end()); - assert(s_short == "123/123/123/123/"); - s_short.insert(s_short.begin(), s_short.begin(), s_short.end()); - assert(s_short == "123/123/123/123/123/123/123/123/"); - - s_long.insert(s_long.begin(), s_long.begin(), s_long.end()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + + s_short.insert(s_short.begin(), s_short.begin(), s_short.end()); + assert(s_short == "123/123/"); + s_short.insert(s_short.begin(), s_short.begin(), s_short.end()); + assert(s_short == "123/123/123/123/"); + s_short.insert(s_short.begin(), s_short.begin(), s_short.end()); + assert(s_short == "123/123/123/123/123/123/123/123/"); + + s_long.insert(s_long.begin(), s_long.begin(), s_long.end()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } - { // test assigning a different type + { // test assigning a different type typedef std::string S; const uint8_t p[] = "ABCD"; S s; s.insert(s.begin(), p, p + 4); assert(s == "ABCD"); - } + } { // test with a move iterator that returns char&& typedef input_iterator<const char*> It; diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp index e49f57a7f9a..b4505a4c1f3 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp @@ -219,19 +219,19 @@ int main() } #endif - { // test inserting into self + { // test inserting into self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.insert(0, s_short.c_str()); - assert(s_short == "123/123/"); - s_short.insert(0, s_short.c_str()); - assert(s_short == "123/123/123/123/"); - s_short.insert(0, s_short.c_str()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.insert(0, s_short.c_str()); + assert(s_short == "123/123/"); + s_short.insert(0, s_short.c_str()); + assert(s_short == "123/123/123/123/"); + s_short.insert(0, s_short.c_str()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.insert(0, s_long.c_str()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.insert(0, s_long.c_str()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp index a42a60ddcdb..ee5991c1596 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp @@ -700,19 +700,19 @@ int main() } #endif - { // test inserting into self + { // test inserting into self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.insert(0, s_short.data(), s_short.size()); - assert(s_short == "123/123/"); - s_short.insert(0, s_short.data(), s_short.size()); - assert(s_short == "123/123/123/123/"); - s_short.insert(0, s_short.data(), s_short.size()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.insert(0, s_short.data(), s_short.size()); + assert(s_short == "123/123/"); + s_short.insert(0, s_short.data(), s_short.size()); + assert(s_short == "123/123/123/123/"); + s_short.insert(0, s_short.data(), s_short.size()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.insert(0, s_long.data(), s_long.size()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.insert(0, s_long.data(), s_long.size()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp index e456d395220..f8126bcaf7d 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp @@ -42,12 +42,12 @@ test_exceptions(S s, typename S::size_type pos1, typename S::size_type n1, It f, { typename S::const_iterator first = s.begin() + pos1; typename S::const_iterator last = s.begin() + pos1 + n1; - S aCopy = s; - try { - s.replace(first, last, f, l); - assert(false); - } - catch (...) {} + S aCopy = s; + try { + s.replace(first, last, f, l); + assert(false); + } + catch (...) {} LIBCPP_ASSERT(s.__invariants()); assert(s == aCopy); } @@ -993,7 +993,7 @@ int main() } #endif #ifndef TEST_HAS_NO_EXCEPTIONS - { // test iterator operations that throw + { // test iterator operations that throw typedef std::string S; typedef ThrowingIterator<char> TIter; typedef input_iterator<TIter> IIter; @@ -1005,36 +1005,36 @@ int main() test_exceptions(S("abcdefghijklmnopqrst"), 10, 5, TIter(s, s+10, 4, TIter::TAIncrement), TIter()); test_exceptions(S("abcdefghijklmnopqrst"), 10, 5, TIter(s, s+10, 5, TIter::TADereference), TIter()); test_exceptions(S("abcdefghijklmnopqrst"), 10, 5, TIter(s, s+10, 6, TIter::TAComparison), TIter()); - } + } #endif - { // test replacing into self + { // test replacing into self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.replace(s_short.begin(), s_short.begin(), s_short.begin(), s_short.end()); - assert(s_short == "123/123/"); - s_short.replace(s_short.begin(), s_short.begin(), s_short.begin(), s_short.end()); - assert(s_short == "123/123/123/123/"); - s_short.replace(s_short.begin(), s_short.begin(), s_short.begin(), s_short.end()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.begin(), s_short.end()); + assert(s_short == "123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.begin(), s_short.end()); + assert(s_short == "123/123/123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.begin(), s_short.end()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.replace(s_long.begin(), s_long.begin(), s_long.begin(), s_long.end()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.replace(s_long.begin(), s_long.begin(), s_long.begin(), s_long.end()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } - { // test assigning a different type + { // test assigning a different type typedef std::string S; - const uint8_t pc[] = "ABCD"; - uint8_t p[] = "EFGH"; + const uint8_t pc[] = "ABCD"; + uint8_t p[] = "EFGH"; - S s; - s.replace(s.begin(), s.end(), pc, pc + 4); - assert(s == "ABCD"); + S s; + s.replace(s.begin(), s.end(), pc, pc + 4); + assert(s == "ABCD"); - s.clear(); - s.replace(s.begin(), s.end(), p, p + 4); - assert(s == "EFGH"); - } + s.clear(); + s.replace(s.begin(), s.end(), p, p + 4); + assert(s == "EFGH"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp index f642d3a4f92..a7d6a6e3ce3 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp @@ -283,19 +283,19 @@ int main() } #endif - { // test replacing into self + { // test replacing into self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.replace(s_short.begin(), s_short.begin(), s_short.c_str()); - assert(s_short == "123/123/"); - s_short.replace(s_short.begin(), s_short.begin(), s_short.c_str()); - assert(s_short == "123/123/123/123/"); - s_short.replace(s_short.begin(), s_short.begin(), s_short.c_str()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.c_str()); + assert(s_short == "123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.c_str()); + assert(s_short == "123/123/123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.c_str()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.replace(s_long.begin(), s_long.begin(), s_long.c_str()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.replace(s_long.begin(), s_long.begin(), s_long.c_str()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } } diff --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp index 69503680722..6c68b156641 100644 --- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp @@ -973,19 +973,19 @@ int main() } #endif - { // test replacing into self + { // test replacing into self typedef std::string S; - S s_short = "123/"; - S s_long = "Lorem ipsum dolor sit amet, consectetur/"; + S s_short = "123/"; + S s_long = "Lorem ipsum dolor sit amet, consectetur/"; - s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); - assert(s_short == "123/123/"); - s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); - assert(s_short == "123/123/123/123/"); - s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); - assert(s_short == "123/123/123/123/123/123/123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); + assert(s_short == "123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); + assert(s_short == "123/123/123/123/"); + s_short.replace(s_short.begin(), s_short.begin(), s_short.data(), s_short.size()); + assert(s_short == "123/123/123/123/123/123/123/123/"); - s_long.replace(s_long.begin(), s_long.begin(), s_long.data(), s_long.size()); - assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); - } + s_long.replace(s_long.begin(), s_long.begin(), s_long.data(), s_long.size()); + assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/"); + } } diff --git a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp index 9b552347fe9..4cf2b0adce0 100644 --- a/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp +++ b/libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/lt.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// The LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. @@ -18,16 +18,16 @@ int main() { - assert( std::char_traits<char>::lt('\0', 'A')); - assert(!std::char_traits<char>::lt('A', '\0')); + assert( std::char_traits<char>::lt('\0', 'A')); + assert(!std::char_traits<char>::lt('A', '\0')); - assert(!std::char_traits<char>::lt('a', 'a')); - assert( std::char_traits<char>::lt('A', 'a')); - assert(!std::char_traits<char>::lt('a', 'A')); + assert(!std::char_traits<char>::lt('a', 'a')); + assert( std::char_traits<char>::lt('A', 'a')); + assert(!std::char_traits<char>::lt('a', 'A')); - assert( std::char_traits<char>::lt('a', 'z')); - assert( std::char_traits<char>::lt('A', 'Z')); + assert( std::char_traits<char>::lt('a', 'z')); + assert( std::char_traits<char>::lt('A', 'Z')); - assert( std::char_traits<char>::lt(' ', 'A')); - assert( std::char_traits<char>::lt('A', '~')); + assert( std::char_traits<char>::lt(' ', 'A')); + assert( std::char_traits<char>::lt('A', '~')); } diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp index bd707bb90ce..ee36e84c0a5 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/move_assign.pass.cpp @@ -25,8 +25,8 @@ int main() { { typedef std::shared_timed_mutex M; - M m0; - M m1; + M m0; + M m1; std::shared_lock<M> lk0(m0); std::shared_lock<M> lk1(m1); lk1 = std::move(lk0); @@ -37,8 +37,8 @@ int main() } { typedef nasty_mutex M; - M m0; - M m1; + M m0; + M m1; std::shared_lock<M> lk0(m0); std::shared_lock<M> lk1(m1); lk1 = std::move(lk0); diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp index 8d864ea8e7d..4ecd6c0415c 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/copy_assign.fail.cpp @@ -20,8 +20,8 @@ int main() { { typedef std::mutex M; - M m0; - M m1; + M m0; + M m1; std::unique_lock<M> lk0(m0); std::unique_lock<M> lk1(m1); lk1 = lk0; diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp index 6f17383298f..2d5feabf8d2 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/move_assign.pass.cpp @@ -23,8 +23,8 @@ int main() { { typedef std::mutex M; - M m0; - M m1; + M m0; + M m1; std::unique_lock<M> lk0(m0); std::unique_lock<M> lk1(m1); lk1 = std::move(lk0); @@ -35,8 +35,8 @@ int main() } { typedef nasty_mutex M; - M m0; - M m1; + M m0; + M m1; std::unique_lock<M> lk0(m0); std::unique_lock<M> lk1(m1); lk1 = std::move(lk0); diff --git a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp index ca8bc698225..dcfdfd11a7e 100644 --- a/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp @@ -54,7 +54,7 @@ int main() t.join(); #ifdef __cpp_deduction_guides - std::unique_lock ul(m); + std::unique_lock ul(m); static_assert((std::is_same<decltype(ul), std::unique_lock<decltype(m)>>::value), "" ); #endif } diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp index f8a9ea0f9ec..44e8709a8e3 100644 --- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp +++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/is_always_equal.pass.cpp @@ -26,12 +26,12 @@ int main() { // sanity checks static_assert( (std::is_same< - std::allocator_traits<A1<int>>::is_always_equal, std::false_type>::value - ), "" ); + std::allocator_traits<A1<int>>::is_always_equal, std::false_type>::value + ), "" ); static_assert( (std::is_same< - std::allocator_traits<min_allocator<int>>::is_always_equal, std::true_type>::value - ), "" ); + std::allocator_traits<min_allocator<int>>::is_always_equal, std::true_type>::value + ), "" ); // wrapping one allocator static_assert( diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp index 24f7fceb877..b2315346516 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.fail.cpp @@ -25,5 +25,5 @@ void foo(int) {} int main() { - std::function<void(int)> f(std::allocator_arg, std::allocator<int>(), foo); + std::function<void(int)> f(std::allocator_arg, std::allocator<int>(), foo); } diff --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp index 9967457ff82..2e4633b1169 100644 --- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp +++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.fail.cpp @@ -24,7 +24,7 @@ int main() { - typedef std::function<void(int)> F; - F f1; - F f2(std::allocator_arg, std::allocator<int>(), f1); + typedef std::function<void(int)> F; + F f1; + F f2(std::allocator_arg, std::allocator<int>(), f1); } diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp index 31a0f171d33..7f7b155c35c 100644 --- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp +++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/is_always_equal.pass.cpp @@ -37,7 +37,7 @@ template <class T> struct C { typedef T value_type; - int not_empty_; // some random member variable + int not_empty_; // some random member variable }; int main() diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp index 81f49eaac39..3ff32df1133 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.addressof/addressof.temp.fail.cpp @@ -19,7 +19,7 @@ int main() { #if TEST_STD_VER > 14 - const int *p = std::addressof<const int>(0); + const int *p = std::addressof<const int>(0); #else #error #endif diff --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp index 1829dff354d..2f387a4cef9 100644 --- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp +++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/uninitialized_copy.pass.cpp @@ -71,7 +71,7 @@ int main() std::uninitialized_copy(b, b+2, bp); for (int i = 0; i < 2; ++i) assert(bp[i].data_ == 1); - assert(B::population_ == N + 2); + assert(B::population_ == N + 2); } { diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp index 26a7d3a94d9..67de14c5b7d 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp @@ -41,7 +41,7 @@ void nullDeleter(void*) {} struct Foo : virtual public std::enable_shared_from_this<Foo> { - virtual ~Foo() {} + virtual ~Foo() {} }; struct Bar : public Foo { diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp index 501844a1d6c..117dd979fdd 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp @@ -74,14 +74,14 @@ int main() assert(!cs(p2, p1)); assert(cs(p1 ,p3) || cs(p3, p1)); assert(cs(p3, p1) == cs(p3, p2)); - ASSERT_NOEXCEPT(cs(p1, p1)); + ASSERT_NOEXCEPT(cs(p1, p1)); assert(!cs(p1, w2)); assert(!cs(p2, w1)); assert(cs(p1, w3) || cs(p3, w1)); assert(cs(p3, w1) == cs(p3, w2)); - ASSERT_NOEXCEPT(cs(p1, w1)); - ASSERT_NOEXCEPT(cs(w1, p1)); + ASSERT_NOEXCEPT(cs(p1, w1)); + ASSERT_NOEXCEPT(cs(w1, p1)); } { typedef std::owner_less<std::weak_ptr<int> > CS; @@ -95,14 +95,14 @@ int main() assert(!cs(w2, w1)); assert(cs(w1, w3) || cs(w3, w1)); assert(cs(w3, w1) == cs(w3, w2)); - ASSERT_NOEXCEPT(cs(w1, w1)); + ASSERT_NOEXCEPT(cs(w1, w1)); assert(!cs(w1, p2)); assert(!cs(w2, p1)); assert(cs(w1, p3) || cs(w3, p1)); assert(cs(w3, p1) == cs(w3, p2)); - ASSERT_NOEXCEPT(cs(w1, p1)); - ASSERT_NOEXCEPT(cs(p1, w1)); + ASSERT_NOEXCEPT(cs(w1, p1)); + ASSERT_NOEXCEPT(cs(p1, w1)); } #if TEST_STD_VER > 14 { @@ -117,10 +117,10 @@ int main() cmp(sp1, sp3); cmp(wp1, sp1); cmp(wp1, wp1); - ASSERT_NOEXCEPT(cmp(sp1, sp1)); - ASSERT_NOEXCEPT(cmp(sp1, wp1)); - ASSERT_NOEXCEPT(cmp(wp1, sp1)); - ASSERT_NOEXCEPT(cmp(wp1, wp1)); + ASSERT_NOEXCEPT(cmp(sp1, sp1)); + ASSERT_NOEXCEPT(cmp(sp1, wp1)); + ASSERT_NOEXCEPT(cmp(wp1, sp1)); + ASSERT_NOEXCEPT(cmp(wp1, wp1)); } { // test heterogeneous lookups diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp index 4f45a0340a9..c0aece771f0 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/decay.pass.cpp @@ -34,9 +34,9 @@ int main() test_decay<const int[3], const int*>(); test_decay<void(), void (*)()>(); #if TEST_STD_VER > 11 - test_decay<int(int) const, int(int) const>(); - test_decay<int(int) volatile, int(int) volatile>(); - test_decay<int(int) &, int(int) &>(); - test_decay<int(int) &&, int(int) &&>(); + test_decay<int(int) const, int(int) const>(); + test_decay<int(int) volatile, int(int) volatile>(); + test_decay<int(int) &, int(int) &>(); + test_decay<int(int) &&, int(int) &&>(); #endif } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp index 4e875fa9452..23d5176127a 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/is_function.pass.cpp @@ -77,11 +77,11 @@ typedef void (*FunctionPtr)(); int main() { - test_is_function<void(void)>(); - test_is_function<int(int)>(); - test_is_function<int(int, double)>(); - test_is_function<int(Abstract *)>(); - test_is_function<void(...)>(); + test_is_function<void(void)>(); + test_is_function<int(int)>(); + test_is_function<int(int, double)>(); + test_is_function<int(Abstract *)>(); + test_is_function<void(...)>(); test_is_not_function<std::nullptr_t>(); test_is_not_function<void>(); diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp index f776196dd7a..052b0b9851d 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_fundamental.pass.cpp @@ -91,11 +91,11 @@ int main() test_is_fundamental<unsigned char>(); test_is_fundamental<wchar_t>(); test_is_fundamental<double>(); - test_is_fundamental<float>(); - test_is_fundamental<double>(); - test_is_fundamental<long double>(); - test_is_fundamental<char16_t>(); - test_is_fundamental<char32_t>(); + test_is_fundamental<float>(); + test_is_fundamental<double>(); + test_is_fundamental<long double>(); + test_is_fundamental<char16_t>(); + test_is_fundamental<char32_t>(); test_is_not_fundamental<char[3]>(); test_is_not_fundamental<char[]>(); diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp index 3955d4bc330..8d63a23494b 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp @@ -81,5 +81,5 @@ int main() test_is_not_assignable<int(), int> (); // pointer to incomplete template type - test_is_assignable<X<D>*&, X<D>*> (); + test_is_assignable<X<D>*&, X<D>*> (); } diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp index 9d2ec5edea5..1f7c32a8cc0 100644 --- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp @@ -9,7 +9,7 @@ // type_traits // XFAIL: apple-clang-6.0 -// The Apple-6 compiler gets is_constructible<void ()> wrong. +// The Apple-6 compiler gets is_constructible<void ()> wrong. // template <class T, class... Args> // struct is_constructible; diff --git a/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp b/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp index f9ea7b47911..84f1e78ca2a 100644 --- a/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp @@ -23,5 +23,5 @@ int main() { - std::nullopt_t n = {}; + std::nullopt_t n = {}; } diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp index 3224c1bac75..77e411b2e3b 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp @@ -21,11 +21,11 @@ #include "test_macros.h" struct S { - constexpr S() : v_(0) {} - S(int v) : v_(v) {} - S(const S &rhs) : v_(rhs.v_) {} // make it not trivially copyable - int v_; - }; + constexpr S() : v_(0) {} + S(int v) : v_(v) {} + S(const S &rhs) : v_(rhs.v_) {} // make it not trivially copyable + int v_; + }; int main() diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp index fb2e139ad59..4e3991c1848 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp @@ -21,12 +21,12 @@ #include "test_macros.h" struct S { - constexpr S() : v_(0) {} - S(int v) : v_(v) {} - constexpr S(const S &rhs) : v_(rhs.v_) {} // not trivially moveable - constexpr S(const S &&rhs) : v_(rhs.v_) {} // not trivially moveable - int v_; - }; + constexpr S() : v_(0) {} + S(int v) : v_(v) {} + constexpr S(const S &rhs) : v_(rhs.v_) {} // not trivially moveable + constexpr S(const S &&rhs) : v_(rhs.v_) {} // not trivially moveable + int v_; + }; int main() diff --git a/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp b/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp index 6334e146025..c28957cfc50 100644 --- a/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp +++ b/libcxx/test/std/utilities/utility/as_const/as_const.fail.cpp @@ -18,5 +18,5 @@ struct S {int i;}; int main() { - std::as_const(S{}); + std::as_const(S{}); } diff --git a/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp b/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp index 7bb5849d0bd..268f2d1b04e 100644 --- a/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp +++ b/libcxx/test/std/utilities/utility/as_const/as_const.pass.cpp @@ -37,10 +37,10 @@ void test(T& t) int main() { - int i = 3; - double d = 4.0; - S s{2}; - test(i); - test(d); - test(s); + int i = 3; + double d = 4.0; + S s{2}; + test(i); + test(d); + test(s); } |