started a testsuite

This commit is contained in:
krangelov
2021-08-05 20:45:08 +02:00
parent 36e87668e0
commit 87f1e24384
4 changed files with 20 additions and 1 deletions

View File

@@ -25,5 +25,10 @@ library
extra-libraries: pgf
cc-options: -std=c99
default-language: Haskell2010
c-sources: utils.c
test-suite basic
type: exitcode-stdio-1.0
main-is: tests/basic.hs
default-language: Haskell2010
build-depends: base, HUnit, pgf2

View File

@@ -0,0 +1,8 @@
abstract basic = {
cat N ;
fun Z : N ;
S : N -> N ;
}

View File

@@ -0,0 +1,6 @@
import Test.HUnit
import PGF2
main = do
gr <- readPGF "tests/basic.pgf"
runTestTTAndExit (TestCase (assertEqual "abstract names" "basic" (abstractName gr)))

Binary file not shown.