Skip to content

Commit

Permalink
tst_fsutil.cpp: cover as many lines as I can
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebentley15 committed Dec 11, 2019
1 parent f5c5047 commit ac6e097
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/flit_src/tst_fsutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,12 @@ TH_TEST(tst_TempDir_parent_does_not_exist) {
TH_THROWS(flit::TempDir("/parent/does/not/exist"), std::ios_base::failure);
}

TH_TEST(tst_TempDir_directory_already_deleted) {
flit::TempDir temp;
flit::rec_rmdir(temp.name());
// testing that the TempDir destructor does not throw or crash
}

} // end of namespace tst_TempDir

namespace tst_TinyDir {
Expand Down Expand Up @@ -905,7 +911,7 @@ TH_TEST(tst_FdReplace) {
TH_EQUAL("hello world", flit::readfile(t2.file));
}

void tst_FdReplace_nullptr() {
TH_TEST(tst_FdReplace_nullptr) {
flit::FileCloser t1(tmpfile());
flit::FileCloser t2(tmpfile());
TH_THROWS(flit::FdReplace(nullptr, nullptr), std::ios_base::failure);
Expand Down

0 comments on commit ac6e097

Please sign in to comment.