aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDevin Mullins <me@twifkak.com>2008-09-11 07:39:09 +0200
committerDevin Mullins <me@twifkak.com>2008-09-11 07:39:09 +0200
commit3fee57a0c800f3222778359d73823f97c9d546ae (patch)
treec53f64016659b2c88e7ce5aaf3e81e2fdc91bd1c /tests
parent1b780c7dffe376604590901d96296546de4c0449 (diff)
downloadxmonad-3fee57a0c800f3222778359d73823f97c9d546ae.tar.gz
xmonad-3fee57a0c800f3222778359d73823f97c9d546ae.tar.xz
xmonad-3fee57a0c800f3222778359d73823f97c9d546ae.zip
add W.shiftMaster, fix float/tile-reordering bug
darcs-hash:20080911053909-78224-d050fdbedac4eb39a96f30ec0679a9b67d274091.gz
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 9b0e83c..8a8ab04 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -528,6 +528,18 @@ prop_shift_reversible i (x :: T) =
y = swapMaster x
n = tag (workspace $ current y)
+------------------------------------------------------------------------
+-- shiftMaster
+
+-- focus/local/idempotent same as swapMaster:
+prop_shift_master_focus (x :: T) = peek x == (peek $ shiftMaster x)
+prop_shift_master_local (x :: T) = hidden_spaces x == hidden_spaces (shiftMaster x)
+prop_shift_master_idempotent (x :: T) = shiftMaster (shiftMaster x) == shiftMaster x
+-- ordering is constant modulo the focused window:
+prop_shift_master_ordering (x :: T) = case peek x of
+ Nothing -> True
+ Just m -> L.delete m (index x) == L.delete m (index $ shiftMaster x)
+
-- ---------------------------------------------------------------------
-- shiftWin
@@ -933,6 +945,11 @@ main = do
,("swapUp is local" , mytest prop_swap_left_local)
,("swapDown is local" , mytest prop_swap_right_local)
+ ,("shiftMaster id on focus", mytest prop_shift_master_focus)
+ ,("shiftMaster is local", mytest prop_shift_master_local)
+ ,("shiftMaster is idempotent", mytest prop_shift_master_idempotent)
+ ,("shiftMaster preserves ordering", mytest prop_shift_master_ordering)
+
,("shift: invariant" , mytest prop_shift_I)
,("shift is reversible" , mytest prop_shift_reversible)
,("shiftWin: invariant" , mytest prop_shift_win_I)