diff options
Diffstat (limited to 'TestAufgabeFFP1.hs')
| -rw-r--r-- | TestAufgabeFFP1.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/TestAufgabeFFP1.hs b/TestAufgabeFFP1.hs new file mode 100644 index 0000000..1380c17 --- /dev/null +++ b/TestAufgabeFFP1.hs | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | module Main where | ||
| 2 | |||
| 3 | import Test.HUnit | ||
| 4 | import Control.Monad | ||
| 5 | import AufgabeFFP1 | ||
| 6 | |||
| 7 | assertBoolF :: String -> Bool -> Assertion | ||
| 8 | assertBoolF msg b = when b (assertFailure msg) | ||
| 9 | |||
| 10 | ------------------------------------------------------------------------------- | ||
| 11 | |||
| 12 | pof2s1 :: Test | ||
| 13 | pof2s1 = TestCase (assertEqual "pof2s" [1,2,4,8,16,32,64,128,256,512] (take 10 pof2s)) | ||
| 14 | |||
| 15 | pof2sTests = TestList [pof2s1] | ||
| 16 | |||
| 17 | ------------------------------------------------------------------------------- | ||
| 18 | |||
| 19 | tests :: [Test] | ||
| 20 | tests = [pof2s1] | ||
| 21 | |||
| 22 | main = do | ||
| 23 | forM tests $ \test -> | ||
| 24 | runTestTT test | ||
