aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/Path.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-31 00:10:25 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-31 00:10:25 +0000
commit107b74c6c36b832924a061db9cc12a8a9428d6a4 (patch)
treec1bb6f47d239c3271a37ce5521932ad2187f4639 /llvm/unittests/Support/Path.cpp
parentc7be519dc004a51cbb2db1ab8c450eec9d2305eb (diff)
downloadllvm-107b74c6c36b832924a061db9cc12a8a9428d6a4.zip
llvm-107b74c6c36b832924a061db9cc12a8a9428d6a4.tar.gz
llvm-107b74c6c36b832924a061db9cc12a8a9428d6a4.tar.bz2
Fix windows' implementation of status when a file doesn't exist.
The unix one was returning no_such_file_or_directory, but the windows one was return success. Update the one one caller that was depending on the old behavior. llvm-svn: 187463
Diffstat (limited to 'llvm/unittests/Support/Path.cpp')
-rw-r--r--llvm/unittests/Support/Path.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index c9a2fb2..6f5992b 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -240,6 +240,10 @@ TEST_F(FileSystemTest, TempFiles) {
ASSERT_NO_ERROR(fs::remove(Twine(TempPath2), TempFileExists));
EXPECT_TRUE(TempFileExists);
+ error_code EC = fs::status(TempPath2.c_str(), B);
+ EXPECT_EQ(EC, errc::no_such_file_or_directory);
+ EXPECT_EQ(B.type(), fs::file_type::file_not_found);
+
// Make sure Temp2 doesn't exist.
ASSERT_NO_ERROR(fs::exists(Twine(TempPath2), TempFileExists));
EXPECT_FALSE(TempFileExists);