blob: 400192e44fb824130a4e16986e0ab37eeefa324e (
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 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
> 	]
 |