diff options
author | Reid Kleckner <rnk@google.com> | 2019-02-15 20:48:12 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-02-15 20:48:12 +0000 |
commit | e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c (patch) | |
tree | 0132fa0d4960a1dc2e15595490fe73622957df75 /clang/unittests/Basic/FileManagerTest.cpp | |
parent | 63c300cfc1f77b8d4d13e543cb0f1d9185deb6f1 (diff) | |
download | llvm-e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c.zip llvm-e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c.tar.gz llvm-e2bb3121fd4ab5b01f9ec1d2e3e9877db9c6a54c.tar.bz2 |
Revert r354075 "[clang][FileManager] fillRealPathName even if we aren't opening the file"
The new test doesn't pass on Windows.
llvm-svn: 354169
Diffstat (limited to 'clang/unittests/Basic/FileManagerTest.cpp')
-rw-r--r-- | clang/unittests/Basic/FileManagerTest.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index 14c7879..9f05197 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/unittests/Basic/FileManagerTest.cpp @@ -346,18 +346,4 @@ TEST_F(FileManagerTest, getVirtualFileFillsRealPathName) { EXPECT_EQ(file->tryGetRealPathName(), ExpectedResult); } -TEST_F(FileManagerTest, getFileDontOpenRealPath) { - auto statCache = llvm::make_unique<FakeStatCache>(); - statCache->InjectDirectory("/tmp/abc", 42); - SmallString<64> Path("/tmp/abc/foo.cpp"); - statCache->InjectFile(Path.str().str().c_str(), 43); - manager.setStatCache(std::move(statCache)); - - const FileEntry *file = manager.getFile(Path, /*openFile=*/false); - - ASSERT_TRUE(file != nullptr); - - ASSERT_EQ(file->tryGetRealPathName(), Path); -} - } // anonymous namespace |