diff options
Diffstat (limited to 'libcxx/test')
15 files changed, 111 insertions, 111 deletions
diff --git a/libcxx/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp b/libcxx/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp index 49ec0694581..f2bf4db0de4 100644 --- a/libcxx/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp +++ b/libcxx/test/atomics/atomics.types.generic/trivially_copyable.fail.cpp @@ -54,17 +54,17 @@ #include <chrono> // for nanoseconds struct NotTriviallyCopyable { - NotTriviallyCopyable ( int i ) : i_(i) {} - NotTriviallyCopyable ( const NotTriviallyCopyable &rhs) : i_(rhs.i_) {} - int i_; - }; + NotTriviallyCopyable ( int i ) : i_(i) {} + NotTriviallyCopyable ( const NotTriviallyCopyable &rhs) : i_(rhs.i_) {} + int i_; + }; template <class T> void test ( T t ) { - std::atomic<T> t0(t); - } + std::atomic<T> t0(t); + } int main() { - test(NotTriviallyCopyable(42)); + test(NotTriviallyCopyable(42)); } diff --git a/libcxx/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp b/libcxx/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp index c5c18f0a86b..e6e9bcc172e 100644 --- a/libcxx/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp +++ b/libcxx/test/atomics/atomics.types.generic/trivially_copyable.pass.cpp @@ -56,18 +56,18 @@ #include <chrono> // for nanoseconds struct TriviallyCopyable { - TriviallyCopyable ( int i ) : i_(i) {} - int i_; - }; + TriviallyCopyable ( int i ) : i_(i) {} + int i_; + }; template <class T> void test ( T t ) { - std::atomic<T> t0(t); - } + std::atomic<T> t0(t); + } int main() { - test(TriviallyCopyable(42)); - test(std::this_thread::get_id()); - test(std::chrono::nanoseconds(2)); + test(TriviallyCopyable(42)); + test(std::this_thread::get_id()); + test(std::chrono::nanoseconds(2)); } diff --git a/libcxx/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp b/libcxx/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp index ae381e65bd2..18d4cae8cc6 100644 --- a/libcxx/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp +++ b/libcxx/test/containers/sequences/forwardlist/forwardlist.ops/remove.pass.cpp @@ -18,14 +18,14 @@ #include "min_allocator.h" struct S { - S(int i) : i_(new int(i)) {} - S(const S &rhs) : i_(new int(*rhs.i_)) {} - S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; } - ~S () { delete i_; i_ = NULL; } - bool operator == (const S &rhs) const { return *i_ == *rhs.i_; } - int get () const { return *i_; } - int *i_; - }; + S(int i) : i_(new int(i)) {} + S(const S &rhs) : i_(new int(*rhs.i_)) {} + S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; } + ~S () { delete i_; i_ = NULL; } + bool operator == (const S &rhs) const { return *i_ == *rhs.i_; } + int get () const { return *i_; } + int *i_; + }; int main() @@ -98,10 +98,10 @@ int main() c.remove(c.front()); C::const_iterator it = c.begin(); for(int *ip = std::begin(t2); ip != std::end(t2); ++ip, ++it) { - assert ( it != c.end()); + assert ( it != c.end()); assert ( *ip == it->get()); - } - assert ( it == c.end ()); + } + assert ( it == c.end ()); } #if __cplusplus >= 201103L { diff --git a/libcxx/test/containers/sequences/list/list.ops/remove.pass.cpp b/libcxx/test/containers/sequences/list/list.ops/remove.pass.cpp index 106c0527f5f..f580c94ef48 100644 --- a/libcxx/test/containers/sequences/list/list.ops/remove.pass.cpp +++ b/libcxx/test/containers/sequences/list/list.ops/remove.pass.cpp @@ -17,14 +17,14 @@ #include "min_allocator.h" struct S { - S(int i) : i_(new int(i)) {} - S(const S &rhs) : i_(new int(*rhs.i_)) {} - S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; } - ~S () { delete i_; i_ = NULL; } - bool operator == (const S &rhs) const { return *i_ == *rhs.i_; } - int get () const { return *i_; } - int *i_; - }; + S(int i) : i_(new int(i)) {} + S(const S &rhs) : i_(new int(*rhs.i_)) {} + S& operator = (const S &rhs) { *i_ = *rhs.i_; return *this; } + ~S () { delete i_; i_ = NULL; } + bool operator == (const S &rhs) const { return *i_ == *rhs.i_; } + int get () const { return *i_; } + int *i_; + }; int main() @@ -52,10 +52,10 @@ int main() c.remove(c.front()); std::list<S>::const_iterator it = c.begin(); for(int *ip = a2; ip < a2+5; ++ip, ++it) { - assert ( it != c.end()); + assert ( it != c.end()); assert ( *ip == it->get()); - } - assert ( it == c.end ()); + } + assert ( it == c.end ()); } #if __cplusplus >= 201103L { diff --git a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp b/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp index a3e869de2d9..e57ad55c907 100644 --- a/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp +++ b/libcxx/test/input.output/string.streams/istringstream/istringstream.assign/move.pass.cpp @@ -33,24 +33,24 @@ int main() ss >> i; assert(i == 456); } - { - std::istringstream s1("Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); - std::string s; - s1 >> s; + { + std::istringstream s1("Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); + std::string s; + s1 >> s; - std::istringstream s2 = std::move(s1); - s2 >> s; - assert(s == "Bbbbb"); + std::istringstream s2 = std::move(s1); + s2 >> s; + assert(s == "Bbbbb"); - std::istringstream s3; - s3 = std::move(s2); - s3 >> s; - assert(s == "Cccccccccc"); + std::istringstream s3; + s3 = std::move(s2); + s3 >> s; + assert(s == "Cccccccccc"); - s1 = std::move(s3); - s1 >> s; - assert(s == "Dddddddddddddddddd"); - } + s1 = std::move(s3); + s1 >> s; + assert(s == "Dddddddddddddddddd"); + } { std::wistringstream ss0(L" 123 456"); std::wistringstream ss; @@ -64,23 +64,23 @@ int main() ss >> i; assert(i == 456); } - { - std::wistringstream s1(L"Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); - std::wstring s; - s1 >> s; + { + std::wistringstream s1(L"Aaaaa Bbbbb Cccccccccc Dddddddddddddddddd"); + std::wstring s; + s1 >> s; - std::wistringstream s2 = std::move(s1); - s2 >> s; - assert(s == L"Bbbbb"); + std::wistringstream s2 = std::move(s1); + s2 >> s; + assert(s == L"Bbbbb"); - std::wistringstream s3; - s3 = std::move(s2); - s3 >> s; - assert(s == L"Cccccccccc"); + std::wistringstream s3; + s3 = std::move(s2); + s3 >> s; + assert(s == L"Cccccccccc"); - s1 = std::move(s3); - s1 >> s; - assert(s == L"Dddddddddddddddddd"); - } + s1 = std::move(s3); + s1 >> s; + assert(s == L"Dddddddddddddddddd"); + } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } diff --git a/libcxx/test/support/counting_predicates.hpp b/libcxx/test/support/counting_predicates.hpp index e825848fc48..aab6a978577 100644 --- a/libcxx/test/support/counting_predicates.hpp +++ b/libcxx/test/support/counting_predicates.hpp @@ -14,33 +14,33 @@ template <typename Predicate, typename Arg> struct unary_counting_predicate : public std::unary_function<Arg, bool> { public: - unary_counting_predicate(Predicate p) : p_(p), count_(0) {} - ~unary_counting_predicate() {} - - bool operator () (const Arg &a) const { ++count_; return p_(a); } - size_t count() const { return count_; } - void reset() { count_ = 0; } - + unary_counting_predicate(Predicate p) : p_(p), count_(0) {} + ~unary_counting_predicate() {} + + bool operator () (const Arg &a) const { ++count_; return p_(a); } + size_t count() const { return count_; } + void reset() { count_ = 0; } + private: - Predicate p_; - mutable size_t count_; - }; + Predicate p_; + mutable size_t count_; + }; template <typename Predicate, typename Arg1, typename Arg2=Arg1> struct binary_counting_predicate : public std::binary_function<Arg1, Arg2, bool> { public: - binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {} - ~binary_counting_predicate() {} - - bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); } - size_t count() const { return count_; } - void reset() { count_ = 0; } + binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {} + ~binary_counting_predicate() {} + + bool operator () (const Arg1 &a1, const Arg2 &a2) const { ++count_; return p_(a1, a2); } + size_t count() const { return count_; } + void reset() { count_ = 0; } private: - Predicate p_; - mutable size_t count_; - }; + Predicate p_; + mutable size_t count_; + }; #endif // __COUNTING_PREDICATES_H diff --git a/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp b/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp index 537fb90158b..dbfaa978051 100644 --- a/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp +++ b/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp @@ -103,13 +103,13 @@ struct Foo { int x; }; int main() { - test_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> (); - test_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> (); - test_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> (); + test_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> (); + test_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> (); + test_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> (); - test_void_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> (); - test_void_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> (); - test_void_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> (); + test_void_pointer<std::scoped_allocator_adaptor<std::allocator<char>>> (); + test_void_pointer<std::scoped_allocator_adaptor<std::allocator<int>>> (); + test_void_pointer<std::scoped_allocator_adaptor<std::allocator<Foo>>> (); } #else int main() {} diff --git a/libcxx/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp b/libcxx/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp index 5a95097f689..4033e676f01 100644 --- a/libcxx/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp +++ b/libcxx/test/utilities/function.objects/refwrap/refwrap.helpers/ref_2.pass.cpp @@ -35,9 +35,9 @@ int main() unary_counting_predicate<bool(*)(int), int> cp(is5); assert(!cp(6)); assert(cp.count() == 1); - assert(call_pred(cp)); + assert(call_pred(cp)); assert(cp.count() == 1); - assert(call_pred(std::ref(cp))); + assert(call_pred(std::ref(cp))); assert(cp.count() == 2); - } + } } diff --git a/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp b/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp index b894e45b8dc..5a8f7a28a04 100644 --- a/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp +++ b/libcxx/test/utilities/memory/default.allocator/allocator_pointers.pass.cpp @@ -103,13 +103,13 @@ struct Foo { int x; }; int main() { - test_pointer<std::allocator<char>> (); - test_pointer<std::allocator<int>> (); - test_pointer<std::allocator<Foo>> (); + test_pointer<std::allocator<char>> (); + test_pointer<std::allocator<int>> (); + test_pointer<std::allocator<Foo>> (); - test_void_pointer<std::allocator<char>> (); - test_void_pointer<std::allocator<int>> (); - test_void_pointer<std::allocator<Foo>> (); + test_void_pointer<std::allocator<char>> (); + test_void_pointer<std::allocator<int>> (); + test_void_pointer<std::allocator<Foo>> (); } #else int main() {} diff --git a/libcxx/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp b/libcxx/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp index 01a2f65c92a..6ea1cac789e 100644 --- a/libcxx/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp +++ b/libcxx/test/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp @@ -39,7 +39,7 @@ int main() test_alignment_of<int, 4>(); test_alignment_of<double, 8>(); #if (defined(__ppc__) && !defined(__ppc64__)) - test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool + test_alignment_of<bool, 4>(); // 32-bit PPC has four byte bool #else test_alignment_of<bool, 1>(); #endif diff --git a/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp b/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp index d619701db23..691e3536167 100644 --- a/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp +++ b/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/nullptr.pass.cpp @@ -10,7 +10,7 @@ // type_traits // nullptr_t -// is_null_pointer +// is_null_pointer #include <type_traits> diff --git a/libcxx/test/utilities/optional/optional.hash/hash.pass.cpp b/libcxx/test/utilities/optional/optional.hash/hash.pass.cpp index ca23d78c531..9e5fb55c833 100644 --- a/libcxx/test/utilities/optional/optional.hash/hash.pass.cpp +++ b/libcxx/test/utilities/optional/optional.hash/hash.pass.cpp @@ -20,7 +20,7 @@ int main() { #if _LIBCPP_STD_VER > 11 - using std::experimental::optional; + using std::experimental::optional; { typedef int T; diff --git a/libcxx/test/utilities/optional/optional.nullops/eqaul.pass.cpp b/libcxx/test/utilities/optional/optional.nullops/eqaul.pass.cpp index d137d30a9ff..54fb522d8ca 100644 --- a/libcxx/test/utilities/optional/optional.nullops/eqaul.pass.cpp +++ b/libcxx/test/utilities/optional/optional.nullops/eqaul.pass.cpp @@ -18,9 +18,9 @@ int main() { #if _LIBCPP_STD_VER > 11 - using std::experimental::optional; - using std::experimental::nullopt_t; - using std::experimental::nullopt; + using std::experimental::optional; + using std::experimental::nullopt_t; + using std::experimental::nullopt; { typedef int T; diff --git a/libcxx/test/utilities/optional/optional.nullops/less_than.pass.cpp b/libcxx/test/utilities/optional/optional.nullops/less_than.pass.cpp index 51c8e49f297..576a98aa4f3 100644 --- a/libcxx/test/utilities/optional/optional.nullops/less_than.pass.cpp +++ b/libcxx/test/utilities/optional/optional.nullops/less_than.pass.cpp @@ -18,9 +18,9 @@ int main() { #if _LIBCPP_STD_VER > 11 - using std::experimental::optional; - using std::experimental::nullopt_t; - using std::experimental::nullopt; + using std::experimental::optional; + using std::experimental::nullopt_t; + using std::experimental::nullopt; { typedef int T; diff --git a/libcxx/test/utilities/optional/optional.object/optional_const_void.fail.cpp b/libcxx/test/utilities/optional/optional.object/optional_const_void.fail.cpp index ccbcf2e502a..6999cf2451f 100644 --- a/libcxx/test/utilities/optional/optional.object/optional_const_void.fail.cpp +++ b/libcxx/test/utilities/optional/optional.object/optional_const_void.fail.cpp @@ -16,7 +16,7 @@ int main() { #if _LIBCPP_STD_VER > 11 - using std::experimental::optional; + using std::experimental::optional; optional<const void> opt; #else |

