File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,19 +114,19 @@ ex6_powers_large = m_powers 27 -- 5^27 still fits in Int
114
114
115
115
ex7_while_number = property $ do
116
116
n <- choose (0 ,20 :: Integer )
117
- return $ counterexample (" while (/=" ++ show n++ " ) (+1) 0" ) $
117
+ return $ counterexample (" while (/=" ++ show n++ " ) (+1) 0" ) $ within timeLimit $
118
118
while (/= n) (+ 1 ) 0 ?== n
119
119
120
120
ex7_while_string = property $ do
121
121
n <- word
122
122
let w = n++ n
123
123
p = (/= n)
124
- return $ counterexample (" while (/=" ++ show n++ " ) tail " ++ show w) $
124
+ return $ counterexample (" while (/=" ++ show n++ " ) tail " ++ show w) $ within timeLimit $
125
125
while p tail w == n
126
126
127
127
ex8_whileRight_Left = forAllBlind word $ \ w ->
128
128
forAllBlind (choose (1 :: Int ,10 )) $ \ i ->
129
- counterexample (" let f _ = Left " ++ show w ++ " in whileRight f " ++ show i) $
129
+ counterexample (" let f _ = Left " ++ show w ++ " in whileRight f " ++ show i) $ within timeLimit $
130
130
let f _ = Left w in whileRight f i ?== w
131
131
132
132
ex8_whileRight_step = property $ do
@@ -137,7 +137,7 @@ ex8_whileRight_step = property $ do
137
137
let log = ceiling . logBase 2 . fromIntegral
138
138
divUp x y = ceiling (fromIntegral x / fromIntegral y)
139
139
answer = start * 2 ^ (log (limit `divUp` start))
140
- return $ counterexample (" whileRight (step " ++ show limit ++ " ) " ++ show start) $
140
+ return $ counterexample (" whileRight (step " ++ show limit ++ " ) " ++ show start) $ within timeLimit $
141
141
whileRight (step limit) start ?== answer
142
142
143
143
ex9_1 = property $ do
You can’t perform that action at this time.
0 commit comments