Add DropTableIfExistsStatementTest

This commit is contained in:
Moritz Eyssen 2017-10-12 20:19:59 +02:00
parent 09f821e383
commit aa4dc099a0
1 changed files with 15 additions and 0 deletions

View File

@ -102,6 +102,21 @@ TEST(DropTableStatementTest) {
result, result,
stmt); stmt);
ASSERT_FALSE(stmt->ifExists);
ASSERT_EQ(stmt->type, kDropTable);
ASSERT_NOTNULL(stmt->name);
ASSERT_STREQ(stmt->name, "students");
}
TEST(DropTableIfExistsStatementTest) {
TEST_PARSE_SINGLE_SQL(
"DROP TABLE IF EXISTS students",
kStmtDrop,
DropStatement,
result,
stmt);
ASSERT_TRUE(stmt->ifExists);
ASSERT_EQ(stmt->type, kDropTable); ASSERT_EQ(stmt->type, kDropTable);
ASSERT_NOTNULL(stmt->name); ASSERT_NOTNULL(stmt->name);
ASSERT_STREQ(stmt->name, "students"); ASSERT_STREQ(stmt->name, "students");