diff --git a/exercises/Set3aTest.hs b/exercises/Set3aTest.hs index 98ca6d1..a793772 100644 --- a/exercises/Set3aTest.hs +++ b/exercises/Set3aTest.hs @@ -114,19 +114,19 @@ ex6_powers_large = m_powers 27 -- 5^27 still fits in Int ex7_while_number = property $ do n <- choose (0,20 :: Integer) - return $ counterexample ("while (/="++show n++") (+1) 0") $ + return $ counterexample ("while (/="++show n++") (+1) 0") $ within timeLimit $ while (/=n) (+1) 0 ?== n ex7_while_string = property $ do n <- word let w = n++n p = (/=n) - return $ counterexample ("while (/="++show n++") tail "++show w) $ + return $ counterexample ("while (/="++show n++") tail "++show w) $ within timeLimit $ while p tail w == n ex8_whileRight_Left = forAllBlind word $ \w -> forAllBlind (choose (1::Int,10)) $ \i -> - counterexample ("let f _ = Left " ++ show w ++ " in whileRight f " ++ show i) $ + counterexample ("let f _ = Left " ++ show w ++ " in whileRight f " ++ show i) $ within timeLimit $ let f _ = Left w in whileRight f i ?== w ex8_whileRight_step = property $ do @@ -137,7 +137,7 @@ ex8_whileRight_step = property $ do let log = ceiling . logBase 2 . fromIntegral divUp x y = ceiling (fromIntegral x / fromIntegral y) answer = start * 2 ^ (log (limit `divUp` start)) - return $ counterexample ("whileRight (step " ++ show limit ++ ") " ++ show start) $ + return $ counterexample ("whileRight (step " ++ show limit ++ ") " ++ show start) $ within timeLimit $ whileRight (step limit) start ?== answer ex9_1 = property $ do