From bfefeedb40f30db5142a31603a62def123cd1794 Mon Sep 17 00:00:00 2001 From: Devin Mullins Date: Thu, 11 Sep 2008 07:39:09 +0200 Subject: add W.shiftMaster, fix float/tile-reordering bug darcs-hash:20080911053909-78224-d050fdbedac4eb39a96f30ec0679a9b67d274091 --- tests/Properties.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3