👩‍🔬 test

This commit is contained in:
2024-09-06 15:51:28 +02:00
parent f7092c81db
commit 6281faf341

View File

@ -103,6 +103,9 @@ tests =
@?= Right (ValInt 5), @?= Right (ValInt 5),
testCase "Apply (fact)" $ testCase "Apply (fact)" $
eval envEmpty (Apply fact (CstInt 5)) @?= Right (ValInt 120), eval envEmpty (Apply fact (CstInt 5)) @?= Right (ValInt 120),
testCase "Apply (order)" $
eval envEmpty (Apply (CstInt 1) (Var "missing"))
@?= Left "Unknown variable: missing",
testCase "Try" $ testCase "Try" $
eval envEmpty (TryCatch (CstInt 0) (CstInt 1)) eval envEmpty (TryCatch (CstInt 0) (CstInt 1))
@?= Right (ValInt 0), @?= Right (ValInt 0),