[libcxx-commits] [PATCH] D56498: [libcxx] Fix order checking in some more unordered_multimap tests.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 28 12:39:05 PST 2019


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp:68
         C::const_iterator i = c.cbegin();
-        assert(i->first == 1);
-        assert(i->second == "one");
-        ++i;
-        assert(i->first == 1);
-        assert(i->second == "four");
-        ++i;
-        assert(i->first == 2);
-        assert(i->second == "two");
-        ++i;
-        assert(i->first == 2);
-        assert(i->second == "four");
-        ++i;
-        assert(i->first == 3);
-        assert(i->second == "three");
-        ++i;
-        assert(i->first == 4);
-        assert(i->second == "four");
+        C::const_iterator ie = c.end();
+        std::set<int> sf;
----------------
Is there any way you could simplify this by e.g. inserting into a `std::map` or `std::multimap`?


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D56498





More information about the libcxx-commits mailing list