From ab47c39c82abee7f0e0cff981dc352fdc310a6fe Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 24 Feb 2019 13:06:07 +0000 Subject: Bring up-to-date with libdbpp. --- libsqlitepp/sqlite-mock.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libsqlitepp/sqlite-mock.cpp') 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 -#include NAMEDFACTORY("sqlite", SQLite::Mock, DB::MockDatabaseFactory); namespace SQLite { -Mock::Mock(const std::string & root, const std::string & name, const std::vector & ss) : - testDbPath(boost::filesystem::path(root) / name / boost::lexical_cast(getpid()) / boost::lexical_cast(++DB::MockDatabase::mocked)) +Mock::Mock(const std::string & root, const std::string & name, const std::vector & ss) : + testDbPath(std::filesystem::path(root) / name / boost::lexical_cast(getpid()) / boost::lexical_cast(++DB::MockDatabase::mocked)) { CreateNewDatabase(); PlaySchemaScripts(ss); } -Mock::Mock(const std::string & name, const std::vector & ss) : +Mock::Mock(const std::string & name, const std::vector & 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 } -- cgit v1.2.3