test-framework-quickcheck 0.2.8.1 → 0.3.0
raw patch · 2 files changed
+10/−7 lines, 2 filesdep ~deepseq
Dependency ranges changed: deepseq
Files
Test/Framework/Providers/QuickCheck.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DeriveDataTypeable #-} -- | Allows QuickCheck1 properties to be used with the test-framework package. -- -- For an example of how to use test-framework, please see <http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs>@@ -13,6 +14,7 @@ import Control.DeepSeq (rnf) import System.Random+import Data.Typeable -- | Create a 'Test' for a QuickCheck 'Testable' property@@ -52,13 +54,14 @@ tests_run_str = fmap show mb_tests_run `orElse` "an unknown number of" propertySucceeded :: PropertyResult -> Bool-propertySucceeded pr = case pr_status pr of- PropertyOK -> True- -- NB: Simon Hengel argues in #16 that argument exhaustion should be an error even if we managed to run at least 1 test- _ -> False+propertySucceeded (PropertyResult { pr_status = status, pr_tests_run = mb_n }) = case status of+ PropertyOK -> True+ PropertyArgumentsExhausted -> maybe False (/= 0) mb_n+ _ -> False data Property = forall a. Testable a => Property a+ deriving Typeable instance Testlike PropertyTestCount PropertyResult Property where runTest topts (Property testable) = runProperty topts testable
test-framework-quickcheck.cabal view
@@ -1,5 +1,5 @@ Name: test-framework-quickcheck-Version: 0.2.8.1+Version: 0.3.0 Cabal-Version: >= 1.2.3 Category: Testing Synopsis: QuickCheck support for the test-framework package.@@ -24,10 +24,10 @@ Build-Depends: test-framework >= 0.2.0, QuickCheck >= 1.1 && < 2, extensible-exceptions >= 0.1.1 && < 0.2.0 if flag(base3)- Build-Depends: base >= 3 && < 4, random >= 1, deepseq >= 1.1 && < 1.3+ Build-Depends: base >= 3 && < 4, random >= 1, deepseq >= 1.1 && < 1.4 else if flag(base4)- Build-Depends: base >= 4 && < 5, random >= 1, deepseq >= 1.1 && < 1.3+ Build-Depends: base >= 4 && < 5, random >= 1, deepseq >= 1.1 && < 1.4 Extensions: TypeSynonymInstances TypeOperators