Cleanup temporary test files

This commit is contained in:
Michael Krasnyk
2017-06-25 22:13:52 +02:00
parent 42f3401dd7
commit 383640caaf
3 changed files with 28 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
#ifndef UNIT_TESTS_TEMPORARY_FILE_HPP
#define UNIT_TESTS_TEMPORARY_FILE_HPP
#include <boost/filesystem.hpp>
struct TemporaryFile
{
TemporaryFile() : path(boost::filesystem::unique_path()) {}
~TemporaryFile() { boost::filesystem::remove(path); }
boost::filesystem::path path;
};
#endif // UNIT_TESTS_TEMPORARY_FILE_HPP