diff options
Diffstat (limited to 'clang-tools-extra/unittests/clangd')
| -rw-r--r-- | clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp | 27 | ||||
| -rw-r--r-- | clang-tools-extra/unittests/clangd/JSONExprTests.cpp | 4 | ||||
| -rw-r--r-- | clang-tools-extra/unittests/clangd/XRefsTests.cpp | 9 |
3 files changed, 1 insertions, 39 deletions
diff --git a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp index 48771a38b5c..b2747014c7d 100644 --- a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp +++ b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp @@ -22,33 +22,6 @@ namespace clang { namespace clangd { -// Let GMock print completion items and signature help. -void PrintTo(const CompletionItem &I, std::ostream *O) { - llvm::raw_os_ostream OS(*O); - OS << I.label << " - " << toJSON(I); -} -void PrintTo(const std::vector<CompletionItem> &V, std::ostream *O) { - *O << "{\n"; - for (const auto &I : V) { - *O << "\t"; - PrintTo(I, O); - *O << "\n"; - } - *O << "}"; -} -void PrintTo(const SignatureInformation &I, std::ostream *O) { - llvm::raw_os_ostream OS(*O); - OS << I.label << " - " << toJSON(I); -} -void PrintTo(const std::vector<SignatureInformation> &V, std::ostream *O) { - *O << "{\n"; - for (const auto &I : V) { - *O << "\t"; - PrintTo(I, O); - *O << "\n"; - } - *O << "}"; -} namespace { using namespace llvm; diff --git a/clang-tools-extra/unittests/clangd/JSONExprTests.cpp b/clang-tools-extra/unittests/clangd/JSONExprTests.cpp index 2c5cab29ca4..1e24e0988e2 100644 --- a/clang-tools-extra/unittests/clangd/JSONExprTests.cpp +++ b/clang-tools-extra/unittests/clangd/JSONExprTests.cpp @@ -15,9 +15,7 @@ namespace clang { namespace clangd { namespace json { -void PrintTo(const Expr &E, std::ostream *OS) { - llvm::raw_os_ostream(*OS) << llvm::formatv("{0:2}", E); -} + namespace { std::string s(const Expr &E) { return llvm::formatv("{0}", E).str(); } diff --git a/clang-tools-extra/unittests/clangd/XRefsTests.cpp b/clang-tools-extra/unittests/clangd/XRefsTests.cpp index f4b518f5c61..7d245748241 100644 --- a/clang-tools-extra/unittests/clangd/XRefsTests.cpp +++ b/clang-tools-extra/unittests/clangd/XRefsTests.cpp @@ -24,15 +24,6 @@ namespace clang { namespace clangd { using namespace llvm; -void PrintTo(const DocumentHighlight &V, std::ostream *O) { - llvm::raw_os_ostream OS(*O); - OS << V.range; - if (V.kind == DocumentHighlightKind::Read) - OS << "(r)"; - if (V.kind == DocumentHighlightKind::Write) - OS << "(w)"; -} - namespace { using testing::ElementsAre; using testing::Field; |

