[libcxx-commits] [PATCH] D57903: [libcxx] Add missing checks to tests for the move w/allocator constructors of associative containers.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 12 09:53:44 PST 2019


ldionne added inline comments.
Herald added a subscriber: jdoerfert.


================
Comment at: test/std/containers/associative/map/map.cons/move_alloc.pass.cpp:181
             LIBCPP_ASSERT(m1.empty());
-            assert(Counter_base::gConstructed == num+6);
+            assert(Counter_base::gConstructed == num+6+(m1.empty()?0:3));
 
----------------
Technically, I think the container could also have just 2 elements remaining, no? IOW, what you mean is really that `num+6 <= Counter_base::gConstructed <= num+6+3`?


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57903/new/

https://reviews.llvm.org/D57903





More information about the libcxx-commits mailing list