From 853ec892490abe77612d0d5e428dd1946e76777a Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 30 Nov 2018 18:36:31 +0000 Subject: [clang] Fix rL348006 for windows llvm-svn: 348015 --- clang/unittests/Basic/FileManagerTest.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'clang/unittests/Basic/FileManagerTest.cpp') diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index 78c9990..21b411c 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 -- cgit v1.1