[llvm] r347016 - [VFS] Update unittest to fix Windows buildbot.
Volodymyr Sapsai via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 18:20:33 PST 2018
Author: vsapsai
Date: Thu Nov 15 18:20:33 2018
New Revision: 347016
URL: http://llvm.org/viewvc/llvm-project?rev=347016&view=rev
Log:
[VFS] Update unittest to fix Windows buildbot.
Buildbot http://lab.llvm.org:8011/builders/clang-x64-windows-msvc is failing
because it doesn't like paths in VFS, make them more Windows-friendly.
Follow up to r347009.
Modified:
llvm/trunk/unittests/Support/VirtualFileSystemTest.cpp
Modified: llvm/trunk/unittests/Support/VirtualFileSystemTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/VirtualFileSystemTest.cpp?rev=347016&r1=347015&r2=347016&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/VirtualFileSystemTest.cpp (original)
+++ llvm/trunk/unittests/Support/VirtualFileSystemTest.cpp Thu Nov 15 18:20:33 2018
@@ -1778,7 +1778,7 @@ TEST_F(VFSFromYAMLTest, DirectoryIterati
TEST_F(VFSFromYAMLTest, GetRealPath) {
IntrusiveRefCntPtr<DummyFileSystem> Lower(new DummyFileSystem());
- Lower->addDirectory("/dir/");
+ Lower->addDirectory("//dir/");
Lower->addRegularFile("/foo");
Lower->addSymlink("/link");
IntrusiveRefCntPtr<vfs::FileSystem> FS = getFromYAMLString(
@@ -1786,7 +1786,7 @@ TEST_F(VFSFromYAMLTest, GetRealPath) {
" 'roots': [\n"
"{\n"
" 'type': 'directory',\n"
- " 'name': '/root/',\n"
+ " 'name': '//root/',\n"
" 'contents': [ {\n"
" 'type': 'file',\n"
" 'name': 'bar',\n"
@@ -1796,7 +1796,7 @@ TEST_F(VFSFromYAMLTest, GetRealPath) {
"},\n"
"{\n"
" 'type': 'directory',\n"
- " 'name': '/dir/',\n"
+ " 'name': '//dir/',\n"
" 'contents': []\n"
"}\n"
"]\n"
@@ -1810,12 +1810,12 @@ TEST_F(VFSFromYAMLTest, GetRealPath) {
EXPECT_EQ(RealPath.str(), "/foo");
// File present in YAML pointing to symlink in underlying file system.
- EXPECT_FALSE(FS->getRealPath("/root/bar", RealPath));
+ EXPECT_FALSE(FS->getRealPath("//root/bar", RealPath));
EXPECT_EQ(RealPath.str(), "/symlink");
// Directories should fall back to the underlying file system is possible.
- EXPECT_FALSE(FS->getRealPath("/dir/", RealPath));
- EXPECT_EQ(RealPath.str(), "/dir/");
+ EXPECT_FALSE(FS->getRealPath("//dir/", RealPath));
+ EXPECT_EQ(RealPath.str(), "//dir/");
// Try a non-existing file.
EXPECT_EQ(FS->getRealPath("/non_existing", RealPath),
More information about the llvm-commits
mailing list