Was part of D118114.
Unify test cases for std::map::count method and add test case for the comparator that marked final
Details
Details
- Reviewers
rarutyun zoecarver Mordante • Quuxplusone kboyarinov ldionne - Group Reviewers
Restricted Project - Commits
- rG2e106d55203a: [libc++][test][NFC] Rewrite map count test and add test case for "final" compare
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/std/containers/associative/map/map.ops/count.pass.cpp | ||
---|---|---|
89 | Comment from D118114: This test case is intended to improve code coverage of the libc++ implementation of map. The implementation uses helper class __map_value_compare for EBO: template <class _Key, class _CP, class _Compare, bool = is_empty_v<_Compare> && !is_final_v<_Compare>> class __map_value_compare : private _Compare { /*...*/}; template <class _Key, class _CP, class _Compare> _Compare comp; /*...*/ }; |
Comment from D118114:
This test case is intended to improve code coverage of the libc++ implementation of map. The implementation uses helper class __map_value_compare for EBO:
template <class _Key, class _CP, class _Compare,
class __map_value_compare : private _Compare { /*...*/};
template <class _Key, class _CP, class _Compare>
class __map_value_compare<_Key, _CP, _Compare, false>
{
};
To test both generic template and the specialization, we need additional test-case for final comparator.
Do you think such testing should be organized in this manner or something should be added or changed?