Add separate tests for get_allocator() method for sequence, ordered and unordered associative containers.
Current tests are intended to test postcondition of constructors that accepts allocator.
Also, new tests covers constancy of the method.
Details
- Reviewers
rarutyun zoecarver • Quuxplusone Mordante ldionne - Group Reviewers
Restricted Project - Commits
- rG8d25da78aad9: [libcxx][test][NFC] Extend get_allocator() testing for containers
Diff Detail
Event Timeline
Thanks a lot for improving the tests! I have some comments, but LGTM otherwise.
libcxx/test/std/containers/associative/map/get_allocator.pass.cpp | ||
---|---|---|
23 | Suggestion -- in these tests, you could use typedef std::pair<const int, std::string> Pair to make things a little bit less verbose. | |
28 | Just curious, but why are those only enabled in C++11 and later? What is C++11 specific about those? | |
32 | This is going to be needed for the test to pass in C++03 mode (applies elsewhere too). |
Added type aliases for associative containers value_types.
Removed C++11 mode for other_allocator
Fixed C++03
libcxx/test/std/containers/associative/map/get_allocator.pass.cpp | ||
---|---|---|
28 | You are right, there is no specific C++11 code here, I confused other_allocator with min_allocator, which is wrapped into C++11 macros everywhere. Thank you! |
Suggestion -- in these tests, you could use typedef std::pair<const int, std::string> Pair to make things a little bit less verbose.