mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Some more unit tests for Statement
This commit is contained in:
parent
acc894c1d2
commit
384fab402a
@ -32,8 +32,17 @@ TEST(Statement, exec) {
|
||||
SQLite::Statement query(db, "SELECT * FROM test");
|
||||
EXPECT_STREQ("SELECT * FROM test", query.getQuery().c_str());
|
||||
EXPECT_EQ(2, query.getColumnCount ());
|
||||
|
||||
|
||||
EXPECT_EQ(false, query.isOk());
|
||||
EXPECT_EQ(false, query.isDone());
|
||||
EXPECT_THROW(query.isColumnNull(-1), SQLite::Exception);
|
||||
EXPECT_THROW(query.isColumnNull(0), SQLite::Exception);
|
||||
EXPECT_THROW(query.isColumnNull(1), SQLite::Exception);
|
||||
EXPECT_THROW(query.isColumnNull(2), SQLite::Exception);
|
||||
EXPECT_THROW(query.getColumn(-1), SQLite::Exception);
|
||||
EXPECT_THROW(query.getColumn(0), SQLite::Exception);
|
||||
EXPECT_THROW(query.getColumn(1), SQLite::Exception);
|
||||
EXPECT_THROW(query.getColumn(2), SQLite::Exception);
|
||||
query.get
|
||||
} // Close DB test.db3
|
||||
remove("test.db3");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user