Skip to content

Commit 0336ff0

Browse files
committed
[clangd] Fix broken JSON test on windows
1 parent 8590b5c commit 0336ff0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,13 @@ TEST_F(DirectoryBasedGlobalCompilationDatabaseCacheTest, Cacheable) {
432432
EXPECT_THAT(FooBar, hasFlag("-DFOOBAR")) << "cdb reloaded";
433433

434434
// compile_commands.json takes precedence over compile_flags.txt.
435-
FS.Files["foo/compile_commands.json"] = llvm::formatv(R"json([{
435+
FS.Files["foo/compile_commands.json"] =
436+
llvm::formatv(R"json([{
436437
"file": "{0}/foo/dummy.cc",
437438
"command": "clang -DBAZ dummy.cc",
438439
"directory": "{0}/foo",
439440
}])json",
440-
testRoot());
441+
llvm::sys::path::convert_to_slash(testRoot()));
441442
EXPECT_EQ(FooBar, lookupCDB(GDB, testPath("foo/test.cc"), Stale))
442443
<< "cache still valid";
443444
auto Baz = lookupCDB(GDB, testPath("foo/test.cc"), Fresh);

0 commit comments

Comments
 (0)