diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-09-26 19:57:25 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-09-26 19:57:25 +0100 |
commit | 5a51b5ff7b0066448197e5bc1de53b1b588ecb04 (patch) | |
tree | 81b6719c7a15f933be94e0beaab22db60351356d | |
parent | Fix typo in macro name (diff) | |
download | libdbpp-5a51b5ff7b0066448197e5bc1de53b1b588ecb04.tar.bz2 libdbpp-5a51b5ff7b0066448197e5bc1de53b1b588ecb04.tar.xz libdbpp-5a51b5ff7b0066448197e5bc1de53b1b588ecb04.zip |
Compat fix
-rw-r--r-- | libdbpp/mockDatabase.cpp | 2 | ||||
-rw-r--r-- | libdbpp/unittests/testConnection.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp index 2d7a211..a0ae7e5 100644 --- a/libdbpp/mockDatabase.cpp +++ b/libdbpp/mockDatabase.cpp @@ -107,7 +107,7 @@ MockDatabase::UpdateStatusTable(DB::Connection * conn, const boost::filesystem:: MockServerDatabase::MockServerDatabase(const std::string & masterdb, const std::string & name, const std::string & type) : MockDatabase(name), - master(DB::ConnectionFactory::create(type, masterdb)), + master(DB::ConnectionFactory::createNew(type, masterdb)), testDbName(stringbf("test_%d_%d", getpid(), ++mocked)) { } diff --git a/libdbpp/unittests/testConnection.cpp b/libdbpp/unittests/testConnection.cpp index a707f2f..e5f7ae7 100644 --- a/libdbpp/unittests/testConnection.cpp +++ b/libdbpp/unittests/testConnection.cpp @@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE( plugins ) BOOST_AUTO_TEST_CASE( create ) { - auto mock = DB::ConnectionFactory::create("MockDb", "doesn't matter"); + auto mock = DB::ConnectionFactory::createNew("MockDb", "doesn't matter"); BOOST_REQUIRE(mock); // MockDb is fake, just returns nullptr, but the call should otherwise succeed. BOOST_REQUIRE(!mock->newModifyCommand("")); @@ -59,12 +59,12 @@ BOOST_AUTO_TEST_CASE( create ) BOOST_AUTO_TEST_CASE( resolve ) { - BOOST_REQUIRE_THROW(DB::ConnectionFactory::create("otherdb", "doesn't matter"), AdHoc::LoadLibraryException); + BOOST_REQUIRE_THROW(DB::ConnectionFactory::createNew("otherdb", "doesn't matter"), AdHoc::LoadLibraryException); } BOOST_AUTO_TEST_CASE( parse ) { - auto mock = DB::ConnectionFactory::create("MockDb", "doesn't matter"); + auto mock = DB::ConnectionFactory::createNew("MockDb", "doesn't matter"); std::fstream s((rootDir / "parseTest.sql").string()); BOOST_REQUIRE(s.good()); mock->executeScript(s, rootDir); |