updated from Atlas

This commit is contained in:
Luciano Ramalho
2021-09-18 13:18:17 -03:00
parent 6527037ae7
commit 3ecfb212c6
6 changed files with 438 additions and 114 deletions

View File

@@ -73,10 +73,10 @@ def test_evaluate(source: str, expected: Optional[Expression]) -> None:
def std_env() -> Environment:
return standard_env()
# tests for each of the cases in evaluate
# tests for cases in evaluate
def test_evaluate_variable() -> None:
env: Environment = dict(x=10)
env = Environment({'x': 10})
source = 'x'
expected = 10
got = evaluate(parse(source), env)
@@ -168,8 +168,6 @@ def test_invocation_user_procedure(std_env: Environment) -> None:
assert got == 22
###################################### for py3.10/lis.py only
def test_define_function(std_env: Environment) -> None:
source = '(define (max a b) (if (>= a b) a b))'
got = evaluate(parse(source), std_env)