Fixing tests for new 'for' syntax
This commit is contained in:
parent
05899423df
commit
faf782560c
@ -313,7 +313,7 @@ def test_ast_valid_while():
|
|||||||
|
|
||||||
def test_ast_valid_for():
|
def test_ast_valid_for():
|
||||||
"Make sure AST can compile valid for"
|
"Make sure AST can compile valid for"
|
||||||
can_compile("(for [[a 2]])")
|
can_compile("(for [[a 2]] (print a))")
|
||||||
|
|
||||||
|
|
||||||
def test_ast_invalid_for():
|
def test_ast_invalid_for():
|
||||||
@ -452,14 +452,14 @@ def test_for_compile_error():
|
|||||||
assert(False)
|
assert(False)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
can_compile("(fn [] (for [x]))")
|
can_compile("(fn [] (for [[x]]))")
|
||||||
except HyTypeError as e:
|
except HyTypeError as e:
|
||||||
assert(e.message == "`for' requires an even number of elements in its first argument") # noqa
|
assert(e.message == "`for' requires a body to evaluate")
|
||||||
else:
|
else:
|
||||||
assert(False)
|
assert(False)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
can_compile("(fn [] (for [x xx]))")
|
can_compile("(fn [] (for [[x xx]]))")
|
||||||
except HyTypeError as e:
|
except HyTypeError as e:
|
||||||
assert(e.message == "`for' requires a body to evaluate")
|
assert(e.message == "`for' requires a body to evaluate")
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user