File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Control.Monad.Free
55import qualified DeferredFolds.UnfoldlM as UnfoldlM
66import qualified Focus
77import qualified StmContainers.Set as StmSet
8+ import qualified ListT
89import Test.QuickCheck.Instances ()
910import Test.Tasty
1011import Test.Tasty.HUnit
@@ -61,6 +62,12 @@ tests =
6162 unsafePerformIO $ atomically $
6263 stmSetFromList xs >>= stmSetToList
6364 in sort (nub xs) === sort setList,
65+ testProperty " listTNonAtomicIsomorphism" $ \ (xs :: [Int ]) ->
66+ let setList =
67+ unsafePerformIO $ do
68+ set <- atomically (stmSetFromList xs)
69+ ListT. toList (StmSet. listTNonAtomic set)
70+ in sort (nub xs) === sort setList,
6471 testProperty " insertDeleteWithCollisions" $ \ (ks :: [TestKey ]) ->
6572 let dropped = take (length ks `div` 2 ) ks
6673 (finalSize, finalList) =
You can’t perform that action at this time.
0 commit comments