aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/FileManagerTest.cpp
diff options
context:
space:
mode:
authorMatthew Voss <matthew.voss@sony.com>2018-11-20 03:30:28 +0000
committerMatthew Voss <matthew.voss@sony.com>2018-11-20 03:30:28 +0000
commit25e44e7c33a639b3c5266901ba109fefa39ca8c4 (patch)
treeaa39875def34d70063ba1e87b72ea9f8481b4ba4 /clang/unittests/Basic/FileManagerTest.cpp
parent312a46a94ae1e7534c491fa9345f5192a65e2494 (diff)
downloadllvm-25e44e7c33a639b3c5266901ba109fefa39ca8c4.zip
llvm-25e44e7c33a639b3c5266901ba109fefa39ca8c4.tar.gz
llvm-25e44e7c33a639b3c5266901ba109fefa39ca8c4.tar.bz2
Ensure FileManagerTest expects "\\" as path separator on Windows platforms
llvm-svn: 347284
Diffstat (limited to 'clang/unittests/Basic/FileManagerTest.cpp')
-rw-r--r--clang/unittests/Basic/FileManagerTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp
index b5855ee..7e1e37f3 100644
--- a/clang/unittests/Basic/FileManagerTest.cpp
+++ b/clang/unittests/Basic/FileManagerTest.cpp
@@ -240,7 +240,11 @@ TEST_F(FileManagerTest, getFileDefersOpen) {
file = manager.getFile("/tmp/test", /*OpenFile=*/true);
ASSERT_TRUE(file != nullptr);
ASSERT_TRUE(file->isValid());
+#ifdef _WIN32
+ EXPECT_EQ("/tmp\\test", file->tryGetRealPathName());
+#else
EXPECT_EQ("/tmp/test", file->tryGetRealPathName());
+#endif
// However we should never try to open a file previously opened as virtual.
ASSERT_TRUE(manager.getVirtualFile("/tmp/testv", 5, 0));