[PATCH] D50627: [clangd] Add a testcase for empty preamble.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 09:11:18 PDT 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM, but note the comment: we don't need `ASSERT_TRUE(bool(Preamble))`.



================
Comment at: unittests/clangd/TUSchedulerTests.cpp:333
+                      // We expect to get a non-empty preamble.
+                      ASSERT_TRUE(bool(Preamble));
+                      EXPECT_GT(cantFail(std::move(Preamble))
----------------
Remove `ASSERT_TRUE(bool(Preamble))`?
We assume everyone runs the tests run with assertions enable on every commit (and builtbots will catch the ones that don't), so `cantFail` will handle the error case for us.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50627





More information about the cfe-commits mailing list