packages feed

HUnit-approx 1.0 → 1.1

raw patch · 3 files changed

+16/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Test.HUnit.Approx: infix 1 ~?~

Files

CHANGES.md view
@@ -1,7 +1,13 @@ `HUnit-approx` changelog ======================== -Version 1.0------------+1.1+---++* `HUnit` is Safe only in GHC 7.10 and above; this modifies Safety settings+accordingly.++1.0+---  * Initial release: assertApproxEquals, and assertion and test combinators.
HUnit-approx.cabal view
@@ -1,5 +1,5 @@ name:           HUnit-approx-version:        1.0+version:        1.1 cabal-version:  >= 1.10 synopsis:       Approximate equality for floating point numbers with HUnit homepage:       https://github.com/goldfirere/HUnit-approx@@ -19,7 +19,7 @@ source-repository this   type:     git   location: https://github.com/goldfirere/HUnit-approx.git-  tag:      v1.0+  tag:      v1.1  library   build-depends:      @@ -30,7 +30,7 @@  test-suite sanity-check   type:               exitcode-stdio-1.0-  ghc-options:        -Wall -Werror -main-is Tests.Main+  ghc-options:        -Wall -main-is Tests.Main   default-language:   Haskell2010   main-is:            Tests/Main.hs 
Test/HUnit/Approx.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE ImplicitParams, CPP #-}-#if __GLASGOW_HASKELL__ >= 707-{-# LANGUAGE Safe #-}       -- Test.HUnit is not Safe in 7.6 and below+#if __GLASGOW_HASKELL__ >= 709+{-# LANGUAGE Safe #-}       -- Test.HUnit is not Safe in 7.8 and below #endif ----------------------------------------------------------------------------- -- |@@ -29,13 +29,13 @@ -- | Asserts that the specified actual value is approximately equal to the -- expected value. The output message will contain the prefix, the expected -- value, the actual value, and the maximum margin of error.---  +-- -- If the prefix is the empty string (i.e., @\"\"@), then the prefix is omitted -- and only the expected and actual values are output. assertApproxEqual :: (Ord a, Num a, Show a)                   => String -- ^ The message prefix                   -> a      -- ^ Maximum allowable margin of error-                  -> a      -- ^ The expected value +                  -> a      -- ^ The expected value                   -> a      -- ^ The actual value                   -> Assertion assertApproxEqual preface epsilon expected actual =@@ -79,7 +79,7 @@ -- right-hand side). (~?~) :: (Ord a, Num a, Show a, ?epsilon :: a)       => a     -- ^ The actual value-      -> a     -- ^ The expected value +      -> a     -- ^ The expected value       -> Test actual ~?~ expected = TestCase (actual @?~ expected) infix 1 ~?~