Website Summary Files Commits Branches @commit @diff @stats
path: root / JSImpl / test
diff options
context:
space:
mode:
Commit64c19d760de6d9e0b6845d1c3af0e9fda845b960 (patch)
Author
 martin dobrev <martindobrev0@gmail.com>
2020-10-20 18:52:20 +0300
Committer
 martin dobrev <martindobrev0@gmail.com>
2020-10-20 18:53:54 +0300
Files5e8467a0bc24821e3d937d9122631155eb461fce /JSImpl/test
IPL-64c19d760de6d9e0b6845d1c3af0e9fda845b960.tar
IPL-64c19d760de6d9e0b6845d1c3af0e9fda845b960.tar.gz
IPL-64c19d760de6d9e0b6845d1c3af0e9fda845b960.zip
Parentce708c7fbb18197ffd7da72766d3285bc73d7fad (diff)
Now lexer returns error when meet invalid token.
1 files changed, 7 insertions, 0 deletions
-rw-r--r--JSImpl/test/LexerTests.cpp7
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);
+}
+