Removing any useless file after all tests
This commit is contained in:
parent
75f8db9f5a
commit
e061279654
@ -152,3 +152,15 @@ TEST_CASE("[D] Printing Billy's objects", "[printing]") {
|
|||||||
REQUIRE_NOTHROW(BillyObjects::billy_object_to_string(object));
|
REQUIRE_NOTHROW(BillyObjects::billy_object_to_string(object));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("[Z] Cleaning after all tests", "[cleaning]") {
|
||||||
|
namespace fs = std::filesystem;
|
||||||
|
const auto pwd = is_directory(fs::current_path()) ?
|
||||||
|
fs::directory_iterator(fs::current_path()) :
|
||||||
|
fs::directory_iterator(fs::current_path().root_directory());
|
||||||
|
for (const auto &entry: pwd) {
|
||||||
|
if (entry.is_regular_file() && entry.path().extension() == ".json") {
|
||||||
|
fs::remove(entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user