aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2008-03-22 01:12:29 +0100
committerDon Stewart <dons@galois.com>2008-03-22 01:12:29 +0100
commit890549c7a4e6ec157384feb9e86357181eb280c9 (patch)
tree3321d905ec8bcc1adf4ddb614ea5a31b7826260b
parent5157267ea0ede6639aa5f9826234ab7a0513500f (diff)
downloadxmonad-890549c7a4e6ec157384feb9e86357181eb280c9.tar.gz
xmonad-890549c7a4e6ec157384feb9e86357181eb280c9.tar.xz
xmonad-890549c7a4e6ec157384feb9e86357181eb280c9.zip
QC for pureLayout. confirm pureLayout . Tall produces no overlaps
darcs-hash:20080322001229-cba2c-b9d9ced9a89cde9f5399f25355b6d43514a5bdc0.gz
-rw-r--r--tests/Properties.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 49b09fe..aa536e3 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -3,6 +3,7 @@ module Properties where
import XMonad.StackSet hiding (filter)
import XMonad.Layout
+import XMonad.Core (pureLayout)
import qualified XMonad.StackSet as S (filter)
import Debug.Trace
@@ -660,6 +661,17 @@ prop_mapLayoutInverse (x::T) = x == mapLayout pred (mapLayout succ x)
prop_tile_fullscreen rect = tile pct rect 1 1 == [rect]
where pct = 1/2
+-- pureLayout works.
+prop_purelayout_tall n r1 r2 rect (t :: T) =
+ isJust (peek 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
+
-- multiple windows
prop_tile_non_overlap rect windows nmaster = noOverlaps (tile pct rect nmaster windows)
where _ = rect :: Rectangle
@@ -809,6 +821,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)
]