mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-03 21:51:53 -07:00
2 more properties for promote.
This commit is contained in:
@@ -103,13 +103,25 @@ prop_screenworkspace x = all test [0..((fromIntegral $ size x)-1)]
|
|||||||
Nothing -> True
|
Nothing -> True
|
||||||
Just sc -> workspace sc x == Just ws
|
Just sc -> workspace sc x == Just ws
|
||||||
_ = x :: T
|
_ = x :: T
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- promote is idempotent
|
||||||
prop_promote2 x = promote (promote x) == (promote x)
|
prop_promote2 x = promote (promote x) == (promote x)
|
||||||
where _ = x :: T
|
where _ = x :: T
|
||||||
|
|
||||||
prop_promotefocus x = focus (promote x) == focus x -- focus doesn't change
|
-- focus doesn't change
|
||||||
|
prop_promotefocus x = focus (promote x) == focus x
|
||||||
where _ = x :: T
|
where _ = x :: T
|
||||||
|
|
||||||
|
-- screen certainly should't change
|
||||||
|
prop_promotecurrent x = current (promote x) == current x
|
||||||
|
where _ = x :: T
|
||||||
|
|
||||||
|
-- promote doesn't mess with other windows
|
||||||
|
prop_promoterotate x b = focus (rotate dir (promote x)) == focus (rotate dir x)
|
||||||
|
where _ = x :: T
|
||||||
|
dir = if b then LT else GT
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
@@ -137,8 +149,11 @@ main = do
|
|||||||
,("currentwsvisible ", mytest prop_currentwsvisible)
|
,("currentwsvisible ", mytest prop_currentwsvisible)
|
||||||
,("ws screen mapping", mytest prop_ws2screen_screen2ws)
|
,("ws screen mapping", mytest prop_ws2screen_screen2ws)
|
||||||
,("screen/workspace ", mytest prop_screenworkspace)
|
,("screen/workspace ", mytest prop_screenworkspace)
|
||||||
|
|
||||||
,("promote idempotent", mytest prop_promote2)
|
,("promote idempotent", mytest prop_promote2)
|
||||||
,("promote/focus", mytest prop_promotefocus)
|
,("promote focus", mytest prop_promotefocus)
|
||||||
|
,("promote current", mytest prop_promotecurrent)
|
||||||
|
,("promote only swaps", mytest prop_promoterotate)
|
||||||
]
|
]
|
||||||
|
|
||||||
debug = False
|
debug = False
|
||||||
|
Reference in New Issue
Block a user