packages feed

test-framework-quickcheck2 0.3.0.3 → 0.3.0.4

raw patch · 5 files changed

+47/−36 lines, 5 filesdep ~QuickCheckdep ~basedep ~test-frameworksetup-changednew-uploader

Dependency ranges changed: QuickCheck, base, test-framework

Files

+ ChangeLog.md view
@@ -0,0 +1,5 @@+## 0.3.0.4++- Add support for `Quickcheck >= 2.8 && < 2.11`'s `InsufficientCoverage` status result+- Drop support for GHC < 7.0 (require `Haskell2010` support)+- Prevent `maxDiscardRatio` from becoming zero
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
− Setup.lhs
@@ -1,4 +0,0 @@-#! /usr/bin/env runhaskell--> import Distribution.Simple-> main = defaultMain
Test/Framework/Providers/QuickCheck2.hs view
@@ -1,7 +1,13 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE TypeSynonymInstances #-}+ -- | Allows QuickCheck2 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>+-- For an example of how to use @test-framework@, please see <https://github.com/haskell/test-framework/raw/master/example/Test/Framework/Example.lhs>. module Test.Framework.Providers.QuickCheck2 (         testProperty     ) where@@ -43,6 +49,9 @@                     | PropertyFalsifiable String String -- ^ The property was not true. The strings are the reason and the output.                     | PropertyNoExpectedFailure         -- ^ We expected that a property would fail but it didn't                     | PropertyTimedOut                  -- ^ The property timed out during execution+#if MIN_VERSION_QuickCheck(2,8,0)+                    | PropertyInsufficientCoverage      -- ^ The tests passed but a use of 'cover' had insufficient coverage.+#endif  instance Show PropertyResult where     show (PropertyResult { pr_status = status, pr_used_seed = used_seed, pr_tests_run = mb_tests_run })@@ -52,6 +61,9 @@             PropertyFalsifiable _rsn otpt -> otpt ++ "(used seed " ++ show used_seed ++ ")"             PropertyNoExpectedFailure     -> "No expected failure with seed " ++ show used_seed ++ ", after " ++ tests_run_str ++ " tests"             PropertyTimedOut              -> "Timed out after " ++ tests_run_str ++ " tests"+#if MIN_VERSION_QuickCheck(2,8,0)+            PropertyInsufficientCoverage  -> "Insufficient coverage after " ++ tests_run_str ++ " tests"+#endif       where         tests_run_str = fmap show mb_tests_run `orElse` "an unknown number of" @@ -92,7 +104,7 @@         args = stdArgs { replay = Just (gen, 0) -- NB: the 0 is the saved size. Defaults to 0 if you supply "Nothing" for "replay".                        , maxSuccess = max_success #if MIN_VERSION_QuickCheck(2,5,0)-                       , maxDiscardRatio = max_discard `div` max_success+                       , maxDiscardRatio = (max_discard `div` max_success) + 1 #else                        , maxDiscard = max_discard #endif@@ -115,3 +127,6 @@     toPropertyStatus (GaveUp {})                               = PropertyArgumentsExhausted     toPropertyStatus (Failure { reason = rsn, output = otpt }) = PropertyFalsifiable rsn otpt     toPropertyStatus (NoExpectedFailure {})                    = PropertyNoExpectedFailure+#if MIN_VERSION_QuickCheck(2,8,0)+    toPropertyStatus (InsufficientCoverage _ _ _)              = PropertyInsufficientCoverage+#endif
test-framework-quickcheck2.cabal view
@@ -1,46 +1,39 @@ Name:                test-framework-quickcheck2-Version:             0.3.0.3-Cabal-Version:       >= 1.6+Version:             0.3.0.4+Cabal-Version:       >= 1.10 Category:            Testing-Synopsis:            QuickCheck2 support for the test-framework package.+Synopsis:            QuickCheck-2 support for the test-framework package. License:             BSD3 License-File:        LICENSE Author:              Max Bolingbroke <batterseapower@hotmail.com> Maintainer:          Haskell Libraries <libraries@haskell.org>-Homepage:            https://batterseapower.github.io/test-framework/-Bug-Reports:         https://github.com/haskell/test-framework/+Homepage:            http://haskell.github.io/test-framework/+Bug-Reports:         https://github.com/haskell/test-framework/issues Build-Type:          Simple-Description:         QuickCheck2 support for the test-framework package.--Flag Base4-        Description:    Choose base version 4-        Default:        True--Flag Base3-        Description:    Choose base version 3-        Default:        False-+Description:         Allows @QuickCheck-2@ properties to be used with the </package/test-framework test-framework package>.+Tested-With:         GHC==8.2.1, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2, GHC==7.2.2, GHC==7.0.4+extra-source-files:  ChangeLog.md  Library-        Exposed-Modules:        Test.Framework.Providers.QuickCheck2+        Default-Language:       Haskell2010+        Other-Extensions:       CPP+                                DeriveDataTypeable+                                ExistentialQuantification+                                MultiParamTypeClasses+                                TypeOperators+                                TypeSynonymInstances -        Build-Depends:          test-framework >= 0.7.1,-                                QuickCheck >= 2.4 && < 2.8,-                                extensible-exceptions >= 0.1.1 && < 0.2.0-        if flag(base3)-                Build-Depends:          base >= 3 && < 4, random >= 1-        else-                if flag(base4)-                        Build-Depends:          base >= 4 && < 5, random >= 1+        Exposed-Modules:        Test.Framework.Providers.QuickCheck2 -        Extensions:             TypeSynonymInstances-                                TypeOperators-                                MultiParamTypeClasses-                                ExistentialQuantification-                                CPP+        Build-Depends:          test-framework        == 0.8.*+                              , QuickCheck            >= 2.4    && < 2.11+                              , base                  >= 4.3    && < 5+                              , extensible-exceptions >= 0.1.1  && < 0.2.0+                              , random                >= 1      && < 1.2          Ghc-Options:            -Wall  Source-Repository head   Type:     git-  Location: https://github.com/haskell/test-framework+  Location: https://github.com/haskell/test-framework.git+  subdir:   quickcheck2