Skip to content

Commit

Permalink
Add a failing test for #331
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Dec 28, 2020
1 parent 3d8f1ff commit e166641
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dejafu-tests/lib/Integration/Regressions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Test.DejaFu (exceptionsAlways, gives')
import Control.Concurrent.Classy
import Control.Exception (AsyncException(..))
import qualified Control.Monad.Catch as E
import System.Random (mkStdGen)

import Common

Expand Down Expand Up @@ -78,4 +79,9 @@ tests = toTestList
killThread tId
v <- takeMVar var
pure (v :: Either AsyncException ())

, (:[]) . expectFail $ testDejafuWithSettings (fromWayAndMemType (randomly (mkStdGen 0) 10) defaultMemType) "https://github.com/barrucadu/dejafu/issues/331" (gives' [1]) $
withSetup (atomically $ newTVar (0::Int)) $ \tvar -> atomically $ do
modifyTVar tvar (+1)
readTVar tvar
]

0 comments on commit e166641

Please sign in to comment.