packages feed

doctest-prop 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+15/−17 lines, 2 filesdep +HUnitPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies added: HUnit

API changes (from Hackage documentation)

- Test.DocTest.Prop: unit :: Bool -> IO ()
+ Test.DocTest.Prop: assert :: Assertable t => t -> Assertion

Files

doctest-prop.cabal view
@@ -2,17 +2,18 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                doctest-prop-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Allow QuickCheck-style property testing within doctest. description:         -  This package allows you to write QuickCheck properties within-  doctest, using functions that keep silence when test succeeds and-  print out the test outputs otherwise.++  This package allows you to write QuickCheck properties and HUnit+  assertions within doctest, using functions that keep silence when+  test succeeds and print out the test outputs otherwise.     .   To enjoy behavior driven development in Haskell, first import   @Test.DocTest.Prop@, and use @prop@, @propWith@ and @unit@ to write-  in-place tests. For more details, please refer to examples in the module-  @Test.DocTest.Prop@ .+  in-place tests. For more details, please refer to examples in the+  module @Test.DocTest.Prop@ .  license:             MIT license-file:        LICENSE@@ -28,6 +29,7 @@   exposed-modules:     Test.DocTest.Prop   hs-source-dirs:    ./src/   build-depends:       base ==4.*+                     , HUnit                      , QuickCheck  Test-Suite test@@ -36,6 +38,7 @@   Type:              exitcode-stdio-1.0   Build-Depends:     base == 4.*                    , doctest >=0.8+                   , HUnit                    , QuickCheck  source-repository head
src/Test/DocTest/Prop.hs view
@@ -1,9 +1,9 @@ {-# Options -Wall #-} {-| -This package allows you to write QuickCheck properties within doctest,-using functions that keep silence when test succeeds and print out the-test outputs otherwise.+This package allows you to write QuickCheck properties and HUnit+assertions within doctest, using functions that keep silence when test+succeeds and print out the test outputs otherwise.  To enjoy behavior driven development in Haskell, first import @Test.DocTest.Prop@, and use @prop@, @propWith@ and @unit@ to write@@ -13,15 +13,15 @@ >>> prop $ \x -> x*2 == x+x >>> prop ((<2) . fromEnum :: Bool -> Bool) >>> propWith (quietArgs{maxSize=3}) $ (<10).length->>> unit $ 1+1==2-+>>> assert $ 1+1==2 -}  module Test.DocTest.Prop-       (prop, propWith, quietArgs, unit) where+       (prop, propWith, quietArgs, assert) where   import Test.QuickCheck+import Test.HUnit (assert)  -- | The standard arguments for QuickCheck but the chatty flag is off. quietArgs :: Args@@ -42,8 +42,3 @@   case r of     Success _ _ _ -> return ()     _ -> putStrLn $ output r---- | Test for an unchanging property.-unit :: Bool -> IO ()-unit True  = return ()-unit False = putStrLn "Failure"