Some tests assume that iteration through an unordered multimap elements will return them in the same order as at the container creation. This assumption is not true since the container is unordered, so that no specific order of elements is ever guaranteed for such container. This patch introduces checks verifying that any iteration will return elements exactly from a set of valid values and without repetition, but in no particular order.
Diff Detail
- Repository
- rCXX libc++
Event Timeline
Please make sure you can run the test suite with your patch in C++03 mode.
test/std/containers/unord/unord.multimap/reserve.pass.cpp | ||
---|---|---|
31 | This is going to fail in C++03 mode because you're using initializer-list construction. |
Hmm, I'm confused by this change request. All the tests I patched are intended to test unordered_multimap container, which was introduced in C++11. So, they won't compile in C++03 mode in any case. Please, clarify the reason for the patch change.
I just had a discussion with other libc++ maintainers and we'd like to conserve the order-dependent tests, but only for libc++. Could you please keep the order-dependent tests in a suitably-named file under test/libcxx/<...> instead of test/std/<...>? Tests under test/libcxx/ are libc++-specific.
Libc++ was never a c++03 standard library implementation.
It started out as C++11. We support most of the C++11 features even if the user specifies -std=c++98 or -std=c++03
Initializer-list construction replaced with insert() throughout the tests.
I would suggest someone from libc++ test suite developers/maintainers team to do this, if it is necessary for them, before the patch is applied to test/std/<...> tests. I'm not a member of this team, but just yet another external user of test/std/<...> tests. So, I'd like to avoid intervening into another expert team's job by trying to solve their internal tasks having no sufficient expertize to do this.
Is this patch rejected? BTW, since git repository is used to store tests, the copy of any previous version of the patched tests can be made any time after the patch is applied.
This is going to fail in C++03 mode because you're using initializer-list construction.