diff options
| Commit | 64c19d760de6d9e0b6845d1c3af0e9fda845b960 (patch) | |
|---|---|---|
| Author | 2020-10-20 18:52:20 +0300 | |
| Committer | 2020-10-20 18:53:54 +0300 | |
| Files | 5e8467a0bc24821e3d937d9122631155eb461fce /JSImpl/test/LexerTests.cpp | |
| IPL-64c19d760de6d9e0b6845d1c3af0e9fda845b960.tar IPL-64c19d760de6d9e0b6845d1c3af0e9fda845b960.tar.gz IPL-64c19d760de6d9e0b6845d1c3af0e9fda845b960.zip | ||
| Parent | ce708c7fbb18197ffd7da72766d3285bc73d7fad (diff) | |
Now lexer returns error when meet invalid token.
1 files changed, 7 insertions, 0 deletions
| -rw-r--r-- | JSImpl/test/LexerTests.cpp | 7 |
diff --git a/JSImpl/test/LexerTests.cpp b/JSImpl/test/LexerTests.cpp index a1a25d3..965730e 100644 --- a/JSImpl/test/LexerTests.cpp +++ b/JSImpl/test/LexerTests.cpp @@ -212,3 +212,10 @@ TEST(Lexer, CommentError) res.Error.Column == 3); } +TEST(Lexer, UnexpectedToken) +{ + auto res = Tokenize("a#4"); + ASSERT_TRUE(!res.IsSuccessful && + res.Error.Column == 1); +} + |
