summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Basic/FileManagerTest.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2018-11-30 18:36:31 +0000
committerKadir Cetinkaya <kadircet@google.com>2018-11-30 18:36:31 +0000
commit853ec892490abe77612d0d5e428dd1946e76777a (patch)
treec91ec6422ec694afe3632f3f19189cca724fb078 /clang/unittests/Basic/FileManagerTest.cpp
parentf48e43bbf764bce75b34168abebc0a39a97a4b71 (diff)
downloadbcm5719-llvm-853ec892490abe77612d0d5e428dd1946e76777a.tar.gz
bcm5719-llvm-853ec892490abe77612d0d5e428dd1946e76777a.zip
[clang] Fix rL348006 for windows
llvm-svn: 348015
Diffstat (limited to 'clang/unittests/Basic/FileManagerTest.cpp')
-rw-r--r--clang/unittests/Basic/FileManagerTest.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp
index 78c99909b76..21b411c978d 100644
--- a/clang/unittests/Basic/FileManagerTest.cpp
+++ b/clang/unittests/Basic/FileManagerTest.cpp
@@ -361,7 +361,14 @@ TEST_F(FileManagerTest, getVirtualFileFillsRealPathName) {
const FileEntry *file = manager.getVirtualFile("/tmp/test", 123, 1);
ASSERT_TRUE(file != nullptr);
ASSERT_TRUE(file->isValid());
- EXPECT_EQ(file->tryGetRealPathName(), "/tmp/test");
+ SmallString<64> ExpectedResult;
+#ifdef _WIN32
+ ExpectedResult = "C:";
+#else
+ ExpectedResult = "/";
+#endif
+ llvm::sys::path::append(ExpectedResult, "tmp", "test");
+ EXPECT_EQ(file->tryGetRealPathName(), ExpectedResult);
}
} // anonymous namespace
OpenPOWER on IntegriCloud