diff options
author | Devin Mullins <me@twifkak.com> | 2007-10-06 09:31:29 +0200 |
---|---|---|
committer | Devin Mullins <me@twifkak.com> | 2007-10-06 09:31:29 +0200 |
commit | a660c5467c5912269149ce260ccddeb84c1152b4 (patch) | |
tree | af84f54a4b9ae2c7bcb1d187b461de41acbec7b0 | |
parent | c2660446c1e389a176b4838a56e27cd85998378c (diff) | |
download | xmonad-a660c5467c5912269149ce260ccddeb84c1152b4.tar.gz xmonad-a660c5467c5912269149ce260ccddeb84c1152b4.tar.xz xmonad-a660c5467c5912269149ce260ccddeb84c1152b4.zip |
add mapWorkspace tests
(just completely duplicated the two mapLayout tests :)
darcs-hash:20071006073129-78224-d1303612fd8e2f9ede740831b031a88914ee833a.gz
-rw-r--r-- | tests/Properties.hs | 8 |
1 files changed, 8 insertions, 0 deletions
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) |