diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2013-11-13 22:44:48 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2013-11-13 22:44:48 +0000 |
commit | 21fee96f69742e3f2168a03de86b949fbd8094f7 (patch) | |
tree | 38cca30039f7cafb408dfcbbc138bca8d19384db /libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp | |
parent | 7ee147246ff65aa7c6c241e320e4e847bc2e3e73 (diff) | |
download | bcm5719-llvm-21fee96f69742e3f2168a03de86b949fbd8094f7.tar.gz bcm5719-llvm-21fee96f69742e3f2168a03de86b949fbd8094f7.zip |
Move <dynarray> into include/experimental, and into the std::experimental namespace, since it's not part of C++14, but of an upcoming TS
llvm-svn: 194614
Diffstat (limited to 'libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp')
-rw-r--r-- | libcxx/test/containers/sequences/dynarray/dynarray.cons/default.pass.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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; } )); |