From 3e305e46d818a28a9c1cbb814bdc3dd72605d803 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 18 Sep 2021 14:45:42 +0100 Subject: Pass cppcheck and clang-tidy --- libpqpp/unittests/testpq.cpp | 2 ++ 1 file changed, 2 insertions(+) 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()); } } -- cgit v1.2.3