forked from GitHub/gf-core
test case for functionType
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user