packages feed

tasty-hunit 0.10.0.2 → 0.10.0.3

raw patch · 4 files changed

+55/−10 lines, 4 filesdep ~base

Dependency ranges changed: base

Files

CHANGELOG.md view
@@ -1,6 +1,21 @@ Changes ======= +Version 0.10.0.3+----------------++The only point of this release is to introduce compatibility with GHCs back to 7.0+(see https://github.com/feuerbach/tasty/pull/287).++Note, however, that these changes are not merged to the master branch, and the+future releases will only support the GHC/base versions from the last 5 years,+as per our usual policy. To test with even older GHCs, you'll have to use this+particular version of tasty-hunit (or have the constraint solver pick it for you+when testing with older GHCs).++The source of this release is in the `support-old-ghcs` branch of the tasty+repository.+ Version 0.10.0.2 ---------------- 
Test/Tasty/HUnit.hs view
@@ -15,7 +15,7 @@ -- >    -- assertion no. 3 (would have failed, but won't be executed because -- >    -- the previous assertion has already failed) -- >    "foo" @?= "bar"-{-# LANGUAGE TypeFamilies, DeriveDataTypeable #-}+{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-} module Test.Tasty.HUnit   (     -- * Constructing test cases@@ -33,6 +33,7 @@     -- * Data types   , Assertion   , HUnitFailure(..)+#if MIN_VERSION_base(4,5,0)     -- * Accurate location for domain-specific assertion functions     -- | It is common to define domain-specific assertion functions based     -- on the standard ones, e.g.@@ -50,6 +51,7 @@     -- > assertNonEmpty = assertBool "List is empty" . not . null     --     , HasCallStack+#endif     -- * Deprecated functions and types     -- | These definitions come from HUnit, but I don't see why one would     -- need them. If you have a valid use case for them, please contact me@@ -65,9 +67,14 @@ import Test.Tasty.HUnit.Orig import Test.Tasty.HUnit.Steps +import Control.Exception import Data.Typeable++#if MIN_VERSION_base(4,5,0) import Data.CallStack (HasCallStack)-import Control.Exception+#else+#define HasCallStack Eq ()+#endif  -- | Turn an 'Assertion' into a tasty test case testCase :: TestName -> Assertion -> TestTree
Test/Tasty/HUnit/Orig.hs view
@@ -1,7 +1,8 @@-{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, TypeSynonymInstances #-}+{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleContexts, FlexibleInstances, TypeSynonymInstances #-} --- required for HasCallStack by different versions of GHC-{-# LANGUAGE ConstraintKinds, FlexibleContexts #-}+#if MIN_VERSION_base(4,5,0)+{-# LANGUAGE ConstraintKinds #-}+#endif  -- | This is the code copied from the original hunit package (v. 1.2.5.2). -- with minor modifications@@ -10,7 +11,27 @@ import qualified Control.Exception as E import Control.Monad import Data.Typeable (Typeable)++#if MIN_VERSION_base(4,5,0) import Data.CallStack+#else+#define HasCallStack Eq ()++callStack :: [a]+callStack = []++-- https://hackage.haskell.org/package/base-4.14.0.0/docs/GHC-Stack.html#t:SrcLoc+data SrcLoc = SrcLoc+  { srcLocPackage   :: String+  , srcLocModule    :: String+  , srcLocFile      :: String+  , srcLocStartLine :: Int+  , srcLocStartCol  :: Int+  , srcLocEndLine   :: Int+  , srcLocEndCol    :: Int+  } deriving (Eq, Show)++#endif  -- Interfaces -- ----------
tasty-hunit.cabal view
@@ -1,8 +1,8 @@--- Initial tasty-hunit.cabal generated by cabal init.  For further +-- Initial tasty-hunit.cabal generated by cabal init.  For further -- documentation, see http://haskell.org/cabal/users-guide/  name:                tasty-hunit-version:             0.10.0.2+version:             0.10.0.3 synopsis:            HUnit support for the Tasty test framework. description:         HUnit support for the Tasty test framework.                      .@@ -16,7 +16,7 @@ maintainer:          Roman Cheplyaka <roma@ro-che.info> homepage:            https://github.com/feuerbach/tasty bug-reports:         https://github.com/feuerbach/tasty/issues--- copyright:           +-- copyright: category:            Testing build-type:          Simple extra-source-files:  CHANGELOG.md@@ -32,7 +32,9 @@   other-modules:       Test.Tasty.HUnit.Orig                        Test.Tasty.HUnit.Steps   other-extensions:    TypeFamilies, DeriveDataTypeable-  build-depends:       base ==4.*, tasty >= 1.2.2, call-stack-  -- hs-source-dirs:      +  build-depends:       base >= 4.3 && < 5, tasty >= 1.2.2+  if impl(ghc >= 7.4)+    build-depends: call-stack+  -- hs-source-dirs:   default-language:    Haskell2010   ghc-options: -Wall