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!
This uses C++11 features but is required to work in C++03. Please make sure these changes don't break C++03 tests.
Side note: Wouldn't removing the second increment be simpler than changing the size?