Skip to content

Commit

Permalink
Merge pull request #195 from aherrmann/pr/testDejafusDiscard
Browse files Browse the repository at this point in the history
Add `testDejafusDiscard`
  • Loading branch information
barrucadu committed Feb 13, 2018
2 parents 98a81a8 + 1ad606b commit be66679
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tasty-dejafu/Test/Tasty/DejaFu.hs
Expand Up @@ -35,6 +35,7 @@ module Test.Tasty.DejaFu
, testDejafusWay

, testDejafuDiscard
, testDejafusDiscard

-- ** Re-exports
, Predicate
Expand Down Expand Up @@ -246,6 +247,23 @@ testDejafusWay :: Show b
-> TestTree
testDejafusWay = testconc (const Nothing)

-- | Variant of 'testDejafusWay' which can selectively discard results.
--
-- @since unreleased
testDejafusDiscard :: Show b
=> (Either Failure a -> Maybe Discard)
-- ^ Selectively discard results.
-> Way
-- ^ How to execute the concurrent program.
-> MemType
-- ^ The memory model to use for non-synchronised @CRef@ operations.
-> [(TestName, ProPredicate a b)]
-- ^ The list of predicates (with names) to check.
-> Conc.ConcIO a
-- ^ The computation to test.
-> TestTree
testDejafusDiscard = testconc


-------------------------------------------------------------------------------
-- Refinement property testing
Expand Down

0 comments on commit be66679

Please sign in to comment.