diff --git a/Unit testing/billy_objects_tests.cpp b/Unit testing/billy_objects_tests.cpp index c19d918..77e24df 100644 --- a/Unit testing/billy_objects_tests.cpp +++ b/Unit testing/billy_objects_tests.cpp @@ -152,3 +152,15 @@ TEST_CASE("[D] Printing Billy's objects", "[printing]") { 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); + } + } +}