summaryrefslogtreecommitdiff
path: root/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-10-08 20:32:51 +0000
committerDaniel Jasper <djasper@google.com>2012-10-08 20:32:51 +0000
commit3201da38bdd7cea1d05700858d2af94287044887 (patch)
tree631737a5099490735539f23342a27943ba8d45eb /unittests/Tooling/CompilationDatabaseTest.cpp
parent8a5e8c35e1beced2f098a775648e8648294967d2 (diff)
downloadclang-3201da38bdd7cea1d05700858d2af94287044887.tar.gz
clang-3201da38bdd7cea1d05700858d2af94287044887.tar.bz2
clang-3201da38bdd7cea1d05700858d2af94287044887.tar.xz
CompilationDatabaseTest: Fix another Windows path issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling/CompilationDatabaseTest.cpp')
-rw-r--r--unittests/Tooling/CompilationDatabaseTest.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/unittests/Tooling/CompilationDatabaseTest.cpp b/unittests/Tooling/CompilationDatabaseTest.cpp
index b9a6d73a6d..5ed4240c1e 100644
--- a/unittests/Tooling/CompilationDatabaseTest.cpp
+++ b/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -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 @@ TEST(JSONCompilationDatabase, GetAllFiles) {
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\","