From fef3df7f64e2383aae2601cfe963f7c2939a79c8 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Sat, 18 Jul 2020 21:02:03 -0600 Subject: [PATCH] Test fix: most exprs no longer have types --- test/python/flowmetal/test_syntax_analyzer.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) 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)