yvvan created this revision. yvvan added reviewers: bkramer, arphaman, nik. Herald added subscribers: kadircet, jkorous, ioeric, javed.absar, ilya-biryukov.
libclang has nothing to do with clangd so I don't see why having the last one is the reason to remove features from libclang. Especially without reviews. https://reviews.llvm.org/D55415 Files: unittests/clangd/TUSchedulerTests.cpp Index: unittests/clangd/TUSchedulerTests.cpp =================================================================== --- unittests/clangd/TUSchedulerTests.cpp +++ unittests/clangd/TUSchedulerTests.cpp @@ -709,29 +709,6 @@ TUState(TUAction::Idle, /*No action*/ ""))); } -TEST_F(TUSchedulerTests, NoTUStatusEmittedForRemovedFile) { - class CaptureTUStatus : public DiagnosticsConsumer { - public: - void onDiagnosticsReady(PathRef File, - std::vector<Diag> Diagnostics) override {} - - void onFileUpdated(PathRef File, const TUStatus &Status) override { - // Block the worker thread until the document is removed. - Removed.wait(); - } - Notification Removed; - } CaptureTUStatus; - MockFSProvider FS; - MockCompilationDatabase CDB; - ClangdServer Server(CDB, FS, CaptureTUStatus, ClangdServer::optsForTest()); - - Server.addDocument(testPath("foo.cpp"), "int main() {}", - WantDiagnostics::Yes); - Server.removeDocument(testPath("foo.cpp")); - CaptureTUStatus.Removed.notify(); - ASSERT_TRUE(Server.blockUntilIdleForTest()) << "Waiting for finishing"; -} - } // namespace } // namespace clangd } // namespace clang
Index: unittests/clangd/TUSchedulerTests.cpp =================================================================== --- unittests/clangd/TUSchedulerTests.cpp +++ unittests/clangd/TUSchedulerTests.cpp @@ -709,29 +709,6 @@ TUState(TUAction::Idle, /*No action*/ ""))); } -TEST_F(TUSchedulerTests, NoTUStatusEmittedForRemovedFile) { - class CaptureTUStatus : public DiagnosticsConsumer { - public: - void onDiagnosticsReady(PathRef File, - std::vector<Diag> Diagnostics) override {} - - void onFileUpdated(PathRef File, const TUStatus &Status) override { - // Block the worker thread until the document is removed. - Removed.wait(); - } - Notification Removed; - } CaptureTUStatus; - MockFSProvider FS; - MockCompilationDatabase CDB; - ClangdServer Server(CDB, FS, CaptureTUStatus, ClangdServer::optsForTest()); - - Server.addDocument(testPath("foo.cpp"), "int main() {}", - WantDiagnostics::Yes); - Server.removeDocument(testPath("foo.cpp")); - CaptureTUStatus.Removed.notify(); - ASSERT_TRUE(Server.blockUntilIdleForTest()) << "Waiting for finishing"; -} - } // namespace } // namespace clangd } // namespace clang
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits