1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
module Main where
import Test.HUnit
import Control.Monad
import Data.Array
import AufgabeFFP5
cases1 = TestLabel "mas" $ TestList [
TestCase $ assertEqual "exercise example"
12
(mas $ array (1,9) [(1,3),(2,(-5)),(3,0),(4,9),(5,2),(6,(-1)),(7,2),(8,(-5)),(9,1)]),
TestCase $ assertEqual "short list"
21
(mas $ array (1,6) [(1, (-3)), (2, 1), (3, 10), (4, (-5)), (5, 8), (6, 7)])
]
tests :: [Test]
tests = [cases1]
main = do
forM tests $ \test ->
runTestTT test
|