diff options
Diffstat (limited to 'TestAufgabeFFP5.hs')
| -rw-r--r-- | TestAufgabeFFP5.hs | 22 |
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 @@ | |||
| 1 | module Main where | ||
| 2 | |||
| 3 | import Test.HUnit | ||
| 4 | import Control.Monad | ||
| 5 | import Data.Array | ||
| 6 | import AufgabeFFP5 | ||
| 7 | |||
| 8 | cases1 = 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 | |||
| 17 | tests :: [Test] | ||
| 18 | tests = [cases1] | ||
| 19 | |||
| 20 | main = do | ||
| 21 | forM tests $ \test -> | ||
| 22 | runTestTT test | ||
