Skip to content

Commit ee59770

Browse files
Better test
1 parent bc20ad3 commit ee59770

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/TabulateSlow.hs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import Test.QuickCheck
22
import Test.QuickCheck.Monadic
3+
import Control.Monad
4+
import System.Exit
35

46
prop_tabulateALot :: Int -> Property
57
prop_tabulateALot x =
@@ -12,4 +14,5 @@ prop_tabulateALot x =
1214
tabulates (n - 1)
1315

1416
main = do
15-
quickCheck $ forAll arbitrary prop_tabulateALot
17+
r <- quickCheckResult $ within 10000 $ forAll arbitrary prop_tabulateALot
18+
unless (isSuccess r) exitFailure

0 commit comments

Comments
 (0)