[PATCH] D51029: [clangd] Implement LIMIT iterator

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 24 03:12:51 PDT 2018


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:34
+consumeIDs(std::unique_ptr<Iterator> It,
+           size_t Limit = std::numeric_limits<size_t>::max()) {
+  auto Root = createLimit(move(It), Limit);
----------------
remove limit param here too?
Where you're *testing* limit, the tests will be clearer if you do it explicitly.


================
Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:279
   DocIterator = create(L0);
-  EXPECT_THAT(consumeIDs(*DocIterator), ElementsAre(4, 7, 8, 20, 42, 100));
+  EXPECT_THAT(consumeIDs(move(DocIterator)), ElementsAre(3, 6, 7, 20, 42, 100));
 
----------------
this doesn't seem to test the limit iterator (at least not more than it's tested elsewhere)


https://reviews.llvm.org/D51029





More information about the cfe-commits mailing list