Skip to content

Commit

Permalink
re-generalized to quickcheck 2.4+
Browse files Browse the repository at this point in the history
Use empty-record matches to avoid depending on number of fields
  • Loading branch information
mokus0 committed Mar 23, 2013
1 parent a1d36e3 commit 466dc4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ShowQ.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ tests :: (Testable prop) => prop -> Int -> [[String]] -> IO String
tests prop ntest stamps =
do result <- quickCheckWithResult stdArgs prop
case result of
NoExpectedFailure _ _ _ -> done "Arguments exhausted after" (numTests result) stamps
GaveUp _ _ _ -> done "Arguments exhausted after" (numTests result) stamps
Success _ _ _ -> done "OK, passed" (numTests result) stamps
Failure _ _ _ _ _ _ _ _ -> return $ "Falsifiable, after "
NoExpectedFailure{} -> done "Arguments exhausted after" (numTests result) stamps
GaveUp{} -> done "Arguments exhausted after" (numTests result) stamps
Success{} -> done "OK, passed" (numTests result) stamps
Failure{} -> return $ "Falsifiable, after "
++ show ntest
++ " tests:\n"
++ reason result
Expand Down
2 changes: 1 addition & 1 deletion show.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Flag base4
library
exposed-modules: ShowQ, ShowFun

build-depends: random, QuickCheck>=2.6, smallcheck>=1.0
build-depends: random, QuickCheck>=2.4, smallcheck>=1.0
if flag(base4)
build-depends: base == 4.*, syb
else
Expand Down

0 comments on commit 466dc4f

Please sign in to comment.