This is an archive of the discontinued LLVM Phabricator instance.

[libcxx][test][NFC] Add tests for constructors of unordered [multi]map added in C++14
ClosedPublic

Authored by kboyarinov on Feb 8 2022, 5:32 AM.

Details

Summary

Add (almost identical) tests for C++14 constructors in unordered_map and unordered_multimap:

unordered_[multi]map(size_type sz, const allocator_type& alloc);
unordered_[multi]map(size_type sz, const hasher& hash, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]map(InputIt first, InputIt last, size_type sz, const allocator_type& alloc);

template <class InputIt>
unordered_[multi]map(InputIt first, InputIt last, size_type sz, const hasher& hash, const allocator_type& alloc);

unordered_[multi]map(initializer_list<value_type> init, size_type sz, const allocator_type& alloc);
unordered_[multi]map(initializer_list<value_type> init, size_type sz, const hasher& hash, const allocator_type& alloc);

The identical PR for unordered_set and unordered_multiset would be added in the future (not to make this PR too huge)

Diff Detail

Event Timeline

kboyarinov requested review of this revision.Feb 8 2022, 5:32 AM
kboyarinov created this revision.
kboyarinov updated this revision to Diff 406808.Feb 8 2022, 6:58 AM

Exclude C++03 and C++11 from testing

kboyarinov updated this revision to Diff 407108.Feb 9 2022, 3:15 AM

Apply comments from D119243 (also applicable for this PR)

ldionne accepted this revision.Feb 10 2022, 7:18 AM
This revision is now accepted and ready to land.Feb 10 2022, 7:18 AM
rarutyun accepted this revision.Mar 3 2022, 4:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 4:33 AM