on develop help sign in
add bang pattern to expected test result
09dad05Joe Betz
test/Adjustable.hs+3−3
@@ -17,12 +17,12 @@ import Test.Run
17
17
18main :: IO ()
18main :: IO ()
19main = do
19main = do
20− let actions = [ Increment, Update0th, Increment, Swap, Increment ]
20+ let actions = [ Increment, Update0th, Increment, Swap, Increment, Increment ]
21 os <- runAppB testPatchMapWithMove $ map Just actions
21 os <- runAppB testPatchMapWithMove $ map Just actions
22 -- If the final counter value in the adjusted widgets corresponds to the number of times it has
22 -- If the final counter value in the adjusted widgets corresponds to the number of times it has
23 -- been incremented, we know that the networks haven't broken.
23 -- been incremented, we know that the networks haven't broken.
24 let expectedCount = length $ ffilter (== Increment) actions
24 let expectedCount = length $ ffilter (== Increment) actions
25− let True = last (last os) == [expectedCount,expectedCount]
25+ let !True = last (last os) == [expectedCount,expectedCount]
26 return ()
26 return ()
27
27
28data PatchMapTestAction
28data PatchMapTestAction
@@ -59,4 +59,4 @@ testPatchMapWithMove pulse = do
59 (Map.fromList $ zip [0..] "ab")
59 (Map.fromList $ zip [0..] "ab")
60 (fmapMaybe id pulseAction)
60 (fmapMaybe id pulseAction)
61 return ()
61 return ()
62− return result
62+ return result