@@ -3,90 +3,437 @@ module Tests
7−import Test.Hspec
10+import Test.Tasty
11+import Test.Tasty.HUnit
9−tests :: Spec
13+tests :: TestTree
10−tests = do
14+tests = testGroup "Tests"
11− it "regroup" $ do
15+ [ testGroup "List Monoids"
12− regroup (1 :: Int, (2 :: Int, 3 :: Int)) `shouldBe` (2, 1, 3)
16+ [ testCase "FirstMonoid" $ do
13− regroup ("1", ("2", "3")) `shouldBe` ("2", "1", "3")
17+ let getFirst = destructFirstMonoid . fold . fmap constructFirstMonoid
14− regroup (True, (False, True)) `shouldBe` (False, True, True)
18+ getFirst [1 :: Int, 2, 3] @=? Just 1
15− it "safeHead" $ do
19+ getFirst [] @=? (Nothing :: Maybe ())
16− safeHead [1 :: Int, 2, 3] `shouldBe` Just 1
20+ getFirst [True, False] @=? Just True
17− safeHead [1294 :: Int, 2, 3, 4, 5, 6, 7, 7, 9] `shouldBe` Just 1294
21+ getFirst [True, True, False] @=? Just True
18− safeHead [] `shouldBe` (Nothing :: Maybe ())
22+ getFirst [1 .. 1000] @=? Just (1 :: Int)
19− it "safeLast" $ do
23+ getFirst [100 .. 1000] @=? Just (100 :: Int)
20− safeLast [1 :: Int, 2, 3] `shouldBe` Just 3
24+ getFirst [6, 2, 7, 398, 1984, 383, -1020] @=? Just (6 :: Int)
21− safeLast [1294 :: Int, 2, 3, 4, 5, 6, 7, 7, 9] `shouldBe` Just 9
25+ , testCase "LastMonoid" $ do
22− safeLast [] `shouldBe` (Nothing :: Maybe ())
26+ let getLast = destructLastMonoid . fold . fmap constructLastMonoid
23− it "withoutLast" $ do
27+ getLast [1 :: Int, 2, 3] @=? Just 3
24− withoutLast [1 :: Int, 2, 3] `shouldBe` [1, 2]
28+ getLast [] @=? (Nothing :: Maybe ())
25− withoutLast [1294 :: Int, 2, 3, 4, 5, 6, 7, 7, 9] `shouldBe` [1294, 2, 3, 4, 5, 6, 7, 7]
29+ getLast [1 .. 1000] @=? Just (1000 :: Int)
26− withoutLast [] `shouldBe` ([] :: [()])
30+ getLast [100 .. 10000] @=? Just (10000 :: Int)
27− it "indexed" $ do
31+ getLast [6, 2, 7, 398, 1984, 383, -1020, 498] @=? Just (498 :: Int)
28− indexed 2 [1 :: Int, 2, 3] `shouldBe` Just 3
32+ getLast [True, False] @=? Just False
29− indexed 0 [1294 :: Int, 2, 3, 4, 5, 6, 7, 7, 9] `shouldBe` Just 1294
33+ getLast [True, True, False] @=? Just False
30− indexed 1080 [1294 :: Int, 2, 3, 4, 5, 6, 7, 7, 9] `shouldBe` Nothing
34+ getLast [True, True, False, True] @=? Just True
31− indexed 4 [1294 :: Int, 2, 3, 4, 5, 6, 7, 7, 9] `shouldBe` Just 5
35+ ]
32− indexed 0 [] `shouldBe` (Nothing :: Maybe ())
36+ , testGroup "Todo List" $
33− indexed 297 [] `shouldBe` (Nothing :: Maybe ())
37+ let createTasks :: [(String, Priority)] -> MyTaskManager
34− it "alternating" $ do
38+ createTasks = foldl (\t (a, b) -> createTask a b t) emptyTaskManager
35− take 10 alternating `shouldBe` [1, -2, 3, -4, 5, -6, 7, -8, 9, -10]
39+ getPrioritySets :: MyTaskManager -> [[(Completion, String)]]
36− alternating !! 42 `shouldBe` 43
40+ getPrioritySets =
37− alternating !! 69 `shouldBe` -70
41+ fmap (sort . fmap (\(a, _, b) -> (a, b)))
38− alternating !! 420 `shouldBe` 421
42+ . groupBy ((==) `on` (\(_, p, _) -> p))
39− it "leftmost" $ do
43+ . getPriorityList
40− (leftmost . constructTree) [1 :: Int, 2, 3, 4, 5] `shouldBe` Just 4
44+ in
41− (leftmost . constructTree) [1 :: Int, 2, 3, 4] `shouldBe` Just 4
45+ [ testCase "emptyTaskManager" $
42− (leftmost . constructTree) [1 :: Int, 2, 3, 99, 5] `shouldBe` Just 99
46+ getPriorityList (emptyTaskManager :: MyTaskManager) @=? []
43− (leftmost . constructTree) [8 :: Int, 7, 6, 5, 4, 1, 2, 3, 4, 5] `shouldBe` Just 3
47+ , testCase "createTask" $ do
44− it "rightmost" $ do
48+ getPrioritySets
45− (rightmost . constructTree) [1 :: Int, 2, 3, 4, 5] `shouldBe` Just 3
49+ ( createTasks
46− (rightmost . constructTree) [1 :: Int, 2, 3, 4] `shouldBe` Just 3
50+ [ ("a", Low),
47− (rightmost . constructTree) [1 :: Int, 2, 99, 5, 5] `shouldBe` Just 99
51+ ("aaa", Medium),
48− (rightmost . constructTree) [8 :: Int, 7, 6, 5, 4, 1, 2, 3, 4, 5] `shouldBe` Just 2
52+ ("AAAAAAAAAA", High)
49− it "treeSum" $ do
53+ ]
50− (treeSum . constructTree) [1, 2, 3, 4, 5] `shouldBe` sum [1, 2, 3, 4, 5]
54+ )
51− (treeSum . constructTree) [1, 2, 3, 4] `shouldBe` sum [1, 2, 3, 4]
55+ @=? [ [(NotCompleted, "AAAAAAAAAA")],
52− (treeSum . constructTree) [1, 2, 3, 5, 99] `shouldBe` sum [1, 2, 3, 5, 99]
56+ [(NotCompleted, "aaa")],
53− (treeSum . constructTree) [8, 7, 6, 5, 4, 1, 2, 3, 4, 5] `shouldBe` sum [8, 7, 6, 5, 4, 1, 2, 3, 4, 5]
57+ [(NotCompleted, "a")]
54− (treeSum . constructTree . take 100) [5 ..] `shouldBe` (sum . take 100) [5 ..]
58+ ]
55− (treeSum . constructTree . take 100) [2 ..] `shouldBe` (sum . take 100) [2 ..]
59+ getPrioritySets
56− it "treeSize" $ do
60+ ( createTasks
57− let test list = treeSize (constructTree list) `shouldBe` fromIntegral (length list)
61+ [ ("a", Low),
58− test $ replicate 11 ()
62+ ("AAAAAAAAAA", High)
59− test $ replicate 16 (8 :: Int)
63+ ]
60− test [5, 2, 5, 7, 7, 3, 2, 7, 7 :: Int]
64+ )
61− it "insert" $ do
65+ @=? [ [(NotCompleted, "AAAAAAAAAA")],
62− constructTree [1 :: Int] `shouldNotBe` constructTree [1, 2]
66+ [(NotCompleted, "a")]
63− constructTree [1 :: Int] `shouldNotBe` constructTree []
67+ ]
64− (insert 3 . insert 1 . insert 2 . constructTree) [] `shouldBe` constructTree [2, 1, 3]
68+ getPrioritySets
65− (insert 71 . insert 65 . insert 56 . insert 54 . insert 45 . insert 35 . insert 15 . insert 5 . constructTree) [50, 30, 60, 10, 55, 40, 70]
69+ ( createTasks
66− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
70+ [ ("a", Low),
67− (insert 71 . insert 54 . insert 45 . insert 35 . insert 15 . insert 65 . insert 56 . insert 5 . constructTree) [50, 30, 60, 10, 55, 40, 70]
71+ ("AAAAAAAAAA", High),
68− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
72+ ("aaa", Medium),
69− (insert 35 . insert 15 . insert 65 . insert 71 . insert 54 . insert 45 . insert 56 . insert 5 . constructTree) [50, 30, 60, 10, 55, 40, 70]
73+ ("oh HaiMark", Medium)
70− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
74+ ]
71− (insert 35 . insert 54 . insert 45 . insert 56 . insert 5 . insert 15 . insert 65 . insert 71 . constructTree) [50, 30, 60, 10, 55, 40, 70]
75+ )
72− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
76+ @=? [ [(NotCompleted, "AAAAAAAAAA")],
73− (insert 56 . insert 5 . insert 15 . insert 65 . insert 35 . insert 54 . insert 45 . insert 71 . constructTree) [50, 30, 60, 10, 55, 40, 70]
77+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
74− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
78+ [(NotCompleted, "a")]
75− (insert 56 . insert 56 . insert 5 . insert 5 . insert 15 . insert 65 . insert 35 . insert 54 . insert 45 . insert 71 . constructTree) [50, 30, 60, 10, 55, 40, 70]
79+ ]
76− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
80+ getPrioritySets
77− it "insertAll" $ do
81+ ( createTasks
78− constructTree [1 :: Int] `shouldNotBe` constructTree [1, 2]
82+ [ ("a", Low),
79− constructTree [1 :: Int] `shouldNotBe` constructTree []
83+ ("AAAAAAAAAA", High),
80− (insertAll [2, 3, 1] . constructTree) [] `shouldBe` constructTree [2, 1, 3]
84+ ("aaa", Medium),
81− (insertAll [71, 65, 56, 54, 45, 35, 15, 5] . constructTree) [50, 30, 60, 10, 55, 40, 70]
85+ ("oh HaiMark", Medium),
82− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
86+ ("OH NO", High)
83− (insertAll [71, 54, 45, 35, 15, 65, 56, 5] . constructTree) [50, 30, 60, 10, 55, 40, 70]
87+ ]
84− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
88+ )
85− (insertAll [35, 15, 65, 71, 54, 45, 56, 5] . constructTree) [50, 30, 60, 10, 55, 40, 70]
89+ @=? [ [(NotCompleted, "AAAAAAAAAA"), (NotCompleted, "OH NO")],
86− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
90+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
87− (insertAll [35, 54, 45, 56, 5, 15, 65, 71] . constructTree) [50, 30, 60, 10, 55, 40, 70]
91+ [(NotCompleted, "a")]
88− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
92+ ]
89− (insertAll [56, 5, 15, 65, 35, 54, 45, 71] . constructTree) [50, 30, 60, 10, 55, 40, 70]
93+ , testCase "toggleTaskCompletion" $ do
90− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
94+ getPrioritySets
91− (insertAll [56, 5, 15, 65, 35, 54, 45, 71, 5, 56, 35] . constructTree) [50, 30, 60, 10, 55, 40, 70]
95+ ( toggleTaskCompletion "AAAAAAAAAA" . createTasks $
92− `shouldBe` constructTree [50, 30, 60, 10, 55, 40, 70, 5, 54, 35, 65, 15, 56, 45, 71]
96+ [ ("a", Low),
97+ ("AAAAAAAAAA", High),
99+ ("oh HaiMark", Medium),
103+ @=? [ [(Completed, "AAAAAAAAAA"), (NotCompleted, "OH NO")],
104+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
105+ [(NotCompleted, "a")]
108+ ( toggleTaskCompletion "AAAAAAAAAA" . toggleTaskCompletion "AAAAAAAAAA" . createTasks $
110+ ("AAAAAAAAAA", High),
112+ ("oh HaiMark", Medium),
116+ @=? [ [(NotCompleted, "AAAAAAAAAA"), (NotCompleted, "OH NO")],
117+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
118+ [(NotCompleted, "a")]
121+ ( toggleTaskCompletion "a"
122+ . toggleTaskCompletion "not here"
123+ . toggleTaskCompletion "AAAAAAAAAA"
126+ ("AAAAAAAAAA", High),
128+ ("oh HaiMark", Medium),
132+ @=? [ [(Completed, "AAAAAAAAAA"), (NotCompleted, "OH NO")],
133+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
136+ , testCase "removeTask" $ do
138+ ( removeTask "AAAAAAAAAA"
141+ ("AAAAAAAAAA", High),
143+ ("oh HaiMark", Medium),
147+ @=? [ [(NotCompleted, "OH NO")],
148+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
149+ [(NotCompleted, "a")]
152+ ( removeTask "AAAAAAAAAA" . removeTask "AAAAAAAAAA"
155+ ("AAAAAAAAAA", High),
157+ ("oh HaiMark", Medium),
161+ @=? [ [(NotCompleted, "OH NO")],
162+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
163+ [(NotCompleted, "a")]
166+ ( removeTask "aaa" . removeTask "oh HaiMark"
167+ . removeTask "AAAAAAAAAA"
168+ . removeTask "AAAAAAAAAA"
171+ ("AAAAAAAAAA", High),
173+ ("oh HaiMark", Medium),
177+ @=? [ [(NotCompleted, "OH NO")],
178+ [(NotCompleted, "a")]
180+ , testCase "modifyPriority" $ do
182+ ( modifyPriority "aaa" High . createTasks $
184+ ("AAAAAAAAAA", High),
186+ ("oh HaiMark", Medium),
190+ @=? [ [(NotCompleted, "AAAAAAAAAA"), (NotCompleted, "OH NO"), (NotCompleted, "aaa")],
191+ [(NotCompleted, "oh HaiMark")],
192+ [(NotCompleted, "a")]
195+ ( modifyPriority "aaa" High
196+ . toggleTaskCompletion "a"
197+ . modifyPriority "a" High
200+ ("AAAAAAAAAA", High),
202+ ("oh HaiMark", Medium),
206+ @=? [ [ (Completed, "a"),
207+ (NotCompleted, "AAAAAAAAAA"),
208+ (NotCompleted, "OH NO"),
209+ (NotCompleted, "aaa")
211+ [(NotCompleted, "oh HaiMark")]
214+ ( modifyPriority "aaa" High
215+ . modifyPriority "a" High
216+ . modifyPriority "a" High
217+ . modifyPriority "oh HaiMark" High
220+ ("AAAAAAAAAA", High),
222+ ("oh HaiMark", Medium),
226+ @=? [ [ (NotCompleted, "AAAAAAAAAA"),
227+ (NotCompleted, "OH NO"),
228+ (NotCompleted, "a"),
229+ (NotCompleted, "aaa"),
230+ (NotCompleted, "oh HaiMark")
234+ ( modifyPriority "aaa" High
235+ . modifyPriority "a" High
236+ . modifyPriority "ntestCase here sihji" High
237+ . modifyPriority "oh HaiMark" Low
238+ . modifyPriority "a" High
239+ . modifyPriority "oh HaiMark" High
242+ ("AAAAAAAAAA", High),
244+ ("oh HaiMark", Medium),
248+ @=? [ [ (NotCompleted, "AAAAAAAAAA"),
249+ (NotCompleted, "OH NO"),
250+ (NotCompleted, "a"),
251+ (NotCompleted, "aaa")
253+ [(NotCompleted, "oh HaiMark")]
255+ , testCase "renameTask" $ do
257+ ( renameTask "AAAAAAAAAA" "henlo"
260+ ("AAAAAAAAAA", High),
262+ ("oh HaiMark", Medium),
266+ @=? [ [(NotCompleted, "OH NO"), (NotCompleted, "henlo")],
267+ [(NotCompleted, "aaa"), (NotCompleted, "oh HaiMark")],
268+ [(NotCompleted, "a")]
271+ ( renameTask "AAAAAAAAAA" "henlo"
272+ . toggleTaskCompletion "a"
273+ . renameTask "oh HaiMark" "iz task"
276+ ("AAAAAAAAAA", High),
278+ ("oh HaiMark", Medium),
282+ @=? [ [(NotCompleted, "OH NO"), (NotCompleted, "henlo")],
283+ [(NotCompleted, "aaa"), (NotCompleted, "iz task")],
287+ ( renameTask "AAAAAAAAAA" "henlo"
288+ . toggleTaskCompletion "iz task"
289+ . renameTask "oh HaiMark" "iz task"
290+ . renameTask "iz not here" "ajajaj"
293+ ("AAAAAAAAAA", High),
295+ ("oh HaiMark", Medium),
299+ @=? [ [(NotCompleted, "OH NO"), (NotCompleted, "henlo")],
300+ [(Completed, "iz task"), (NotCompleted, "aaa")],
301+ [(NotCompleted, "a")]
304+ , testGroup "Coffee"
305+ [ testCase "HasPrice Coffee" $ do
306+ price (Coffee 2 [OatMilk, Cinnamon]) @=? 2 + price OatMilk + price Cinnamon
307+ price (Coffee 2 [Cinnamon, Cinnamon]) @=? 2 + price Cinnamon + price Cinnamon
308+ price (Coffee 2 []) @=? 2
309+ price (Coffee 2 [Cinnamon, Cream, Cinnamon])
314+ , testCase "chargeCoffee" $ do
315+ chargeCoffee (Coffee 2 [OatMilk, Cinnamon]) (DebitCard 199 69)
316+ @=? Just (DebitCard 112 69)
317+ chargeCoffee (Coffee 2 [OatMilk, Cinnamon]) (DebitCard 87 69)
318+ @=? Just (DebitCard 0 69)
319+ chargeCoffee (Coffee 2 [OatMilk, Cinnamon]) (DebitCard 86 69)
321+ chargeCoffee (Coffee 2 [OatMilk, Cinnamon]) (DebitCard 0 69)
323+ chargeCoffee (Coffee 2 [OatMilk, Cinnamon]) (DebitCard (-2189) 69)
325+ chargeCoffee (Coffee 2 [OatMilk, Cinnamon, WhiteSugar]) (DebitCard 199 69)
326+ @=? Just (DebitCard 97 69)
327+ chargeCoffee (Coffee 2 [WhiteSugar, OatMilk, Cinnamon, WhiteSugar]) (DebitCard 199 69)
328+ @=? Just (DebitCard 82 69)
329+ , let coffee = Coffee 2 [OatMilk, Cinnamon]
330+ in testCase "payForCoffee" $ do
331+ payForCoffee (Customer [DebitCard 199 69] 0) coffee
332+ @=? Just (Card (DebitCard 112 69))
333+ payForCoffee (Customer [DebitCard 86 12, DebitCard 199 69] 2) coffee
334+ @=? Just (Card (DebitCard 112 69))
335+ payForCoffee (Customer [DebitCard (-12) 8, DebitCard 86 12, DebitCard 199 69] 0) coffee
336+ @=? Just (Card (DebitCard 112 69))
337+ payForCoffee (Customer [DebitCard 87 8, DebitCard 111 12, DebitCard 199 69] 0) coffee
338+ @=? Just (Card (DebitCard 0 8))
339+ payForCoffee (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 82 69] 0) coffee
341+ payForCoffee (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 82 69] 87) coffee
343+ payForCoffee (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 81 69] 86) coffee
345+ , testCase "applyPayment" $ do
346+ applyPayment (Customer [DebitCard 199 69] 0) (Card (DebitCard 112 69))
347+ @=? Customer [DebitCard 112 69] 0
348+ applyPayment (Customer [DebitCard 111 12, DebitCard 199 69] 2) (Card (DebitCard 112 69))
349+ @=? Customer [DebitCard 111 12, DebitCard 112 69] 2
350+ applyPayment (Customer [DebitCard (-12) 8, DebitCard 111 12, DebitCard 199 69] 0) (Card (DebitCard 112 69))
351+ @=? Customer [DebitCard (-12) 8, DebitCard 111 12, DebitCard 112 69] 0
352+ applyPayment (Customer [DebitCard 112 8, DebitCard 111 12, DebitCard 199 69] 0) (Card (DebitCard 0 8))
353+ @=? Customer [DebitCard 0 8, DebitCard 111 12, DebitCard 199 69] 0
354+ applyPayment (Customer [DebitCard 111 8, DebitCard 111 12, DebitCard 110 69] 112) (Cash 0)
355+ @=? Customer [DebitCard 111 8, DebitCard 111 12, DebitCard 110 69] 0
356+ applyPayment (Customer [DebitCard 111 8, DebitCard 111 12, DebitCard 110 69] 112) (Card (DebitCard 0 13))
357+ @=? Customer [DebitCard 111 8, DebitCard 111 12, DebitCard 110 69] 112
358+ , let coffee = Coffee 2 [OatMilk, Cinnamon]
359+ in testCase "buyCoffee" $ do
360+ buyCoffee (Customer [DebitCard 199 69] 0) coffee
361+ @=? Just (Customer [DebitCard 112 69] 0)
362+ buyCoffee (Customer [DebitCard 86 12, DebitCard 199 69] 2) coffee
363+ @=? Just (Customer [DebitCard 86 12, DebitCard 112 69] 2)
364+ buyCoffee (Customer [DebitCard (-12) 8, DebitCard 86 12, DebitCard 199 69] 0) coffee
365+ @=? Just (Customer [DebitCard (-12) 8, DebitCard 86 12, DebitCard 112 69] 0)
366+ buyCoffee (Customer [DebitCard 87 8, DebitCard 86 12, DebitCard 199 69] 0) coffee
367+ @=? Just (Customer [DebitCard 0 8, DebitCard 86 12, DebitCard 199 69] 0)
368+ buyCoffee (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 84 69] 0) coffee
370+ buyCoffee (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 82 69] 87) coffee
371+ @=? Just (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 82 69] 0)
372+ buyCoffee (Customer [DebitCard 86 8, DebitCard 86 12, DebitCard 81 69] 86) coffee
374+ , testCase "saveTheDiabetic" $ do
376+ [ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon],
377+ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon],
378+ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon]
381+ [ Coffee 0 [Cinnamon],
382+ Coffee 0 [Cinnamon],
387+ [ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon, BrownSugar, SoyMilk],
388+ Coffee 0 [WhiteSugar, BrownSugar, WhiteSugar, WhiteSugar, Cinnamon],
389+ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon]
392+ [ Coffee 0 [Cinnamon, SoyMilk],
393+ Coffee 0 [Cinnamon],
398+ [ Coffee 0 [Cinnamon, SoyMilk],
399+ Coffee 0 [Cinnamon],
400+ Coffee 0 [Cinnamon],
404+ [ Coffee 0 [Cinnamon, SoyMilk],
405+ Coffee 0 [Cinnamon],
406+ Coffee 0 [Cinnamon],
415+ , testCase "calculateSugarDanger" $ do
416+ calculateSugarDanger
417+ [ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon],
418+ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon],
419+ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon]
422+ calculateSugarDanger
423+ [ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon, BrownSugar, SoyMilk],
424+ Coffee 0 [WhiteSugar, BrownSugar, WhiteSugar, WhiteSugar, Cinnamon],
425+ Coffee 0 [WhiteSugar, BrownSugar, Cinnamon],
429+ calculateSugarDanger
430+ [ Coffee 0 [Cinnamon, SoyMilk],
431+ Coffee 0 [Cinnamon],
435+ calculateSugarDanger