hunit-dejafu 1.2.0.6 → 1.2.1.0
raw patch · 3 files changed
+37/−6 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.HUnit.DejaFu: -- | The seed value type. This is used to construct the concurrent states.
+ Test.HUnit.DejaFu: data Condition
- Test.HUnit.DejaFu: ProPredicate :: Either Failure a -> Maybe Discard -> [(Either Failure a, Trace)] -> Result b -> ProPredicate a b
+ Test.HUnit.DejaFu: ProPredicate :: (Either Condition a -> Maybe Discard) -> ([(Either Condition a, Trace)] -> Result b) -> ProPredicate a b
- Test.HUnit.DejaFu: Sig :: x -> ConcIO s -> s -> x -> ConcIO o -> s -> x -> ConcIO () -> s -> ConcIO () -> Sig s o x
+ Test.HUnit.DejaFu: Sig :: (x -> ConcIO s) -> (s -> x -> ConcIO o) -> (s -> x -> ConcIO ()) -> (s -> ConcIO ()) -> Sig s o x
- Test.HUnit.DejaFu: [pdiscard] :: ProPredicate a b -> Either Failure a -> Maybe Discard
+ Test.HUnit.DejaFu: [pdiscard] :: ProPredicate a b -> Either Condition a -> Maybe Discard
- Test.HUnit.DejaFu: [peval] :: ProPredicate a b -> [(Either Failure a, Trace)] -> Result b
+ Test.HUnit.DejaFu: [peval] :: ProPredicate a b -> [(Either Condition a, Trace)] -> Result b
- Test.HUnit.DejaFu: testDejafuDiscard :: Show b => (Either Failure a -> Maybe Discard) -> Way -> MemType -> String -> ProPredicate a b -> ConcIO a -> Test
+ Test.HUnit.DejaFu: testDejafuDiscard :: Show b => (Either Condition a -> Maybe Discard) -> Way -> MemType -> String -> ProPredicate a b -> ConcIO a -> Test
- Test.HUnit.DejaFu: testDejafusDiscard :: Show b => (Either Failure a -> Maybe Discard) -> Way -> MemType -> [(String, ProPredicate a b)] -> ConcIO a -> Test
+ Test.HUnit.DejaFu: testDejafusDiscard :: Show b => (Either Condition a -> Maybe Discard) -> Way -> MemType -> [(String, ProPredicate a b)] -> ConcIO a -> Test
- Test.HUnit.DejaFu: type family X a :: *;
+ Test.HUnit.DejaFu: type family X a :: Type;
Files
- CHANGELOG.rst +18/−0
- Test/HUnit/DejaFu.hs +16/−3
- hunit-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:`hunit-dejafu-1.2.1.0`+* Hackage: :hackage:`hunit-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.6 (2018-07-01) --------------------
Test/HUnit/DejaFu.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-}@@ -39,6 +40,7 @@ , testDejafusWithSettings -- ** Re-exports+ , Condition , Predicate , ProPredicate(..) , module Test.DejaFu.Settings@@ -75,6 +77,17 @@ assertFailure, assertString) import Test.HUnit.Lang (HUnitFailure(..)) +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+ -------------------------------------------------------------------------------- -- HUnit-style unit testing @@ -186,7 +199,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.@@ -250,7 +263,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.@@ -349,7 +362,7 @@ failures = intersperse "" . map (indent . showres) . take 5 $ _failures res - showres (r, t) = either Conc.showFail show r ++ " " ++ Conc.showTrace t+ showres (r, t) = either showCondition show r ++ " " ++ Conc.showTrace t rest = if moreThan (_failures res) 5 then "\n\t..." else ""
hunit-dejafu.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: hunit-dejafu-version: 1.2.0.6+version: 1.2.1.0 synopsis: Deja Fu support for the HUnit test framework. description:@@ -30,7 +30,7 @@ source-repository this type: git location: https://github.com/barrucadu/dejafu.git- tag: hunit-dejafu-1.2.0.6+ tag: hunit-dejafu-1.2.1.0 library exposed-modules: Test.HUnit.DejaFu@@ -38,7 +38,7 @@ -- other-extensions: build-depends: base >=4.9 && <5 , exceptions >=0.7 && <0.11- , dejafu >=1.5 && <1.12+ , dejafu >=1.5 && <1.13 , HUnit >=1.3.1 && <1.7 -- hs-source-dirs: default-language: Haskell2010