Skip to content

Commit

Permalink
Add a couple tests to Statement for 100% coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
dougnazar committed Dec 6, 2022
1 parent ad8c0ce commit 95cfae1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Statement_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 95cfae1

Please sign in to comment.