summaryrefslogtreecommitdiff
path: root/src/Test.lhs
blob: 68f1831c38efabd2c1dd2a680be5c3e9d9d8fb56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Running tests
+++++++++++++

.. class:: nodoc

> import Test.HUnit
> import System.Exit (exitFailure, exitSuccess)
> import Codec.Pesto.Parse (test)
> import Codec.Pesto.Lint (test)
> import Codec.Pesto.Graph (test)

The testcases can be run with ``cabal run pesto-test``. This runs *all*
testcases from all modules and prints a summary.

> main = runTestTT tests >>= \c -> if errors c + failures c > 0 then exitFailure else exitSuccess

> tests = TestList [
> 	  "parse" ~: Codec.Pesto.Parse.test
> 	, "graph" ~: Codec.Pesto.Graph.test
> 	, "lint" ~: Codec.Pesto.Lint.test
> 	]