File size: 1,401 Bytes
24e07f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

module Main where
import Test.HUnit

--Program start

--Program end

-- Test cases

test1 :: Test
test1 = TestCase (assertEqual "for (flowerGame 3 2)," 3 (flowerGame 3 2))

test2 :: Test
test2 = TestCase (assertEqual "for (flowerGame 1 1)," 0 (flowerGame 1 1))

test3 :: Test
test3 = TestCase (assertEqual "for (flowerGame 76449 82807)," 3165256171 (flowerGame 76449 82807))

test4 :: Test
test4 = TestCase (assertEqual "for (flowerGame 37149 7947)," 147611551 (flowerGame 37149 7947))

test5 :: Test
test5 = TestCase (assertEqual "for (flowerGame 65876 54651)," 1800094638 (flowerGame 65876 54651))

test6 :: Test
test6 = TestCase (assertEqual "for (flowerGame 83462 43930)," 1833242830 (flowerGame 83462 43930))

test7 :: Test
test7 = TestCase (assertEqual "for (flowerGame 85778 70262)," 3013466918 (flowerGame 85778 70262))

test8 :: Test
test8 = TestCase (assertEqual "for (flowerGame 85146 43396)," 1847497908 (flowerGame 85146 43396))

test9 :: Test
test9 = TestCase (assertEqual "for (flowerGame 31445 22823)," 358834617 (flowerGame 31445 22823))


-- Grouping test cases
tests :: Test
tests = TestList [TestLabel "Test1" test1, TestLabel "Test2" test2, TestLabel "Test3" test3, TestLabel "Test4" test4, TestLabel "Test5" test5, TestLabel "Test6" test6, TestLabel "Test7" test7, TestLabel "Test8" test8, TestLabel "Test9" test9]

-- Running the tests
main :: IO Counts
main = runTestTT tests