summaryrefslogtreecommitdiffstats
path: root/libcxx/test/containers/sequences/dynarray/dynarray.cons
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/containers/sequences/dynarray/dynarray.cons')
-rw-r--r--libcxx/test/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp10
-rw-r--r--libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp14
2 files changed, 14 insertions, 10 deletions
diff --git a/libcxx/test/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp b/libcxx/test/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp
index cf8843d344a..d9cedc48789 100644
--- a/libcxx/test/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp
+++ b/libcxx/test/containers/sequences/dynarray/dynarray.cons/alloc.pass.cpp
@@ -25,7 +25,7 @@
#if _LIBCPP_STD_VER > 11
-#include <dynarray>
+#include <experimental/dynarray>
#include <cassert>
#include <algorithm>
@@ -33,15 +33,17 @@
#include <string>
#include "../../../test_allocator.h"
+using std::experimental::dynarray;
+
template <class T, class Allocator>
-void check_allocator ( const std::dynarray<T> &dyn, const Allocator &alloc ) {
+void check_allocator ( const dynarray<T> &dyn, const Allocator &alloc ) {
for ( int i = 0; i < dyn.size (); ++i )
assert ( dyn[i].get_allocator() == alloc );
}
template <class T, class Allocator>
void test ( const std::initializer_list<T> &vals, const Allocator &alloc ) {
- typedef std::dynarray<T> dynA;
+ typedef dynarray<T> dynA;
dynA d1 ( vals, alloc );
assert ( d1.size () == vals.size() );
@@ -52,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 std::dynarray<T> dynA;
+ typedef dynarray<T> dynA;
dynA d1 ( 4, alloc1 );
assert ( d1.size () == 4 );
diff --git a/libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp b/libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
index db93f212a0c..0effac2fc14 100644
--- a/libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
+++ b/libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp
@@ -21,16 +21,18 @@
#if _LIBCPP_STD_VER > 11
-#include <dynarray>
+#include <experimental/dynarray>
#include <cassert>
#include <algorithm>
#include <complex>
#include <string>
+using std::experimental::dynarray;
+
template <class T>
void test ( const std::initializer_list<T> &vals ) {
- typedef std::dynarray<T> dynA;
+ typedef dynarray<T> dynA;
dynA d1 ( vals );
assert ( d1.size () == vals.size() );
@@ -40,7 +42,7 @@ void test ( const std::initializer_list<T> &vals ) {
template <class T>
void test ( const T &val ) {
- typedef std::dynarray<T> dynA;
+ typedef dynarray<T> dynA;
dynA d1 ( 4 );
assert ( d1.size () == 4 );
@@ -56,13 +58,13 @@ void test ( const T &val ) {
}
void test_bad_length () {
- try { std::dynarray<int> ( std::numeric_limits<size_t>::max() / sizeof ( int ) + 1 ); }
+ try { dynarray<int> ( std::numeric_limits<size_t>::max() / sizeof ( int ) + 1 ); }
catch ( std::bad_array_length & ) { return ; }
assert ( false );
}
void test_bad_alloc () {
- try { std::dynarray<int> ( std::numeric_limits<size_t>::max() / sizeof ( int ) - 1 ); }
+ try { dynarray<int> ( std::numeric_limits<size_t>::max() / sizeof ( int ) - 1 ); }
catch ( std::bad_alloc & ) { return ; }
assert ( false );
}
@@ -81,7 +83,7 @@ int main()
std::string("5"), std::string("8")} );
// Make sure we don't pick up the Allocator version here
- std::dynarray<long> d1 ( 20, 3 );
+ dynarray<long> d1 ( 20, 3 );
assert ( d1.size() == 20 );
assert ( std::all_of ( d1.begin (), d1.end (), []( long item ){ return item == 3L; } ));
OpenPOWER on IntegriCloud