[clang-tools-extra] 211df73 - Fix the test after D123031

Kirill Bobyrev via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 09:21:37 PDT 2022


Author: Kirill Bobyrev
Date: 2022-04-05T18:21:24+02:00
New Revision: 211df7319af4d97b11f59fbc88bfb7ca27eab785

URL: https://github.com/llvm/llvm-project/commit/211df7319af4d97b11f59fbc88bfb7ca27eab785
DIFF: https://github.com/llvm/llvm-project/commit/211df7319af4d97b11f59fbc88bfb7ca27eab785.diff

LOG: Fix the test after D123031

Added: 
    

Modified: 
    clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp b/clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp
index 20e01d31b29a7..0329cdc50cad2 100644
--- a/clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp
+++ b/clang-tools-extra/clangd/unittests/CanonicalIncludesTests.cpp
@@ -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));
 }
 


        


More information about the cfe-commits mailing list