From 5dd91c7b80443c1f0e747088159c4d8b78d1856d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 24 Dec 2015 04:13:24 +0000 Subject: SQLite files prefixed with sqlite- --- libsqlitepp/mock.cpp | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 libsqlitepp/mock.cpp (limited to 'libsqlitepp/mock.cpp') diff --git a/libsqlitepp/mock.cpp b/libsqlitepp/mock.cpp deleted file mode 100644 index 4748116..0000000 --- a/libsqlitepp/mock.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "mock.h" -#include "connection.h" -#include -#include - -namespace SQLite { - -Mock::Mock(const std::string & name, const std::vector & ss) : - MockDatabase(name), - testDbPath(boost::filesystem::path("/tmp") / "sqliteut" / stringbf("%d", getpid()) / stringbf("%d", ++DB::MockDatabase::mocked)) -{ - CreateNewDatabase(); - PlaySchemaScripts(ss); -} - -DB::Connection * -Mock::openConnection() const -{ - return new Connection(testDbPath.string()); -} - -Mock::~Mock() -{ - DropDatabase(); -} - -void Mock::DropDatabase() const -{ - boost::filesystem::remove(testDbPath); -} - -void Mock::CreateNewDatabase() const -{ - boost::filesystem::create_directories(testDbPath.parent_path()); - delete openConnection(); -} - -} - -- cgit v1.2.3