Additional tests
This commit is contained in:
12
test/Spec.hs
12
test/Spec.hs
@ -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
|
||||
|
Reference in New Issue
Block a user