summaryrefslogtreecommitdiff
path: root/libpqpp/unittests
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:45:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:45:42 +0100
commit3e305e46d818a28a9c1cbb814bdc3dd72605d803 (patch)
treec911a51d9c39ed220b53a1bb2f1f3ff65d5b7431 /libpqpp/unittests
parentAdd JT recommended warnings (diff)
downloadlibdbpp-postgresql-3e305e46d818a28a9c1cbb814bdc3dd72605d803.tar.bz2
libdbpp-postgresql-3e305e46d818a28a9c1cbb814bdc3dd72605d803.tar.xz
libdbpp-postgresql-3e305e46d818a28a9c1cbb814bdc3dd72605d803.zip
Pass cppcheck and clang-tidy
Diffstat (limited to 'libpqpp/unittests')
-rw-r--r--libpqpp/unittests/testpq.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpqpp/unittests/testpq.cpp b/libpqpp/unittests/testpq.cpp
index 6b86814..2314fb9 100644
--- a/libpqpp/unittests/testpq.cpp
+++ b/libpqpp/unittests/testpq.cpp
@@ -78,6 +78,7 @@ BOOST_AUTO_TEST_CASE(bindAndSend)
mod->execute();
mod = rw->modify("DELETE FROM test WHERE string = '?'");
BOOST_REQUIRE_THROW(mod->execute(false), DB::NoRowsAffected);
+ // cppcheck-suppress assertWithSideEffect
BOOST_REQUIRE_EQUAL(0, mod->execute(true));
}
@@ -205,6 +206,7 @@ BOOST_AUTO_TEST_CASE(insertId)
auto ins = ro->modify("INSERT INTO idtest(foo) VALUES(1)");
for (int x = 1; x < 4; x++) {
ins->execute();
+ // cppcheck-suppress assertWithSideEffect
BOOST_REQUIRE_EQUAL(x, ro->insertId());
}
}