From 7096f6b8107bb99c023b6b2ec8d2a24d64466673 Mon Sep 17 00:00:00 2001 From: Doug Nazar Date: Mon, 5 Dec 2022 20:02:35 -0500 Subject: [PATCH] Add a couple tests to Statement for 100% coverage. --- tests/Statement_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Statement_test.cpp b/tests/Statement_test.cpp index b6b1f01d..2a828d1f 100644 --- a/tests/Statement_test.cpp +++ b/tests/Statement_test.cpp @@ -138,6 +138,7 @@ TEST(Statement, moveConstructor) // Moved statements should throw EXPECT_THROW(query.getColumnIndex("value"), SQLite::Exception); EXPECT_THROW(query.getColumn(index), SQLite::Exception); + EXPECT_THROW(query.getExpandedSQL(), SQLite::Exception); } #endif @@ -309,6 +310,7 @@ TEST(Statement, bindings) insert.bind(3, dbl); EXPECT_EQ(insert.getExpandedSQL(), "INSERT INTO test VALUES (NULL, 'first', -123, 0.123)"); EXPECT_EQ(1, insert.exec()); + EXPECT_EQ(1, insert.getChanges()); EXPECT_EQ(SQLITE_DONE, db.getErrorCode()); // Check the result