Ensure FileManagerTest expects "\\" as path separator on Windows platforms

llvm-svn: 347284
This commit is contained in:
Matthew Voss 2018-11-20 03:30:28 +00:00
parent 312a46a94a
commit 25e44e7c33
1 changed files with 4 additions and 0 deletions

View File

@ -240,7 +240,11 @@ TEST_F(FileManagerTest, getFileDefersOpen) {
file = manager.getFile("/tmp/test", /*OpenFile=*/true); file = manager.getFile("/tmp/test", /*OpenFile=*/true);
ASSERT_TRUE(file != nullptr); ASSERT_TRUE(file != nullptr);
ASSERT_TRUE(file->isValid()); ASSERT_TRUE(file->isValid());
#ifdef _WIN32
EXPECT_EQ("/tmp\\test", file->tryGetRealPathName());
#else
EXPECT_EQ("/tmp/test", file->tryGetRealPathName()); EXPECT_EQ("/tmp/test", file->tryGetRealPathName());
#endif
// However we should never try to open a file previously opened as virtual. // However we should never try to open a file previously opened as virtual.
ASSERT_TRUE(manager.getVirtualFile("/tmp/testv", 5, 0)); ASSERT_TRUE(manager.getVirtualFile("/tmp/testv", 5, 0));