mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
started a testsuite
This commit is contained in:
@@ -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
|
||||
|
||||
8
src/runtime/haskell/tests/basic.gf
Normal file
8
src/runtime/haskell/tests/basic.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
abstract basic = {
|
||||
|
||||
cat N ;
|
||||
|
||||
fun Z : N ;
|
||||
S : N -> N ;
|
||||
|
||||
}
|
||||
6
src/runtime/haskell/tests/basic.hs
Normal file
6
src/runtime/haskell/tests/basic.hs
Normal 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)))
|
||||
BIN
src/runtime/haskell/tests/basic.pgf
Normal file
BIN
src/runtime/haskell/tests/basic.pgf
Normal file
Binary file not shown.
Reference in New Issue
Block a user