mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 04:22:41 +00:00
added tests for for loop
This commit is contained in:
parent
fdf392b53f
commit
461225977f
1 changed files with 23 additions and 7 deletions
30
lox.t/run.t
30
lox.t/run.t
|
|
@ -415,19 +415,33 @@ $ mlox for/return_inside.lox
|
||||||
|
|
||||||
|
|
||||||
file for/scope.lox
|
file for/scope.lox
|
||||||
$ mlox for/scope.lox
|
$ mlox for/scope.lox
|
||||||
|
0
|
||||||
|
-1
|
||||||
|
after
|
||||||
|
0
|
||||||
|
|
||||||
|
|
||||||
file for/statement_condition.lox
|
file for/statement_condition.lox
|
||||||
$ mlox for/statement_condition.lox
|
$ mlox for/statement_condition.lox
|
||||||
|
found 2 ParserErrors:
|
||||||
|
ParserError at line 3, column 16: Expected valid expression, got LeftBrace instead
|
||||||
|
ParserError at line 3, column 29: Expected Semicolon, but got RightParen
|
||||||
|
[1]
|
||||||
|
|
||||||
|
|
||||||
file for/statement_increment.lox
|
file for/statement_increment.lox
|
||||||
$ mlox for/statement_increment.lox
|
$ mlox for/statement_increment.lox
|
||||||
|
found 1 ParserError:
|
||||||
|
ParserError at line 2, column 23: Expected valid expression, got LeftBrace instead
|
||||||
|
[1]
|
||||||
|
|
||||||
file for/statement_initializer.lox
|
file for/statement_initializer.lox
|
||||||
$ mlox for/statement_initializer.lox
|
$ mlox for/statement_initializer.lox
|
||||||
|
found 2 ParserErrors:
|
||||||
|
ParserError at line 3, column 5: Expected valid expression, got LeftBrace instead
|
||||||
|
ParserError at line 3, column 25: Expected Semicolon, but got RightParen
|
||||||
|
[1]
|
||||||
|
|
||||||
|
|
||||||
file for/syntax.lox
|
file for/syntax.lox
|
||||||
|
|
@ -435,8 +449,10 @@ $ mlox for/syntax.lox
|
||||||
|
|
||||||
|
|
||||||
file for/var_in_body.lox
|
file for/var_in_body.lox
|
||||||
$ mlox for/var_in_body.lox
|
$ mlox for/var_in_body.lox
|
||||||
|
found 1 ParserError:
|
||||||
|
ParserError at line 2, column 9: Expected valid expression, got Var instead
|
||||||
|
[1]
|
||||||
|
|
||||||
file function/body_must_be_block.lox
|
file function/body_must_be_block.lox
|
||||||
$ mlox function/body_must_be_block.lox
|
$ mlox function/body_must_be_block.lox
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue