tasty-dejafu 1.2.0.8 → 1.2.1.0
raw patch · 3 files changed
+38/−7 lines, 3 filesdep ~dejafuPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: dejafu
API changes (from Hackage documentation)
+ Test.Tasty.DejaFu: data Condition
- Test.Tasty.DejaFu: ProPredicate :: (Either Failure a -> Maybe Discard) -> ([(Either Failure a, Trace)] -> Result b) -> ProPredicate a b
+ Test.Tasty.DejaFu: ProPredicate :: (Either Condition a -> Maybe Discard) -> ([(Either Condition a, Trace)] -> Result b) -> ProPredicate a b
- Test.Tasty.DejaFu: [pdiscard] :: ProPredicate a b -> Either Failure a -> Maybe Discard
+ Test.Tasty.DejaFu: [pdiscard] :: ProPredicate a b -> Either Condition a -> Maybe Discard
- Test.Tasty.DejaFu: [peval] :: ProPredicate a b -> [(Either Failure a, Trace)] -> Result b
+ Test.Tasty.DejaFu: [peval] :: ProPredicate a b -> [(Either Condition a, Trace)] -> Result b
- Test.Tasty.DejaFu: testDejafuDiscard :: Show b => (Either Failure a -> Maybe Discard) -> Way -> MemType -> String -> ProPredicate a b -> ConcIO a -> TestTree
+ Test.Tasty.DejaFu: testDejafuDiscard :: Show b => (Either Condition a -> Maybe Discard) -> Way -> MemType -> String -> ProPredicate a b -> ConcIO a -> TestTree
- Test.Tasty.DejaFu: testDejafusDiscard :: Show b => (Either Failure a -> Maybe Discard) -> Way -> MemType -> [(TestName, ProPredicate a b)] -> ConcIO a -> TestTree
+ Test.Tasty.DejaFu: testDejafusDiscard :: Show b => (Either Condition a -> Maybe Discard) -> Way -> MemType -> [(TestName, ProPredicate a b)] -> ConcIO a -> TestTree
Files
- CHANGELOG.rst +18/−0
- Test/Tasty/DejaFu.hs +17/−4
- tasty-dejafu.cabal +3/−3
CHANGELOG.rst view
@@ -7,6 +7,24 @@ .. _PVP: https://pvp.haskell.org/ +1.2.1.0 (2019-01-20)+--------------------++* Git: :tag:`tasty-dejafu-1.2.1.0`+* Hackage: :hackage:`tasty-dejafu-1.2.1.0`++Added+~~~~~++* Re-export of the ``Condition`` type from :hackage:`dejafu`. If+ using dejafu < 1.12, this is an alias for ``Failure``.++Miscellaneous+~~~~~~~~~~~~~++* The upper bound on :hackage:`dejafu` is <1.13++ 1.2.0.8 (2018-12-02) --------------------
Test/Tasty/DejaFu.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-}@@ -39,6 +40,7 @@ , testDejafusWithSettings -- ** Re-exports+ , Condition , Predicate , ProPredicate(..) , module Test.DejaFu.Settings@@ -81,6 +83,17 @@ import Test.Tasty.Providers (IsTest(..), singleTest, testFailed, testPassed) +showCondition :: Condition -> String+#if MIN_VERSION_dejafu(1,12,0)+showCondition = Conc.showCondition+#else+-- | An alias for 'Failure'.+--+-- @since 1.2.1.0+type Condition = Failure+showCondition = Conc.showFail+#endif+ -------------------------------------------------------------------------------- -- Tasty-style unit testing @@ -219,7 +232,7 @@ -- -- @since 1.0.0.0 testDejafuDiscard :: Show b- => (Either Failure a -> Maybe Discard)+ => (Either Condition a -> Maybe Discard) -- ^ Selectively discard results. -> Way -- ^ How to execute the concurrent program.@@ -283,7 +296,7 @@ -- -- @since 1.0.1.0 testDejafusDiscard :: Show b- => (Either Failure a -> Maybe Discard)+ => (Either Condition a -> Maybe Discard) -- ^ Selectively discard results. -> Way -- ^ How to execute the concurrent program.@@ -337,7 +350,7 @@ -- Tasty integration data ConcTest where- ConcTest :: Show b => IO [(Either Failure a, Conc.Trace)] -> ([(Either Failure a, Conc.Trace)] -> Result b) -> ConcTest+ ConcTest :: Show b => IO [(Either Condition a, Conc.Trace)] -> ([(Either Condition a, Conc.Trace)] -> Result b) -> ConcTest deriving Typeable data PropTest where@@ -397,7 +410,7 @@ msg = if null (_failureMsg res) then "" else _failureMsg res ++ "\n" - failures = intersperse "" . map (\(r, t) -> indent $ either Conc.showFail show r ++ " " ++ Conc.showTrace t) . take 5 $ _failures res+ failures = intersperse "" . map (\(r, t) -> indent $ either showCondition show r ++ " " ++ Conc.showTrace t) . take 5 $ _failures res rest = if moreThan (_failures res) 5 then "\n\t..." else ""
tasty-dejafu.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: tasty-dejafu-version: 1.2.0.8+version: 1.2.1.0 synopsis: Deja Fu support for the Tasty test framework. description:@@ -30,14 +30,14 @@ source-repository this type: git location: https://github.com/barrucadu/dejafu.git- tag: tasty-dejafu-1.2.0.8+ tag: tasty-dejafu-1.2.1.0 library exposed-modules: Test.Tasty.DejaFu -- other-modules: -- other-extensions: build-depends: base >=4.9 && <5- , dejafu >=1.5 && <1.12+ , dejafu >=1.5 && <1.13 , random >=1.0 && <1.2 , tagged >=0.8 && <0.9 , tasty >=0.10 && <1.3