Skip to content

Commit

Permalink
Fix and reinstate the recently commented tests.
Browse files Browse the repository at this point in the history
The not working tests were using the join function which we renamed to
link because of Applicative being introduced to Prelude. Nevertheless,
I forgot to update the tests. Fixing now.
  • Loading branch information
foxik committed Dec 4, 2013
1 parent 4027319 commit ad7ed3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions tests/map-properties.hs
Expand Up @@ -137,7 +137,7 @@ main = defaultMain
, testProperty "deleteMax" prop_deleteMax
, testProperty "split" prop_split
, testProperty "splitRoot" prop_splitRoot
-- , testProperty "split then join" prop_join
, testProperty "split then link" prop_link
, testProperty "split then merge" prop_merge
, testProperty "union" prop_union
, testProperty "union model" prop_unionModel
Expand Down Expand Up @@ -870,9 +870,9 @@ prop_splitRoot s = loop ls && (s == unions ls)
, y <- toList (unions rst)
, x > y ]

-- prop_join :: Int -> UMap -> Bool
-- prop_join k t = let (l,r) = split k t
-- in valid (join k () l r)
prop_link :: Int -> UMap -> Bool
prop_link k t = let (l,r) = split k t
in valid (link k () l r)

prop_merge :: Int -> UMap -> Bool
prop_merge k t = let (l,r) = split k t
Expand Down
10 changes: 5 additions & 5 deletions tests/set-properties.hs
Expand Up @@ -31,7 +31,7 @@ main = defaultMain [ testCase "lookupLT" test_lookupLT
, testProperty "prop_InsertValid" prop_InsertValid
, testProperty "prop_InsertDelete" prop_InsertDelete
, testProperty "prop_DeleteValid" prop_DeleteValid
-- , testProperty "prop_Join" prop_Join
, testProperty "prop_Link" prop_Link
, testProperty "prop_Merge" prop_Merge
, testProperty "prop_UnionValid" prop_UnionValid
, testProperty "prop_UnionInsert" prop_UnionInsert
Expand Down Expand Up @@ -216,10 +216,10 @@ prop_DeleteValid k = forValidUnitTree $ \t -> valid (delete k (insert k t))
{--------------------------------------------------------------------
Balance
--------------------------------------------------------------------}
-- prop_Join :: Int -> Property
-- prop_Join x = forValidUnitTree $ \t ->
-- let (l,r) = split x t
-- in valid (join x l r)
prop_Link :: Int -> Property
prop_Link x = forValidUnitTree $ \t ->
let (l,r) = split x t
in valid (link x l r)

prop_Merge :: Int -> Property
prop_Merge x = forValidUnitTree $ \t ->
Expand Down

0 comments on commit ad7ed3b

Please sign in to comment.