test case for functionType

This commit is contained in:
krangelov
2021-08-12 07:53:55 +02:00
parent 2c1700776e
commit 4abe7836e0

View File

@@ -9,4 +9,10 @@ main = do
,TestCase (assertEqual "abstract functions" ["c","s","z"] (functions gr))
,TestCase (assertEqual "abstract functions by cat 1" ["s","z"] (functionsByCat gr "N"))
,TestCase (assertEqual "abstract functions by cat 2" ["c"] (functionsByCat gr "S"))
,TestCase (assertBool "type of z" (eqJust (readType "N") (functionType gr "z")))
,TestCase (assertBool "type of s" (eqJust (readType "N->N") (functionType gr "s")))
,TestCase (assertBool "type of c" (eqJust (readType "N->S") (functionType gr "c")))
]
eqJust (Just x) (Just y) = x == y
eqJust _ _ = False