[cfe-commits] r165425 - /cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp

Daniel Jasper djasper at google.com
Mon Oct 8 13:32:51 PDT 2012


Author: djasper
Date: Mon Oct  8 15:32:51 2012
New Revision: 165425

URL: http://llvm.org/viewvc/llvm-project?rev=165425&view=rev
Log:
CompilationDatabaseTest: Fix another Windows path issue.

Modified:
    cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp

Modified: cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp?rev=165425&r1=165424&r2=165425&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/CompilationDatabaseTest.cpp Mon Oct  8 15:32:51 2012
@@ -14,6 +14,7 @@
 #include "clang/Tooling/FileMatchTrie.h"
 #include "clang/Tooling/JSONCompilationDatabase.h"
 #include "clang/Tooling/Tooling.h"
+#include "llvm/Support/PathV2.h"
 #include "gtest/gtest.h"
 
 namespace clang {
@@ -56,8 +57,11 @@
             getAllFiles("[]", ErrorMessage)) << ErrorMessage;
 
   std::vector<std::string> expected_files;
-  expected_files.push_back("//net/dir/file1");
-  expected_files.push_back("//net/dir/file2");
+  SmallString<16> PathStorage;
+  llvm::sys::path::native("//net/dir/file1", PathStorage);
+  expected_files.push_back(PathStorage.str());
+  llvm::sys::path::native("//net/dir/file2", PathStorage);
+  expected_files.push_back(PathStorage.str());
   EXPECT_EQ(expected_files, getAllFiles(
     "[{\"directory\":\"//net/dir\","
       "\"command\":\"command\","





More information about the cfe-commits mailing list