summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp')
-rw-r--r--clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
index 7bf5c870b8e..e5ba7d4e086 100644
--- a/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
+++ b/clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
@@ -22,6 +22,7 @@
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "llvm/Support/Error.h"
+#include "llvm/Support/Path.h"
#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
@@ -699,11 +700,13 @@ TEST(CompletionTest, DynamicIndexIncludeInsertion) {
Server.addDocument(testPath("foo_impl.cpp"), FileContent);
// Wait for the dynamic index being built.
ASSERT_TRUE(Server.blockUntilIdleForTest());
- EXPECT_THAT(
- completions(Server, "Foo^ foo;").Completions,
- ElementsAre(AllOf(Named("Foo"),
- HasInclude('"' + testPath("foo_header.h") + '"'),
- InsertInclude())));
+ EXPECT_THAT(completions(Server, "Foo^ foo;").Completions,
+ ElementsAre(AllOf(Named("Foo"),
+ HasInclude('"' +
+ llvm::sys::path::convert_to_slash(
+ testPath("foo_header.h")) +
+ '"'),
+ InsertInclude())));
}
TEST(CompletionTest, DynamicIndexMultiFile) {
OpenPOWER on IntegriCloud