forked from GitHub/gf-core
extend the abstract syntax API
This commit is contained in:
@@ -3,4 +3,10 @@ import PGF2
|
||||
|
||||
main = do
|
||||
gr <- readPGF "tests/basic.pgf"
|
||||
runTestTTAndExit (TestCase (assertEqual "abstract names" "basic" (abstractName gr)))
|
||||
runTestTTAndExit $
|
||||
TestList [TestCase (assertEqual "abstract names" "basic" (abstractName gr))
|
||||
,TestCase (assertEqual "abstract categories" ["Float","Int","N","S","String"] (categories gr))
|
||||
,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"))
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user