Test lexing empty null string returns EOF
This commit is contained in:
parent
3158e51059
commit
c0c3353fd7
@ -60,4 +60,7 @@ unittest
|
|||||||
assert(lexer.lex_token() == LT(1, 4, 1, Testparser.TOKEN_PLUS));
|
assert(lexer.lex_token() == LT(1, 4, 1, Testparser.TOKEN_PLUS));
|
||||||
assert(lexer.lex_token() == LT(1, 6, 3, Testparser.TOKEN_INT));
|
assert(lexer.lex_token() == LT(1, 6, 3, Testparser.TOKEN_INT));
|
||||||
assert(lexer.lex_token() == LT(1, 9, 0, Testparser.TOKEN_EOF));
|
assert(lexer.lex_token() == LT(1, 9, 0, Testparser.TOKEN_EOF));
|
||||||
|
|
||||||
|
lexer = new Testparser.Lexer(null, 0u);
|
||||||
|
assert(lexer.lex_token() == LT(0, 0, 0, Testparser.TOKEN_EOF));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user