diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-31 00:10:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-31 00:10:25 +0000 |
commit | 9ce8b2818d0c143fd58f4772d2002a15653079dd (patch) | |
tree | a5f87d57bacd9e521b7a5ea12c79e6bc3d76c877 /unittests | |
parent | 605b3427a9423c1e291a9e9ab94fd7202ca864ae (diff) | |
download | external_llvm-9ce8b2818d0c143fd58f4772d2002a15653079dd.zip external_llvm-9ce8b2818d0c143fd58f4772d2002a15653079dd.tar.gz external_llvm-9ce8b2818d0c143fd58f4772d2002a15653079dd.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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Support/Path.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Support/Path.cpp b/unittests/Support/Path.cpp index c9a2fb2..6f5992b 100644 --- a/unittests/Support/Path.cpp +++ b/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); |