summaryrefslogtreecommitdiff
path: root/libpqpp/unittests
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-03-28 17:55:41 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2020-03-28 17:55:41 +0000
commit448720848b383639c37f5f0487efdf8c0f0ed433 (patch)
tree28fb708836b0030a7813d35d3213e6153bbb757c /libpqpp/unittests
parentFixes for tidy (diff)
downloadlibdbpp-postgresql-448720848b383639c37f5f0487efdf8c0f0ed433.tar.bz2
libdbpp-postgresql-448720848b383639c37f5f0487efdf8c0f0ed433.tar.xz
libdbpp-postgresql-448720848b383639c37f5f0487efdf8c0f0ed433.zip
Diffstat (limited to 'libpqpp/unittests')
-rw-r--r--libpqpp/unittests/testpq.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp
index 67ce07a..660a388 100644
--- a/libpqpp/unittests/testpq.cpp
+++ b/libpqpp/unittests/testpq.cpp
@@ -416,7 +416,7 @@ BOOST_AUTO_TEST_CASE( fetchAsBinary )
sel = ro->select("SELECT NULL, now()", opts);
for (const auto & r : sel->as<std::optional<int64_t>, boost::posix_time::ptime>()) {
BOOST_REQUIRE(!r.value<0>());
- BOOST_REQUIRE_THROW(r.value<1>(), DB::ColumnTypeNotSupported);
+ BOOST_REQUIRE_THROW((void)r.value<1>(), DB::ColumnTypeNotSupported);
}
}
@@ -461,9 +461,11 @@ BOOST_AUTO_TEST_SUITE_END();
BOOST_AUTO_TEST_CASE( connfail )
{
- BOOST_REQUIRE_THROW(DB::ConnectionFactory::createNew("postgresql", "host=localhost user=no"), DB::ConnectionError);
+ BOOST_REQUIRE_THROW(
+ (void)DB::ConnectionFactory::createNew("postgresql", "host=localhost user=no"),
+ DB::ConnectionError);
try {
- DB::ConnectionFactory::createNew("postgresql", "host=localhost user=no");
+ (void)DB::ConnectionFactory::createNew("postgresql", "host=localhost user=no");
}
catch (const DB::ConnectionError & e) {
BOOST_REQUIRE(std::string(e.what()).find("\"no\""));