diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Properties.hs | 17 |
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) |