summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TestAufgabeFFP7.hs22
1 files changed, 21 insertions, 1 deletions
diff --git a/TestAufgabeFFP7.hs b/TestAufgabeFFP7.hs
index 1262c23..116a445 100644
--- a/TestAufgabeFFP7.hs
+++ b/TestAufgabeFFP7.hs
@@ -3,16 +3,36 @@ module Main where
3import Test.HUnit 3import Test.HUnit
4import Control.Monad 4import Control.Monad
5import AufgabeFFP7 5import AufgabeFFP7
6import Test.QuickCheck
7import System.IO.Unsafe
6 8
9{--
7cases1 = TestLabel "TODO" $ TestList [ 10cases1 = TestLabel "TODO" $ TestList [
8 TestCase $ assertEqual "TODO" (result) (call) 11 TestCase $ assertEqual "TODO" (result) (call)
9 ... 12 ...
10 ] 13 ]
14--}
15
16--------------------------------------------------------------------------------
17
18cases2 = TestLabel "ssfn/minfree" $ TestList [
19 TestCase $ assertEqual "ssfn1" (5) (ssfn [0,1,2,3,4,6,7,8,9]),
20 TestCase $ assertEqual "minfree1" (5) (minfree [0,1,2,3,4,6,7,8,9]),
21 TestCase $ assertEqual "ssfn2" (0) (ssfn [1,2,3,4,5,6,7,8,9]),
22 TestCase $ assertEqual "minfree2" (0) (minfree [1,2,3,4,5,6,7,8,9]),
23 TestCase $ assertEqual "ssfn/minfree"
24 (ssfn (filter (/=499) [0..520]))
25 (minfree (filter (/=499) [0..520])),
26 TestCase $ assertEqual "quickCheck1" ()
27 (unsafePerformIO (quickCheck prop_ssfn_eq_minfree_a)),
28 TestCase $ assertEqual "quickCheck2" ()
29 (unsafePerformIO (quickCheck prop_ssfn_eq_minfree_b))
30 ]
11 31
12-------------------------------------------------------------------------------- 32--------------------------------------------------------------------------------
13 33
14tests :: [Test] 34tests :: [Test]
15tests = [cases1, ...] 35tests = [cases2]
16 36
17main = do 37main = do
18 forM tests $ \test -> 38 forM tests $ \test ->