Hi Eric,
Would you review these minor corrections for the issues found while running the libc++ tests with _LIBCPP_DEBUG, please?
Below is the summary explaining the motivation for the changes.
(1)
- test/std/containers/unord/unord.multimap/db_local_iterators_7.pass.cpp
- test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp
The tests expect the 1st iterator increment to be successful and the 2nd one to trigger _LIBCPP_ASSERT. Actually the assert is triggered by the 1st increment as the container contains no elements. Fix: initialize the container with one element.
(2)
- test/std/containers/unord/unord.multiset/db_iterators_8.pass.cpp
- test/std/containers/unord/unord.multiset/db_local_iterators_8.pass.cpp
- test/std/containers/unord/unord.set/db_iterators_8.pass.cpp
- test/std/containers/unord/unord.set/db_local_iterators_8.pass.cpp
Container template instantiation passes the allocator type in the wrong place.
(3)
- test/std/containers/unord/unord.multiset/db_iterators_7.pass.cpp
- test/std/containers/unord/unord.multiset/db_local_iterators_7.pass.cpp
- test/std/containers/unord/unord.set/db_iterators_7.pass.cpp
- test/std/containers/unord/unord.set/db_local_iterators_7.pass.cpp
Same as (1) + (2)
(4)
- test/std/containers/unord/unord.set/emplace_hint.pass.cpp
- test/std/containers/unord/unord.set/insert_hint_const_lvalue.pass.cpp
- test/std/containers/unord/unord.set/insert_hint_rvalue.pass.cpp
Saves the end iterator and then modifies the container invalidating the iterator due to rehashing.
Thanks!
Tests for debug mode should manually enable it, instead of requiring it already be enabled. If you want to do more cleanup please change this test to #define _LIBCPP_DEBUG 1 at the start of the file, and then remove the redundant empty main.