packages feed

tasty-quickcheck 0.8.3.2 → 0.8.4

raw patch · 3 files changed

+24/−2 lines, 3 files

Files

CHANGELOG.md view
@@ -1,6 +1,11 @@ Changes ======= +Version 0.8.4+-------------++Add a "--quickcheck-verbose" option+ Version 0.8.3.2 --------------- 
Test/Tasty/QuickCheck.hs view
@@ -7,6 +7,7 @@   , QuickCheckShowReplay(..)   , QuickCheckMaxSize(..)   , QuickCheckMaxRatio(..)+  , QuickCheckVerbose(..)   , module Test.QuickCheck     -- * Internal     -- | This is exposed for testing purposes and not considered as a part@@ -77,6 +78,10 @@ newtype QuickCheckMaxRatio = QuickCheckMaxRatio Int   deriving (Num, Ord, Eq, Real, Enum, Integral, Typeable) +-- | Show the test cases that QuickCheck generates+newtype QuickCheckVerbose = QuickCheckVerbose Bool+  deriving (Typeable)+ instance IsOption QuickCheckTests where   defaultValue = 100   parseValue = fmap QuickCheckTests . safeRead@@ -110,6 +115,13 @@   optionName = return "quickcheck-max-ratio"   optionHelp = return "Maximum number of discared tests per successful test before giving up" +instance IsOption QuickCheckVerbose where+  defaultValue = QuickCheckVerbose False+  parseValue = fmap QuickCheckVerbose . safeRead+  optionName = return "quickcheck-verbose"+  optionHelp = return "Show the generated test cases"+  optionCLParser = flagCLParser Nothing (QuickCheckVerbose True)+ instance IsTest QC where   testOptions = return     [ Option (Proxy :: Proxy QuickCheckTests)@@ -117,6 +129,7 @@     , Option (Proxy :: Proxy QuickCheckShowReplay)     , Option (Proxy :: Proxy QuickCheckMaxSize)     , Option (Proxy :: Proxy QuickCheckMaxRatio)+    , Option (Proxy :: Proxy QuickCheckVerbose)     ]    run opts (QC prop) yieldProgress = do@@ -126,8 +139,12 @@       QuickCheckShowReplay showReplay = lookupOption opts       QuickCheckMaxSize    maxSize    = lookupOption opts       QuickCheckMaxRatio   maxRatio   = lookupOption opts+      QuickCheckVerbose    verbose    = lookupOption opts       args = QC.stdArgs { QC.chatty = False, QC.maxSuccess = nTests, QC.maxSize = maxSize, QC.replay = replay, QC.maxDiscardRatio = maxRatio}-    r <- QC.quickCheckWithResult args prop+      testRunner = if verbose+                     then QC.verboseCheckWithResult+                     else QC.quickCheckWithResult+    r <- testRunner args prop      qcOutput <- formatMessage $ QC.output r     let qcOutputNl =
tasty-quickcheck.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                tasty-quickcheck-version:             0.8.3.2+version:             0.8.4 synopsis:            QuickCheck support for the Tasty test framework. description:         QuickCheck support for the Tasty test framework. license:             MIT