diff options
Diffstat (limited to 'libdbpp/unittests')
m--------- | libdbpp/unittests/libdbpp-mysql | 0 | ||||
m--------- | libdbpp/unittests/libdbpp-postgresql | 0 | ||||
-rw-r--r-- | libdbpp/unittests/testParse.cpp | 6 | ||||
-rw-r--r-- | libdbpp/unittests/testUtils.cpp | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql -Subproject f4a4a323588410d083dd9ec1145de922db43f80 +Subproject b8ddecf41c8938136b3f4a081e1b8a98584c240 diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql -Subproject 6b913137275cacde9f938058f961d4cbb64f584 +Subproject 1ca0cd42419656cf4a4b9e37c5f3cfb51ccafbb diff --git a/libdbpp/unittests/testParse.cpp b/libdbpp/unittests/testParse.cpp index dcd11d6..d63925b 100644 --- a/libdbpp/unittests/testParse.cpp +++ b/libdbpp/unittests/testParse.cpp @@ -9,7 +9,7 @@ #include <error.h> #include <sqlParse.h> -typedef std::vector<std::string> SQLs; +using SQLs = std::vector<std::string>; BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(SQLs); class RecordingParser : std::fstream, public DB::SqlParse { @@ -20,12 +20,12 @@ class RecordingParser : std::fstream, public DB::SqlParse { { } - void Comment(const std::string & c) const + void Comment(const std::string & c) const override { comments.push_back(c); } - void Statement(const std::string & s) const + void Statement(const std::string & s) const override { executed.push_back(s); } diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp index 092140b..416d359 100644 --- a/libdbpp/unittests/testUtils.cpp +++ b/libdbpp/unittests/testUtils.cpp @@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE( forEachRow ) BOOST_REQUIRE_EQUAL(1, a); BOOST_REQUIRE_CLOSE(4.3, b, 0.001); BOOST_REQUIRE_EQUAL("Some text", c); - BOOST_REQUIRE_EQUAL(boost::posix_time::ptime_from_tm({ 17, 39, 13, 7, 10, 115, 0, 0, 0, 0, 0}), d); + BOOST_REQUIRE_EQUAL(boost::posix_time::ptime_from_tm({ 17, 39, 13, 7, 10, 115, 0, 0, 0, 0, nullptr}), d); BOOST_REQUIRE_EQUAL(boost::posix_time::time_duration(4, 3, 2), e); BOOST_REQUIRE_EQUAL(true, f); }); @@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE( bulkLoadFile ) }); } -typedef boost::mpl::list<std::string, std::string_view, Glib::ustring> StringTypes; +using StringTypes = boost::mpl::list<std::string, std::string_view, Glib::ustring>; BOOST_AUTO_TEST_CASE_TEMPLATE( nullBind, Str, StringTypes ) { auto db = DB::MockDatabase::openConnectionTo("pqmock"); @@ -239,7 +239,7 @@ BOOST_AUTO_TEST_CASE( charStarBindNull ) auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); db->modify("DELETE FROM forEachRow")->execute(); auto ins = db->modify("INSERT INTO forEachRow(a, c) VALUES(?, ?)"); - char * cs = NULL; + char * cs = nullptr; char * cs2 = strdup("a thing"); ins->bindParamS(0, cs); ins->bindParamS(1, cs2); @@ -276,7 +276,7 @@ BOOST_AUTO_TEST_CASE( bindIntPtr ) auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); db->modify("DELETE FROM forEachRow")->execute(); auto ins = db->modify("INSERT INTO forEachRow(a, b) VALUES(?, ?)"); - int * is = NULL; + int * is = nullptr; int * is2 = new int(53); ins->bindParamI(0, is); ins->bindParamI(1, is2); |