[libcxx-commits] [PATCH] D113998: [libcxx][NFC] Add tests for std::map and std::multimap key_comp and value_comp

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 16 07:27:07 PST 2021


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

I did find some tests in `libcxx/test/std/containers/associative/multiset/multiset.cons/compare.pass.cpp` (and similarly for other container types). Could we incorporate the existing tests into yours and delete the old ones? IMO your new tests are more complete, the only thing I would do is use `test_less` like in the original ones.



================
Comment at: libcxx/test/std/containers/associative/map/map.observers/key_comp.pass.cpp:27
+    assert(cm.key_comp()(p1.first->first, p2.first->first));
+    assert(!cm.key_comp()(p2.first->first, p1.first->first));
+}
----------------
Please `return 0;` at the end of the function. In freestanding mode, `main` is not treated specially so we'd get a warning "not returning anything from a function that returns `int`".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113998/new/

https://reviews.llvm.org/D113998



More information about the libcxx-commits mailing list