From a660c5467c5912269149ce260ccddeb84c1152b4 Mon Sep 17 00:00:00 2001
From: Devin Mullins <me@twifkak.com>
Date: Sat, 6 Oct 2007 09:31:29 +0200
Subject: add mapWorkspace tests

(just completely duplicated the two mapLayout tests :)

darcs-hash:20071006073129-78224-d1303612fd8e2f9ede740831b031a88914ee833a.gz
---
 tests/Properties.hs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/Properties.hs b/tests/Properties.hs
index 7a05ecd..a7ce18f 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -610,6 +610,12 @@ 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_mapWorkspaceId (x::T) = x == mapWorkspace id x
+
+prop_mapWorkspaceInverse (x::T) = x == mapWorkspace predTag (mapWorkspace succTag x)
+  where predTag w = w { tag = pred $ tag w }
+        succTag w = w { tag = succ $ tag w }
+
 prop_mapLayoutId (x::T) = x == mapLayout id x
 
 prop_mapLayoutInverse (x::T) = x == mapLayout pred (mapLayout succ x)
@@ -752,6 +758,8 @@ main = do
         ,("renaming works",     mytest prop_rename1)
         ,("ensure works",     mytest prop_ensure)
 
+        ,("mapWorkspace id", mytest prop_mapWorkspaceId)
+        ,("mapWorkspace inverse", mytest prop_mapWorkspaceInverse)
         ,("mapLayout id", mytest prop_mapLayoutId)
         ,("mapLayout inverse", mytest prop_mapLayoutInverse)
 
-- 
cgit v1.2.3