diff --git a/test/python/flowmetal/test_syntax_analyzer.py b/test/python/flowmetal/test_syntax_analyzer.py index 29c80c0..4ab830b 100644 --- a/test/python/flowmetal/test_syntax_analyzer.py +++ b/test/python/flowmetal/test_syntax_analyzer.py @@ -33,17 +33,17 @@ def test_analyze_constants(txt, exprtype): assert isinstance(a.analyzes(txt), exprtype) -@pytest.mark.parametrize('txt, exprtype, rettype', [ - ('()', a.ListExpr, None), - ('(list)', a.ListExpr, None), - ('(list 1)', a.ListExpr, a.BuiltinType.INTEGER), - ('(do 1)', a.DoExpr, a.BuiltinType.INTEGER), - ('(do foo bar 1)', a.DoExpr, a.BuiltinType.INTEGER), - ('(let [a 1] 1)', a.LetExpr, a.BuiltinType.INTEGER), - ('(fn [] 1)', a.FnExpr, a.BuiltinType.INTEGER), - ('(fn [] ⊢ integer? x)', a.FnExpr, p.SymbolToken('integer?', None, None)), +@pytest.mark.parametrize('txt', [ + '()', + '(list)', + '(list 1)', + '(do 1)', + '(do foo bar 1)', + '(let [a 1, b 2] 1)', + '(fn [] 1)', + '(fn [] ⊢ integer? x)', + '(fn [] x |- integer?)', ]) -def test_analyze_rettype(txt, exprtype, rettype): +def test_analyze(txt): """Make sure that do exprs work.""" - assert isinstance(a.analyzes(txt), exprtype) - assert a.analyzes(txt).type == rettype + assert a.analyzes(txt)