mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
add QuickCheck property for Full: it produces one window, it is fullscreen, and it is the current window
This commit is contained in:
parent
c5cca485df
commit
209b88f821
@ -667,11 +667,23 @@ prop_purelayout_tall n r1 r2 rect (t :: T) =
|
|||||||
length ts == length (index t)
|
length ts == length (index t)
|
||||||
&&
|
&&
|
||||||
noOverlaps (map snd ts)
|
noOverlaps (map snd ts)
|
||||||
|
|
||||||
where layoot = Tall n r1 r2
|
where layoot = Tall n r1 r2
|
||||||
st = fromJust . stack . workspace . current $ t
|
st = fromJust . stack . workspace . current $ t
|
||||||
ts = pureLayout layoot rect st
|
ts = pureLayout layoot rect st
|
||||||
|
|
||||||
|
-- pureLayout works.
|
||||||
|
prop_purelayout_full rect (t :: T) =
|
||||||
|
isJust (peek t) ==>
|
||||||
|
length ts == 1 -- only one window to view
|
||||||
|
&&
|
||||||
|
snd (head ts) == rect -- and sets fullscreen
|
||||||
|
&&
|
||||||
|
fst (head ts) == fromJust (peek t) -- and the focused window is shown
|
||||||
|
|
||||||
|
where layoot = Full
|
||||||
|
st = fromJust . stack . workspace . current $ t
|
||||||
|
ts = pureLayout layoot rect st
|
||||||
|
|
||||||
-- multiple windows
|
-- multiple windows
|
||||||
prop_tile_non_overlap rect windows nmaster = noOverlaps (tile pct rect nmaster windows)
|
prop_tile_non_overlap rect windows nmaster = noOverlaps (tile pct rect nmaster windows)
|
||||||
where _ = rect :: Rectangle
|
where _ = rect :: Rectangle
|
||||||
@ -822,6 +834,7 @@ main = do
|
|||||||
,("tile 1 window fullsize", mytest prop_tile_fullscreen)
|
,("tile 1 window fullsize", mytest prop_tile_fullscreen)
|
||||||
,("tiles never overlap", mytest prop_tile_non_overlap)
|
,("tiles never overlap", mytest prop_tile_non_overlap)
|
||||||
,("pure layout tall", mytest prop_purelayout_tall)
|
,("pure layout tall", mytest prop_purelayout_tall)
|
||||||
|
,("pure layout full", mytest prop_purelayout_full)
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user