Author: Sam McCall Date: 2020-12-18T15:11:08+01:00 New Revision: 0336ff0a17e6aec831334aeb50e6685f6b184065
URL: https://github.com/llvm/llvm-project/commit/0336ff0a17e6aec831334aeb50e6685f6b184065 DIFF: https://github.com/llvm/llvm-project/commit/0336ff0a17e6aec831334aeb50e6685f6b184065.diff LOG: [clangd] Fix broken JSON test on windows Added: Modified: clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp b/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp index d9fccb835c96..12c986572d8b 100644 --- a/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp +++ b/clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp @@ -432,12 +432,13 @@ TEST_F(DirectoryBasedGlobalCompilationDatabaseCacheTest, Cacheable) { EXPECT_THAT(FooBar, hasFlag("-DFOOBAR")) << "cdb reloaded"; // compile_commands.json takes precedence over compile_flags.txt. - FS.Files["foo/compile_commands.json"] = llvm::formatv(R"json([{ + FS.Files["foo/compile_commands.json"] = + llvm::formatv(R"json([{ "file": "{0}/foo/dummy.cc", "command": "clang -DBAZ dummy.cc", "directory": "{0}/foo", }])json", - testRoot()); + llvm::sys::path::convert_to_slash(testRoot())); EXPECT_EQ(FooBar, lookupCDB(GDB, testPath("foo/test.cc"), Stale)) << "cache still valid"; auto Baz = lookupCDB(GDB, testPath("foo/test.cc"), Fresh); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits