summaryrefslogtreecommitdiffstats
path: root/TestAufgabeFFP5.hs
diff options
context:
space:
mode:
Diffstat (limited to 'TestAufgabeFFP5.hs')
-rw-r--r--TestAufgabeFFP5.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/TestAufgabeFFP5.hs b/TestAufgabeFFP5.hs
new file mode 100644
index 0000000..03cd00b
--- /dev/null
+++ b/TestAufgabeFFP5.hs
@@ -0,0 +1,22 @@
1module Main where
2
3import Test.HUnit
4import Control.Monad
5import Data.Array
6import AufgabeFFP5
7
8cases1 = TestLabel "mas" $ TestList [
9 TestCase $ assertEqual "exercise example"
10 12
11 (mas $ array (1,9) [(1,3),(2,(-5)),(3,0),(4,9),(5,2),(6,(-1)),(7,2),(8,(-5)),(9,1)]),
12 TestCase $ assertEqual "short list"
13 21
14 (mas $ array (1,6) [(1, (-3)), (2, 1), (3, 10), (4, (-5)), (5, 8), (6, 7)])
15 ]
16
17tests :: [Test]
18tests = [cases1]
19
20main = do
21 forM tests $ \test ->
22 runTestTT test