[PATCH] D39571: [clangd] DidChangeConfiguration Notification
Simon Marchi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 04:36:21 PST 2018
simark marked 5 inline comments as done.
simark added inline comments.
================
Comment at: unittests/clangd/ClangdTests.cpp:492
+
+ EXPECT_TRUE(DiagConsumer.contains(FooCpp));
+ EXPECT_TRUE(DiagConsumer.contains(BarCpp));
----------------
ilya-biryukov wrote:
> Maybe expose a copy of the map from DiagConsumer and check for all files in a single line?
>
> ```
> class MultipleErrorCHeckingDiagConsumer {
> /// Exposes all files consumed by onDiagnosticsReady in an unspecified order.
> /// For each file, a bool value indicates whether the last diagnostics contained an error.
> std::vector<std::pair<Path, bool>> filesWithDiags() const { /* ... */ }
> };
>
> /// ....
> EXPECT_THAT(DiagConsumer.filesWithDiags(), UnorderedElementsAre(Pair(FooCpp, false), Pair(BarCpp, true), Pair(BazCpp, false));
> ```
>
> It would make the test more concise.
Nice :)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D39571
More information about the cfe-commits
mailing list