]> granicus.if.org Git - clang/commitdiff
Ensure FileManagerTest expects "\\" as path separator on Windows platforms
authorMatthew Voss <matthew.voss@sony.com>
Tue, 20 Nov 2018 03:30:28 +0000 (03:30 +0000)
committerMatthew Voss <matthew.voss@sony.com>
Tue, 20 Nov 2018 03:30:28 +0000 (03:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347284 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Basic/FileManagerTest.cpp

index b5855eeff7e0fc587ddcc4ce1b2b4022196c52f4..7e1e37f3c4c0310a0ce51e8451e8d61d6b33a11b 100644 (file)
@@ -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));