Fix lexer for empty input.
This commit is contained in:
parent
077fae50af
commit
3b482c1c73
3 changed files with 17 additions and 2 deletions
|
|
@ -5,6 +5,19 @@
|
|||
|
||||
using namespace testing;
|
||||
|
||||
TEST(SqlLexer, emptyInput)
|
||||
{
|
||||
QString input;
|
||||
SqlLexer lexer(input, LexerState::Null);
|
||||
|
||||
int startpos, length;
|
||||
BasicTokenType tokentype;
|
||||
QString out;
|
||||
lexer.nextBasicToken(startpos, length, tokentype, out);
|
||||
|
||||
ASSERT_THAT(startpos, Eq(0));
|
||||
ASSERT_THAT(tokentype, Eq(BasicTokenType::End));
|
||||
}
|
||||
|
||||
TEST(SqlLexer, lexer)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue