[PATCH] D61366: [libcxx] [test] Don't assert that moved-from containers with non-POCMA allocators are empty.
Billy Robert O'Neal III via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 1 15:13:54 PDT 2019
BillyONeal updated this revision to Diff 197653.
BillyONeal added a comment.
Also fixed vector<bool> test.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61366/new/
https://reviews.llvm.org/D61366
Files:
test/std/containers/associative/map/map.cons/move_assign.pass.cpp
test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
test/std/containers/associative/set/set.cons/move_assign.pass.cpp
test/std/containers/sequences/vector.bool/assign_move.pass.cpp
Index: test/std/containers/sequences/vector.bool/assign_move.pass.cpp
===================================================================
--- test/std/containers/sequences/vector.bool/assign_move.pass.cpp
+++ test/std/containers/sequences/vector.bool/assign_move.pass.cpp
@@ -30,7 +30,7 @@
std::vector<bool, test_allocator<bool> > l2(test_allocator<bool>(5));
l2 = std::move(l);
assert(l2 == lo);
- assert(l.empty());
+ LIBCPP_ASSERT(l.empty());
assert(l2.get_allocator() == lo.get_allocator());
}
{
Index: test/std/containers/associative/set/set.cons/move_assign.pass.cpp
===================================================================
--- test/std/containers/associative/set/set.cons/move_assign.pass.cpp
+++ test/std/containers/associative/set/set.cons/move_assign.pass.cpp
@@ -100,7 +100,7 @@
assert(m3 == m2);
assert(m3.get_allocator() == A(5));
assert(m3.key_comp() == C(5));
- assert(m1.empty());
+ LIBCPP_ASSERT(m1.empty());
}
{
typedef MoveOnly V;
Index: test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
===================================================================
--- test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
+++ test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
@@ -100,7 +100,7 @@
assert(m3 == m2);
assert(m3.get_allocator() == A(5));
assert(m3.key_comp() == C(5));
- assert(m1.empty());
+ LIBCPP_ASSERT(m1.empty());
}
{
typedef MoveOnly V;
Index: test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
===================================================================
--- test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
+++ test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
@@ -102,7 +102,7 @@
assert(m3 == m2);
assert(m3.get_allocator() == A(5));
assert(m3.key_comp() == C(5));
- assert(m1.empty());
+ LIBCPP_ASSERT(m1.empty());
}
{
typedef std::pair<MoveOnly, MoveOnly> V;
Index: test/std/containers/associative/map/map.cons/move_assign.pass.cpp
===================================================================
--- test/std/containers/associative/map/map.cons/move_assign.pass.cpp
+++ test/std/containers/associative/map/map.cons/move_assign.pass.cpp
@@ -102,7 +102,7 @@
assert(m3 == m2);
assert(m3.get_allocator() == A(5));
assert(m3.key_comp() == C(5));
- assert(m1.empty());
+ LIBCPP_ASSERT(m1.empty());
}
{
typedef std::pair<MoveOnly, MoveOnly> V;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61366.197653.patch
Type: text/x-patch
Size: 2746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190501/458cf27f/attachment-0001.bin>
More information about the cfe-commits
mailing list