packages feed

cabal-detailed-quickcheck 0.1.2.1 → 0.1.3.0

raw patch · 3 files changed

+27/−26 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Distribution.TestSuite.QuickCheck: argsToTestArgsWith :: TestArgs -> Args -> TestArgs

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for cabal-detailed-quickcheck +## 0.1.3.0 — 2022-09-18++* Added `argsToTestArgsWith`.+ ## 0.1.2.1 — 2022-09-05  * Fix error in documentation.
cabal-detailed-quickcheck.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               cabal-detailed-quickcheck-version:            0.1.2.1+version:            0.1.3.0 synopsis:           QuickCheck for Cabal tests description:        Turn QuickCheck properties into detailed Cabal tests homepage:           https://github.com/schuelermine/cabal-detailed-quickcheck@@ -31,4 +31,4 @@ source-repository this     type:               git     location:           https://github.com/schuelermine/cabal-detailed-quickcheck.git-    tag:                0.1.2.1+    tag:                0.1.3.0
lib/Distribution/TestSuite/QuickCheck.hs view
@@ -104,6 +104,7 @@      -- * Functions for using arguments     argsToTestArgs,+    argsToTestArgsWith,     testArgsToArgs,     stdTestArgs,   )@@ -162,37 +163,33 @@   }  -- | Transform a QuickCheck 'QC.Args' value to a 'TestArgs' value, defaulting all missing properties+--+--   @'argsToTestArgs' = 'argsToTestArgsWith' 'stdTestArgs'@ argsToTestArgs :: QC.Args -> TestArgs-argsToTestArgs QC.Args {..} =-  TestArgs+argsToTestArgs = argsToTestArgsWith stdTestArgs++-- | Transform a QuickCheck 'QC.Args' value to a 'TestArgs' value, with fallbacks for missing properties given by the first argument.+argsToTestArgsWith :: TestArgs -> QC.Args -> TestArgs+argsToTestArgsWith testArgs QC.Args {..} =+  testArgs     { verbosity = if chatty then Chatty else Silent,-      verboseShrinking = False,       maxDiscardRatio,-      noShrinking = False,       maxShrinks,       maxSuccess,-      maxSize,-      sizeScale = 1+      maxSize     }  -- | Recover arguments passed to 'QC.quickCheck' from a 'TestArgs' testArgsToArgs :: TestArgs -> QC.Args-testArgsToArgs-  TestArgs-    { verbosity,-      maxDiscardRatio,-      maxShrinks,+testArgsToArgs TestArgs {..} =+  QC.Args+    { replay = Nothing,       maxSuccess,-      maxSize-    } =-    QC.Args-      { replay = Nothing,-        maxSuccess,-        maxDiscardRatio,-        maxSize,-        chatty = verbosity >= Chatty,-        maxShrinks-      }+      maxDiscardRatio,+      maxSize,+      chatty = verbosity >= Chatty,+      maxShrinks+    }  -- | Default arguments for property tests stdTestArgs :: TestArgs@@ -381,9 +378,6 @@           }    in T.Test $ withArgs originalArgs -discardingTestArgs :: PropertyTest prop -> PropertyTest (TestArgs -> prop)-discardingTestArgs test@PropertyTest {property} = test {property = const property}- -- | Get a Cabal 'T.Test' from a 'PropertyTest' that takes the test arguments and returns a 'QC.Testable' value getPropertyTestUsing ::   QC.Testable prop =>@@ -391,6 +385,9 @@   PropertyTest (TestArgs -> prop) ->   T.Test getPropertyTestUsing = getPropertyTestWithUsing stdTestArgs++discardingTestArgs :: PropertyTest prop -> PropertyTest (TestArgs -> prop)+discardingTestArgs test@PropertyTest {property} = test {property = const property}  -- | Get a Cabal 'T.Test' from a 'PropertyTest' with custom 'TestArgs' getPropertyTestWith ::