summaryrefslogtreecommitdiffstats
path: root/TestAufgabeFFP1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'TestAufgabeFFP1.hs')
-rw-r--r--TestAufgabeFFP1.hs24
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 @@
1module Main where
2
3import Test.HUnit
4import Control.Monad
5import AufgabeFFP1
6
7assertBoolF :: String -> Bool -> Assertion
8assertBoolF msg b = when b (assertFailure msg)
9
10-------------------------------------------------------------------------------
11
12pof2s1 :: Test
13pof2s1 = TestCase (assertEqual "pof2s" [1,2,4,8,16,32,64,128,256,512] (take 10 pof2s))
14
15pof2sTests = TestList [pof2s1]
16
17-------------------------------------------------------------------------------
18
19tests :: [Test]
20tests = [pof2s1]
21
22main = do
23 forM tests $ \test ->
24 runTestTT test