aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2008-03-22 01:20:26 +0100
committerDon Stewart <dons@galois.com>2008-03-22 01:20:26 +0100
commit8435c67b18f6a188824d718be57f64833dfb3cf3 (patch)
treef24bb7469719951ef9c803d0d143587d58698234 /tests
parent890549c7a4e6ec157384feb9e86357181eb280c9 (diff)
downloadxmonad-8435c67b18f6a188824d718be57f64833dfb3cf3.tar.gz
xmonad-8435c67b18f6a188824d718be57f64833dfb3cf3.tar.xz
xmonad-8435c67b18f6a188824d718be57f64833dfb3cf3.zip
add QuickCheck property for Full: it produces one window, it is fullscreen, and it is the current window
darcs-hash:20080322002026-cba2c-3642c7cb7aab09cd86ab0e7c7ac43840f0c7f1a6.gz
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index aa536e3..072de76 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -667,11 +667,23 @@ prop_purelayout_tall n r1 r2 rect (t :: T) =
length ts == length (index t)
&&
noOverlaps (map snd ts)
-
where layoot = Tall n r1 r2
st = fromJust . stack . workspace . current $ t
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
prop_tile_non_overlap rect windows nmaster = noOverlaps (tile pct rect nmaster windows)
where _ = rect :: Rectangle
@@ -822,6 +834,7 @@ main = do
,("tile 1 window fullsize", mytest prop_tile_fullscreen)
,("tiles never overlap", mytest prop_tile_non_overlap)
,("pure layout tall", mytest prop_purelayout_tall)
+ ,("pure layout full", mytest prop_purelayout_full)
]