Fix the test after D123031
authorKirill Bobyrev <kbobyrev@google.com>
Tue, 5 Apr 2022 16:20:57 +0000 (18:20 +0200)
committerKirill Bobyrev <kbobyrev@google.com>
Tue, 5 Apr 2022 16:21:24 +0000 (18:21 +0200)
clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp

index 20e01d3..0329cdc 100644 (file)
@@ -100,7 +100,10 @@ TEST(CanonicalIncludesTest, Precedence) {
   // We added a mapping from some/path to <path>.
   ASSERT_EQ("<path>", CI.mapHeader(File));
   // We should have a path from 'bits/stl_vector.h' to '<vector>'.
-  auto STLVectorFile = addFile(*InMemFS, Files, testPath("bits/stl_vector.h"));
+  // FIXME: The Standrad Library map in CanonicalIncludes expects forward
+  // slashes and Windows would use backward slashes instead, so the headers are
+  // not matched appropriately.
+  auto STLVectorFile = addFile(*InMemFS, Files, "bits/stl_vector.h");
   ASSERT_EQ("<vector>", CI.mapHeader(STLVectorFile));
 }