packages feed

testbench 0.2.0.1 → 0.2.1.0

raw patch · 3 files changed

+23/−3 lines, 3 files

Files

Changelog.md view
@@ -1,3 +1,10 @@+0.2.1.0 (13 July, 2017)+=======================++* Add `compareFuncAllWith`++* Documentation improvements (especially on `baselineWith`).+ 0.2.0.1 (12 July, 2017) ======================= 
src/TestBench.hs view
@@ -58,6 +58,7 @@   , compareFuncList'   , compareFuncAll   , compareFuncAllIO+  , compareFuncAllWith   , compareFuncAll'      -- ** Comparison parameters@@ -452,6 +453,15 @@                     , Eq b, Show b) => String -> (a -> IO b) -> params -> TestBench compareFuncAllIO lbl f params = compareFuncListIO lbl f params [minBound..maxBound] +-- | An extension to 'compareFuncListWith' that uses the 'Bounded' and+--   'Enum' instances to generate the list of all values.+--+--   @since 0.2.1.0+compareFuncAllWith :: (ProvideParams params a b, Show a, Enum a, Bounded a+                      , Eq b, Show b) => (String -> a -> CompParams a b)+                      -> String -> (a -> b) -> params -> TestBench+compareFuncAllWith bline lbl f params = compareFuncListWith bline lbl f params [minBound..maxBound]+ -- | A variant of 'comapreFuncAll' that doesn't use 'baseline' --   (allowing you to specify your own test). --@@ -514,13 +524,13 @@ --   account the common case that you want to consider a value that --   can - and should - be evaluated to normal form. -----   @since 0.2.0.0 normalForm :: (NFData b) => CompParams a b+--   @since 0.2.0.0 normalForm :: (NFData b) => CompParams a b normalForm = benchNormalForm `mappend` weigh  -- | A variant of 'normalForm' where the results are within @IO@. -----   @since 0.2.0.0 normalFormIO :: (NFData b) => CompParams a (IO b)+--   @since 0.2.0.0 normalFormIO :: (NFData b) => CompParams a (IO b) normalFormIO = benchNormalFormIO `mappend` weighIO @@ -577,6 +587,9 @@  -- | A variant of 'baseline' that lets you specify how to test for --   equality.+--+--   The first argument to the provided function will be the+--   \"baseline\" value; the second will be the value being tested. -- --   @since 0.2.0.0 baselineWith :: (b -> b -> Assertion) -> String -> a -> CompParams a b
testbench.cabal view
@@ -1,5 +1,5 @@ name:                testbench-version:             0.2.0.1+version:             0.2.1.0 synopsis:            Create tests and benchmarks together description: { Test your benchmarks!  Benchmark your tests!