diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
commit | 51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch) | |
tree | 91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/containers/sequences/deque/deque.cons | |
parent | bb5e33f003797b67974a8893f7f2930fc51b8210 (diff) |
Notes
Diffstat (limited to 'test/std/containers/sequences/deque/deque.cons')
21 files changed, 29 insertions, 32 deletions
diff --git a/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp index 841bfd9f8a7f7..787c2394b38e3 100644 --- a/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/alloc.pass.cpp @@ -31,7 +31,7 @@ int main() { test<int>(std::allocator<int>()); test<NotConstructible>(test_allocator<NotConstructible>(3)); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test<int>(min_allocator<int>()); test<NotConstructible>(min_allocator<NotConstructible>{}); #endif diff --git a/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp index c760b4372444a..dea6492a515d8 100644 --- a/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/assign_initializer_list.pass.cpp @@ -28,7 +28,7 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { std::deque<int, min_allocator<int>> d; d.assign({3, 4, 5, 6}); diff --git a/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp b/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp index fa0c1203ede9b..ec73555b9c4f5 100644 --- a/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/copy.pass.cpp @@ -45,7 +45,7 @@ int main() assert(v2.get_allocator() == other_allocator<int>(-2)); } #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); diff --git a/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp index efea4948eba19..3a49a8bc0c66f 100644 --- a/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/copy_alloc.pass.cpp @@ -40,7 +40,7 @@ int main() test(std::deque<int, other_allocator<int> >(ab, an, other_allocator<int>(3)), other_allocator<int>(4)); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); diff --git a/test/std/containers/sequences/deque/deque.cons/default.pass.cpp b/test/std/containers/sequences/deque/deque.cons/default.pass.cpp index b725dade70b20..7c42d9e7786ee 100644 --- a/test/std/containers/sequences/deque/deque.cons/default.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/default.pass.cpp @@ -24,7 +24,7 @@ test() { std::deque<T, Allocator> d; assert(d.size() == 0); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 std::deque<T, Allocator> d1 = {}; assert(d1.size() == 0); #endif @@ -34,7 +34,7 @@ int main() { test<int, std::allocator<int> >(); test<NotConstructible, stack_allocator<NotConstructible, 1> >(); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test<int, min_allocator<int> >(); test<NotConstructible, min_allocator<NotConstructible> >(); #endif diff --git a/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp index c612dbc5e838f..30cca929da11f 100644 --- a/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp @@ -14,9 +14,12 @@ // This tests a conforming extension +// UNSUPPORTED: c++98, c++03 + #include <deque> #include <cassert> +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -29,14 +32,13 @@ struct some_alloc int main() { -#if __has_feature(cxx_noexcept) { typedef std::deque<MoveOnly> C; - static_assert(std::is_nothrow_default_constructible<C>::value, ""); + LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, ""); } { typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C; - static_assert(std::is_nothrow_default_constructible<C>::value, ""); + LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<C>::value, ""); } { typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C; @@ -46,5 +48,4 @@ int main() typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C; static_assert(!std::is_nothrow_default_constructible<C>::value, ""); } -#endif } diff --git a/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp index ecdc2404c855b..503e1237e9eb0 100644 --- a/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp @@ -11,14 +11,14 @@ // ~deque() // implied noexcept; +// UNSUPPORTED: c++98, c++03 + #include <deque> #include <cassert> #include "MoveOnly.h" #include "test_allocator.h" -#if __has_feature(cxx_noexcept) - template <class T> struct some_alloc { @@ -27,11 +27,8 @@ struct some_alloc ~some_alloc() noexcept(false); }; -#endif - int main() { -#if __has_feature(cxx_noexcept) { typedef std::deque<MoveOnly> C; static_assert(std::is_nothrow_destructible<C>::value, ""); @@ -48,5 +45,4 @@ int main() typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C; static_assert(!std::is_nothrow_destructible<C>::value, ""); } -#endif } diff --git a/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp index a9e0218e2e0b4..dbf27053a9f9f 100644 --- a/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/initializer_list.pass.cpp @@ -27,7 +27,7 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { std::deque<int, min_allocator<int>> d = {3, 4, 5, 6}; assert(d.size() == 4); diff --git a/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp index 36c5af60ee34d..9be3c63a6b312 100644 --- a/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/initializer_list_alloc.pass.cpp @@ -29,7 +29,7 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { std::deque<int, min_allocator<int>> d({3, 4, 5, 6}, min_allocator<int>()); assert(d.get_allocator() == min_allocator<int>()); diff --git a/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp b/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp index faadf2b1a1db8..12a7faf686dbe 100644 --- a/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp @@ -56,7 +56,7 @@ int main() test(bidirectional_iterator<const int*>(ab), bidirectional_iterator<const int*>(an)); test(random_access_iterator<const int*>(ab), random_access_iterator<const int*>(an)); test<stack_allocator<int, 4096> >(ab, an); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test<min_allocator<int> >(ab, an); #endif } diff --git a/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp index b8c3e889929d8..c8f7759a19d60 100644 --- a/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp @@ -42,7 +42,7 @@ int main() test(forward_iterator<const int*>(ab), forward_iterator<const int*>(an), test_allocator<int>(4)); test(bidirectional_iterator<const int*>(ab), bidirectional_iterator<const int*>(an), test_allocator<int>(5)); test(random_access_iterator<const int*>(ab), random_access_iterator<const int*>(an), test_allocator<int>(6)); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test(input_iterator<const int*>(ab), input_iterator<const int*>(an), min_allocator<int>()); test(forward_iterator<const int*>(ab), forward_iterator<const int*>(an), min_allocator<int>()); test(bidirectional_iterator<const int*>(ab), bidirectional_iterator<const int*>(an), min_allocator<int>()); diff --git a/test/std/containers/sequences/deque/deque.cons/move.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move.pass.cpp index 4a7aa8a058eba..68875139da1aa 100644 --- a/test/std/containers/sequences/deque/deque.cons/move.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/move.pass.cpp @@ -51,7 +51,7 @@ int main() assert(c1.size() == 0); assert(c3.get_allocator() == c1.get_allocator()); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); diff --git a/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp index 1a5db6db65009..4aa0fa6827e79 100644 --- a/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp @@ -66,7 +66,7 @@ int main() assert(c3.get_allocator() == A(3)); assert(c1.size() != 0); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); diff --git a/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp index e50cd8ed508d1..ed8f1544bc8ff 100644 --- a/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/move_assign.pass.cpp @@ -69,7 +69,7 @@ int main() assert(c1.size() == 0); assert(c3.get_allocator() == A(5)); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); diff --git a/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp index 24180b5b5bdd3..cebf76a15a4ae 100644 --- a/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp @@ -16,6 +16,8 @@ // This tests a conforming extension +// UNSUPPORTED: c++98, c++03 + #include <deque> #include <cassert> @@ -31,7 +33,6 @@ struct some_alloc int main() { -#if __has_feature(cxx_noexcept) { typedef std::deque<MoveOnly> C; static_assert(std::is_nothrow_move_assignable<C>::value, ""); @@ -48,5 +49,4 @@ int main() typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C; static_assert(!std::is_nothrow_move_assignable<C>::value, ""); } -#endif } diff --git a/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp b/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp index 0ea0431be8e2f..f53e1ba6c8074 100644 --- a/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp @@ -14,6 +14,8 @@ // This tests a conforming extension +// UNSUPPORTED: c++98, c++03 + #include <deque> #include <cassert> @@ -29,7 +31,6 @@ struct some_alloc int main() { -#if __has_feature(cxx_noexcept) { typedef std::deque<MoveOnly> C; static_assert(std::is_nothrow_move_constructible<C>::value, ""); @@ -46,5 +47,4 @@ int main() typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C; static_assert(!std::is_nothrow_move_constructible<C>::value, ""); } -#endif } diff --git a/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp b/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp index 3a6ec8370b843..6aac6b20c49ec 100644 --- a/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/op_equal.pass.cpp @@ -46,7 +46,7 @@ int main() assert(l2 == l); assert(l2.get_allocator() == other_allocator<int>(5)); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45}; int* an = ab + sizeof(ab)/sizeof(ab[0]); diff --git a/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp b/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp index 6468e4329bdad..597f642db3ce5 100644 --- a/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/op_equal_initializer_list.pass.cpp @@ -28,7 +28,7 @@ int main() assert(d[2] == 5); assert(d[3] == 6); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { std::deque<int, min_allocator<int>> d; d = {3, 4, 5, 6}; diff --git a/test/std/containers/sequences/deque/deque.cons/size.pass.cpp b/test/std/containers/sequences/deque/deque.cons/size.pass.cpp index d2e324b0e3f52..b3fccf6671c9d 100644 --- a/test/std/containers/sequences/deque/deque.cons/size.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/size.pass.cpp @@ -100,7 +100,7 @@ int main() test1<DefaultOnly, stack_allocator<DefaultOnly, 4096> >(4095); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test<DefaultOnly, min_allocator<DefaultOnly> >(4095); #endif diff --git a/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp b/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp index 859deba1e1ae2..aeda168d19d46 100644 --- a/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp @@ -45,7 +45,7 @@ int main() test<int, std::allocator<int> >(4096, 1165); test<int, std::allocator<int> >(4097, 157); test<int, stack_allocator<int, 4096> >(4095, 90); -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 test<int, min_allocator<int> >(4095, 90); #endif } diff --git a/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp b/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp index 5693be702de77..ed8a7e13baa58 100644 --- a/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp +++ b/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp @@ -47,7 +47,7 @@ int main() test(4096, 1165, a); test(4097, 157, a); } -#if __cplusplus >= 201103L +#if TEST_STD_VER >= 11 { min_allocator<int> a; test(0, 5, a); |