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

14 files changed:
libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
libcxx/test/std/strings/basic.string/string.cons/dtor_noexcept.pass.cpp

index efdf5a2..a0cf689 100644 (file)
@@ -16,6 +16,7 @@
 #include <map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -44,6 +45,6 @@ int main()
     }
     {
         typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 3a240cd..669d23d 100644 (file)
@@ -16,6 +16,7 @@
 #include <map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -44,6 +45,6 @@ int main()
     }
     {
         typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index f4e868e..b4b9d06 100644 (file)
@@ -16,6 +16,7 @@
 #include <set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,6 +44,6 @@ int main()
     }
     {
         typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 60d1d42..041f599 100644 (file)
@@ -16,6 +16,7 @@
 #include <set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,6 +44,6 @@ int main()
     }
     {
         typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 503e123..5995515 100644 (file)
@@ -16,6 +16,7 @@
 #include <deque>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,6 +44,6 @@ int main()
     }
     {
         typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 85d929b..f70119e 100644 (file)
@@ -16,6 +16,7 @@
 #include <forward_list>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,6 +44,6 @@ int main()
     }
     {
         typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 3d11f13..66e40a3 100644 (file)
@@ -16,6 +16,7 @@
 #include <list>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,6 +44,6 @@ int main()
     }
     {
         typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index bd2534a..b8ff33c 100644 (file)
@@ -16,6 +16,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 
 template <class T>
@@ -42,6 +43,6 @@ int main()
     }
     {
         typedef std::vector<bool, some_alloc<bool>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index bd53812..10a381f 100644 (file)
@@ -16,6 +16,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -43,6 +44,6 @@ int main()
     }
     {
         typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 3585fe7..4fb10af 100644 (file)
@@ -16,6 +16,7 @@
 #include <unordered_map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -54,11 +55,11 @@ int main()
     }
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                                                          some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 2797f8d..b5f4403 100644 (file)
@@ -16,6 +16,7 @@
 #include <unordered_map>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -54,11 +55,11 @@ int main()
     }
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                                                          some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index 7334845..62fe51e 100644 (file)
@@ -16,6 +16,7 @@
 #include <unordered_set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -54,11 +55,11 @@ int main()
     }
     {
         typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
     {
         typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
                                                          some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index b6837cc..82e184b 100644 (file)
@@ -16,6 +16,7 @@
 #include <unordered_set>
 #include <cassert>
 
+#include "test_macros.h"
 #include "MoveOnly.h"
 #include "test_allocator.h"
 
@@ -54,11 +55,11 @@ int main()
     }
     {
         typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
     {
         typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
                                                          some_comp<MoveOnly>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }
index c4ac1f1..011fd54 100644 (file)
@@ -16,6 +16,7 @@
 #include <string>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 
 template <class T>
@@ -38,6 +39,6 @@ int main()
     }
     {
         typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
-        static_assert(!std::is_nothrow_destructible<C>::value, "");
+        LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<C>::value, "");
     }
 }