parser error handling
This commit is contained in:
parent
fdb861b299
commit
49c67eb028
10 changed files with 119 additions and 72 deletions
|
|
@ -17,4 +17,18 @@ TEST_DEF_STATIC(Basic) {
|
|||
delete res.scope;
|
||||
}
|
||||
|
||||
TEST_DEF(Parser) { testBasic(); }
|
||||
TEST_DEF_STATIC(ErrorHandling) {
|
||||
Parser parser;
|
||||
|
||||
String stream = "var i = true; print (i + 1) * 10; invalidCharacter ";
|
||||
auto res = parser.parse(stream);
|
||||
|
||||
TEST(res.isError);
|
||||
|
||||
delete res.scope;
|
||||
}
|
||||
|
||||
TEST_DEF(Parser) {
|
||||
testBasic();
|
||||
testErrorHandling();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue