[libcxx] r276591 - Make move_assign_noexcept.pass.cpp tests more portable. Patch from STL at microsoft.com
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 24 17:18:13 PDT 2016
Author: ericwf
Date: Sun Jul 24 19:18:12 2016
New Revision: 276591
URL: http://llvm.org/viewvc/llvm-project?rev=276591&view=rev
Log:
Make move_assign_noexcept.pass.cpp tests more portable. Patch from STL at microsoft.com
Modified:
libcxx/trunk/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
Modified: libcxx/trunk/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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, "");
}
}
Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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, "");
}
}
Modified: libcxx/trunk/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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, "");
}
}
Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
Modified: libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp?rev=276591&r1=276590&r2=276591&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp Sun Jul 24 19:18:12 2016
@@ -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;
More information about the cfe-commits
mailing list