Make move_assign_noexcept.pass.cpp tests more portable. Patch from STL@microsoft.com
authorEric Fiselier <eric@efcs.ca>
Mon, 25 Jul 2016 00:18:12 +0000 (00:18 +0000)
committerEric Fiselier <eric@efcs.ca>
Mon, 25 Jul 2016 00:18:12 +0000 (00:18 +0000)
llvm-svn: 276591

12 files changed:
libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp

index 95ddf6d..84f115f 100644 (file)
@@ -22,6 +22,7 @@
 #include <map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -46,7 +47,7 @@ int main()
     }
     {
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
index 890cac8..7637885 100644 (file)
@@ -22,6 +22,7 @@
 #include <map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -46,7 +47,7 @@ int main()
     }
     {
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
index 5738863..bae97cf 100644 (file)
@@ -22,6 +22,7 @@
 #include <set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -45,7 +46,7 @@ int main()
     }
     {
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
index 3f7d783..ce44b69 100644 (file)
@@ -22,6 +22,7 @@
 #include <set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -45,7 +46,7 @@ int main()
     }
     {
         typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
index cebf76a..9b813ce 100644 (file)
@@ -21,6 +21,7 @@
 #include <deque>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,10 +44,10 @@ int main()
     }
     {
         typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
     }
 }
index b9a6ef7..5f278e3 100644 (file)
@@ -21,6 +21,7 @@
 #include <forward_list>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,10 +44,10 @@ int main()
     }
     {
         typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
     }
 }
index d4f8fde..81f7811 100644 (file)
@@ -21,6 +21,7 @@
 #include <list>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,10 +44,10 @@ int main()
     }
     {
         typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_move_assignable<C>::value, "");
     }
 }
index fe53fbf..dd4bf9e 100644 (file)
@@ -21,6 +21,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 
 template <class T>
@@ -60,7 +61,7 @@ int main()
 {
     {
         typedef std::vector<bool> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::vector<bool, test_allocator<bool>> C;
@@ -68,12 +69,12 @@ int main()
     }
     {
         typedef std::vector<bool, other_allocator<bool>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::vector<bool, some_alloc<bool>> C;
 #if TEST_STD_VER > 14
-        static_assert( std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT( std::is_nothrow_move_assignable<C>::value, "");
 #else
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
 #endif
@@ -81,7 +82,7 @@ int main()
 #if TEST_STD_VER > 14
     {  // POCMA false, is_always_equal true
         typedef std::vector<bool, some_alloc2<bool>> C;
-        static_assert( std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT( std::is_nothrow_move_assignable<C>::value, "");
     }
     {  // POCMA false, is_always_equal false
         typedef std::vector<bool, some_alloc3<bool>> C;
index 61c2969..c0dc71d 100644 (file)
@@ -22,6 +22,7 @@
 #include <unordered_map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -56,7 +57,7 @@ int main()
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
index eeda7b3..b621449 100644 (file)
@@ -22,6 +22,7 @@
 #include <unordered_map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -56,7 +57,7 @@ int main()
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
index fbd6df1..ac0a10a 100644 (file)
@@ -22,6 +22,7 @@
 #include <unordered_set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -56,7 +57,7 @@ int main()
     {
         typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
index 45f18db..b89d680 100644 (file)
@@ -22,6 +22,7 @@
 #include <unordered_set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -56,7 +57,7 @@ int main()
     {
         typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
-        static_assert(std::is_nothrow_move_assignable<C>::value, "");
+        LIBCPP_STATIC_ASSERT(std::is_nothrow_move_assignable<C>::value, "");
     }
     {
         typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;