Add mapLayout

This commit is contained in:
Spencer Janssen
2007-10-04 23:45:37 +00:00
parent 65f3f4db8a
commit 42b691d515
2 changed files with 15 additions and 2 deletions

View File

@@ -602,6 +602,10 @@ prop_rename1 (x::T) o n = o `tagMember` x && not (n `tagMember` x) ==>
prop_ensure (x :: T) l xs = let y = ensureTags l xs x
in and [ n `tagMember` y | n <- xs ]
prop_mapLayoutId (x::T) = x == mapLayout id x
prop_mapLayoutInverse (x::T) = x == mapLayout pred (mapLayout succ x)
------------------------------------------------------------------------
-- some properties for layouts:
@@ -740,6 +744,9 @@ main = do
,("renaming works", mytest prop_rename1)
,("ensure works", mytest prop_ensure)
,("mapLayout id", mytest prop_mapLayoutId)
,("mapLayout inverse", mytest prop_mapLayoutInverse)
-- testing for failure:
,("abort fails", mytest prop_abort)
,("new fails with abort", mytest prop_new_abort)