diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-24 13:06:07 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-02-24 13:09:28 +0000 |
commit | ab47c39c82abee7f0e0cff981dc352fdc310a6fe (patch) | |
tree | 238979d93b5c4c810c130367fcaccdfacf420b9b /libsqlitepp/sqlite-mock.cpp | |
parent | Don't rely on libdbppcore's columns (diff) | |
download | libdbpp-sqlite-ab47c39c82abee7f0e0cff981dc352fdc310a6fe.tar.bz2 libdbpp-sqlite-ab47c39c82abee7f0e0cff981dc352fdc310a6fe.tar.xz libdbpp-sqlite-ab47c39c82abee7f0e0cff981dc352fdc310a6fe.zip |
Bring up-to-date with libdbpp.
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 } |