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 Mar 5, 2023
1 parent 02410d4 commit 7096f6b
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 7096f6b

Please sign in to comment.