summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-04-30 07:01:33 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-04-30 07:01:33 +0200
commit2d38e7b6281e2c8b808b7ce90cdb36665b9853ba (patch)
tree68cb22aa001ff60eb586db683188fcef2fecc123
parentbf5fefaac019d75d100d7e02bee48d03c90260aa (diff)
downloadmetatile-2d38e7b6281e2c8b808b7ce90cdb36665b9853ba.tar
metatile-2d38e7b6281e2c8b808b7ce90cdb36665b9853ba.zip
new QC property: opening a window only affects the current screen
darcs-hash:20070430050133-9c5c1-32823e4a47119867b1425a8bbe81af44dc8b7f1e
-rw-r--r--tests/Properties.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 91ffe33..7d0fb88 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -172,6 +172,13 @@ prop_promoterotate x b = focus (rotate dir (promote x)) == focus (rotate dir x)
where _ = x :: T
dir = if b then LT else GT
+-- push shouldn't change anything but the current workspace
+prop_push_local (x :: T) i = not (member i x) ==> hidden x == hidden (push i x)
+ where
+ hidden w = [ index n w | n <- [0 ..sz-1], n /= current w ]
+ sz = M.size (stacks x)
+
+
------------------------------------------------------------------------
-- some properties for layouts:
@@ -272,6 +279,7 @@ main = do
,("size/push ", mytest prop_sizepush)
,("height/push ", mytest prop_currentpush)
,("push/peek ", mytest prop_pushpeek)
+ ,("push is local" , mytest prop_push_local)
,("peek/peekStack" , mytest prop_peek_peekStack)
,("not . peek/peekStack", mytest prop_notpeek_peekStack)