diff options
Diffstat (limited to 'libsqlitepp/sqlite-mock.cpp')
-rw-r--r-- | libsqlitepp/sqlite-mock.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libsqlitepp/sqlite-mock.cpp b/libsqlitepp/sqlite-mock.cpp index 7a18b87..510b209 100644 --- a/libsqlitepp/sqlite-mock.cpp +++ b/libsqlitepp/sqlite-mock.cpp @@ -1,20 +1,19 @@ #include "sqlite-mock.h" #include "sqlite-connection.h" #include <boost/lexical_cast.hpp> -#include <boost/filesystem/operations.hpp> NAMEDFACTORY("sqlite", SQLite::Mock, DB::MockDatabaseFactory); namespace SQLite { -Mock::Mock(const std::string & root, const std::string & name, const std::vector<boost::filesystem::path> & ss) : - testDbPath(boost::filesystem::path(root) / name / boost::lexical_cast<std::string>(getpid()) / boost::lexical_cast<std::string>(++DB::MockDatabase::mocked)) +Mock::Mock(const std::string & root, const std::string & name, const std::vector<std::filesystem::path> & ss) : + testDbPath(std::filesystem::path(root) / name / boost::lexical_cast<std::string>(getpid()) / boost::lexical_cast<std::string>(++DB::MockDatabase::mocked)) { CreateNewDatabase(); PlaySchemaScripts(ss); } -Mock::Mock(const std::string & name, const std::vector<boost::filesystem::path> & ss) : +Mock::Mock(const std::string & name, const std::vector<std::filesystem::path> & ss) : Mock("/tmp/sqliteut", name, ss) { } @@ -32,12 +31,12 @@ Mock::~Mock() void Mock::DropDatabase() const { - boost::filesystem::remove(testDbPath); + std::filesystem::remove(testDbPath); } void Mock::CreateNewDatabase() const { - boost::filesystem::create_directories(testDbPath.parent_path()); + std::filesystem::create_directories(testDbPath.parent_path()); openConnection(); // Triggers file creation } |