summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-10-05 01:45:37 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-10-05 01:45:37 +0200
commitfb60d205050cf17ce4778e1279ea8fdb8ae57ef3 (patch)
treeaef53bdaed7fa2a6de36da18ae88bbcff2f27486 /tests
parent93356fea2d1030bda8e313a1a12ee943566bfdd5 (diff)
downloadmetatile-fb60d205050cf17ce4778e1279ea8fdb8ae57ef3.tar
metatile-fb60d205050cf17ce4778e1279ea8fdb8ae57ef3.zip
Add mapLayout
darcs-hash:20071004234537-a5988-504015d5c938a232d1355c0f3c602cf366c20aea
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index bd8bc2b..7ef7e67 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -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)