check there are no unexpected parser errors in tests

This commit is contained in:
eelke 2022-04-03 12:50:08 +02:00
parent a0ba9b894f
commit 81f27a6a18

View file

@ -16,6 +16,7 @@ TEST(NewSqlParser, statementList)
ASSERT_TRUE(program != nullptr); ASSERT_TRUE(program != nullptr);
ASSERT_EQ(2, program->Count()); ASSERT_EQ(2, program->Count());
ASSERT_EQ(0, parser.errorCount());
} }
TEST(NewSqlParser, missingSemi) TEST(NewSqlParser, missingSemi)
@ -35,6 +36,7 @@ TEST(NewSqlParser, selectList)
ASSERT_TRUE(program != nullptr); ASSERT_TRUE(program != nullptr);
ASSERT_EQ(1, program->Count()); ASSERT_EQ(1, program->Count());
ASSERT_EQ(0, parser.errorCount());
SelectStatement &s = dynamic_cast<SelectStatement&>(program->Get(0)); SelectStatement &s = dynamic_cast<SelectStatement&>(program->Get(0));
SelectList* sl = s.GetSelectList(); SelectList* sl = s.GetSelectList();