From 2d38e7b6281e2c8b808b7ce90cdb36665b9853ba Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Mon, 30 Apr 2007 07:01:33 +0200 Subject: new QC property: opening a window only affects the current screen darcs-hash:20070430050133-9c5c1-32823e4a47119867b1425a8bbe81af44dc8b7f1e --- tests/Properties.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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) -- cgit v1.2.3