Additional tests

This commit is contained in:
2024-12-29 12:22:24 -06:00
committed by James Eversole
parent dbe9cbd6c1
commit 8a2dc2dfcf
4 changed files with 17 additions and 7 deletions

View File

@ -145,6 +145,18 @@ parserTests = testGroup "Parser Tests"
let input = "x = (\\a : a)\nx (t)"
expect = [SFunc "x" [] (SLambda ["a"] (SVar "a")),SApp (SVar "x") TLeaf]
parseTricu input @?= expect
, testCase "Comments 1" $ do
let input = "(t) (t) -- (t)"
expect = [SApp TLeaf TLeaf]
parseTricu input @?= expect
, testCase "Comments 2" $ do
let input = "(t) -- (t) -- (t)"
expect = [TLeaf]
parseTricu input @?= expect
-- , testCase "Comments with no terms" $ do
-- let input = unlines ["-- (t)", "(t t)"]
-- expect = []
-- parseTricu input @?= expect
]
integrationTests :: TestTree