diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-10 20:36:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-10 20:36:42 +0000 |
commit | 78dcc03c3791097ebefa7590269329abe616b26d (patch) | |
tree | b296216520a8dafe30cc72e21b25e3aa523f2e19 /llvm/unittests/Support/FileOutputBufferTest.cpp | |
parent | bccb4fdd059e99c4c14d50d643aea022e285c4cf (diff) | |
download | llvm-78dcc03c3791097ebefa7590269329abe616b26d.zip llvm-78dcc03c3791097ebefa7590269329abe616b26d.tar.gz llvm-78dcc03c3791097ebefa7590269329abe616b26d.tar.bz2 |
Remove remove_all. A compiler has no need for recursively deleting a directory.
llvm-svn: 198955
Diffstat (limited to 'llvm/unittests/Support/FileOutputBufferTest.cpp')
-rw-r--r-- | llvm/unittests/Support/FileOutputBufferTest.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/unittests/Support/FileOutputBufferTest.cpp b/llvm/unittests/Support/FileOutputBufferTest.cpp index 5e87319..b81bdb5 100644 --- a/llvm/unittests/Support/FileOutputBufferTest.cpp +++ b/llvm/unittests/Support/FileOutputBufferTest.cpp @@ -56,6 +56,7 @@ TEST(FileOutputBuffer, Test) { uint64_t File1Size; ASSERT_NO_ERROR(fs::file_size(Twine(File1), File1Size)); ASSERT_EQ(File1Size, 8192ULL); + ASSERT_NO_ERROR(fs::remove(File1.str())); // TEST 2: Verify abort case. SmallString<128> File2(TestDirectory); @@ -71,6 +72,7 @@ TEST(FileOutputBuffer, Test) { bool Exists = false; ASSERT_NO_ERROR(fs::exists(Twine(File2), Exists)); EXPECT_FALSE(Exists); + ASSERT_NO_ERROR(fs::remove(File2.str())); // TEST 3: Verify sizing down case. SmallString<128> File3(TestDirectory); @@ -94,6 +96,7 @@ TEST(FileOutputBuffer, Test) { uint64_t File3Size; ASSERT_NO_ERROR(fs::file_size(Twine(File3), File3Size)); ASSERT_EQ(File3Size, 5000ULL); + ASSERT_NO_ERROR(fs::remove(File3.str())); // TEST 4: Verify file can be made executable. SmallString<128> File4(TestDirectory); @@ -112,9 +115,9 @@ TEST(FileOutputBuffer, Test) { ASSERT_NO_ERROR(fs::status(Twine(File4), Status)); bool IsExecutable = (Status.permissions() & fs::owner_exe); EXPECT_TRUE(IsExecutable); + ASSERT_NO_ERROR(fs::remove(File4.str())); // Clean up. - uint32_t RemovedCount; - ASSERT_NO_ERROR(fs::remove_all(TestDirectory.str(), RemovedCount)); + ASSERT_NO_ERROR(fs::remove(TestDirectory.str())); } } // anonymous namespace |