diff options
Diffstat (limited to 'test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp')
-rw-r--r-- | test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp index d274bc030881..c6a83cc61bdc 100644 --- a/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp +++ b/test/libcxx/experimental/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03, c++11 // dynarray.cons // template <class Alloc> @@ -20,10 +21,8 @@ // ~dynarray(); - -#include <__config> -#if _LIBCPP_STD_VER > 11 +#include <__config> #include <experimental/dynarray> #include <cassert> @@ -44,7 +43,7 @@ void check_allocator ( const dynarray<T> &dyn, const Allocator &alloc ) { template <class T, class Allocator> void test ( const std::initializer_list<T> &vals, const Allocator &alloc ) { typedef dynarray<T> dynA; - + dynA d1 ( vals, alloc ); assert ( d1.size () == vals.size() ); assert ( std::equal ( vals.begin (), vals.end (), d1.begin (), d1.end ())); @@ -55,7 +54,7 @@ void test ( const std::initializer_list<T> &vals, const Allocator &alloc ) { template <class T, class Allocator> void test ( const T &val, const Allocator &alloc1, const Allocator &alloc2 ) { typedef dynarray<T> dynA; - + dynA d1 ( 4, alloc1 ); assert ( d1.size () == 4 ); assert ( std::all_of ( d1.begin (), d1.end (), []( const T &item ){ return item == T(); } )); @@ -68,19 +67,17 @@ void test ( const T &val, const Allocator &alloc1, const Allocator &alloc2 ) { dynA d3 ( d2, alloc2 ); assert ( d3.size () == 7 ); - assert ( std::all_of ( d3.begin (), d3.end (), [&val]( const T &item ){ return item == val; } )); + assert ( std::all_of ( d3.begin (), d3.end (), [&val]( const T &item ){ return item == val; } )); check_allocator ( d3, alloc2 ); } int main() { -// This test is waiting on the resolution of LWG issue #2235 +// This test is waiting on the resolution of LWG issue #2235 // typedef test_allocator<char> Alloc; // typedef std::basic_string<char, std::char_traits<char>, Alloc> nstr; -// +// // test ( nstr("fourteen"), Alloc(3), Alloc(4) ); // test ( { nstr("1"), nstr("1"), nstr("2"), nstr("3"), nstr("5"), nstr("8")}, Alloc(6)); } -#else -int main() {} -#endif + |