Repository with testcases for all homework assignments for Functional Programming, fall semester 2020 (TU Wien)
There is a PDF
on the courses website
in which Page 3 provides instruction on how to test with cabal.
Just follow those steps and later replace the files TestSuiteXY.hs
with the same files from this repository.
Add a .cabal
(e.g. fprog.cabal) file to your directory with the following contents:
cabal-version: 2.2
name: fprog
version: 0.2.0.0
build-type: Simple
test-suite ffp
type: exitcode-stdio-1.0
main-is: TestSuite5.hs -- TestSuite file
other-modules: Angabe5 -- Angabe File
build-depends: base,
tasty,
tasty-hunit
default-language: Haskell2010
All the files should be in the same directory
You have to change the TestSuite a bit, since we won't use the Main.hs
file.
Change the first line of TestSuiteX.hs
to:
module Main where
and add the following lines:
main :: IO ()
main = defaultMain spec
Now you should be able to run the test with cabal test
This repository is managed by your fellow students , so don't expect full testsuite on the day we get the assignment. However, feel free to contribute your own testcases with a Pull request.