summaryrefslogtreecommitdiffstats
path: root/TestAufgabeFFP1.hs
blob: 1380c17c5915bf182b8f9b9c9e97402ea9ee04b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module Main where

import Test.HUnit
import Control.Monad
import AufgabeFFP1

assertBoolF :: String -> Bool -> Assertion
assertBoolF msg b =  when b (assertFailure msg)

-------------------------------------------------------------------------------

pof2s1 :: Test
pof2s1 = TestCase (assertEqual "pof2s" [1,2,4,8,16,32,64,128,256,512] (take 10 pof2s))

pof2sTests = TestList [pof2s1]

-------------------------------------------------------------------------------

tests :: [Test]
tests = [pof2s1]

main = do
  forM tests $ \test ->
    runTestTT test