Skip to content

Commit

Permalink
Add a super simple failing test for idempotent map insert
Browse files Browse the repository at this point in the history
  • Loading branch information
rrnewton committed May 11, 2016
1 parent 5135f51 commit 642d2e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions haskell/lvish/tests/CommonMapTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ v7a = fmap (L.sort . F.toList) $
return mp


case_doubleInsert :: Assertion
case_doubleInsert = assertEqual "double insert on a map"
True
(runPar $ isDet $ do
mp <- IM.newEmptyMap
IM.insert (3::Int) True mp
IM.insert 3 True mp
IM.getKey 3 mp)


--------------------------------------------------------------------------------
-- Tests that use `forEachHP`
--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions haskell/lvish/tests/CommonMapWriteTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ case_fillFreeze1K = assertEqual "fill and then freeze"
(sum [0..sz-1])
(case sortFrzn (fillNFreeze sz) of AFoldable x -> F.foldl' (+) 0 x)
where sz = 1000

0 comments on commit 642d2e1

Please sign in to comment.