diff options
author | Don Stewart <dons@galois.com> | 2008-02-25 19:03:50 +0100 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2008-02-25 19:03:50 +0100 |
commit | 4132a7e3eb7cb968c2c6d733cb9989b0f42a4e2f (patch) | |
tree | c4de98cda1f08af02bb7a2198c3372f70f1a6c6f | |
parent | 59b7d6df4ecc006ffb19fe4dd6eb7523875617ce (diff) | |
download | xmonad-4132a7e3eb7cb968c2c6d733cb9989b0f42a4e2f.tar.gz xmonad-4132a7e3eb7cb968c2c6d733cb9989b0f42a4e2f.tar.xz xmonad-4132a7e3eb7cb968c2c6d733cb9989b0f42a4e2f.zip |
incorrect invariant test for greedyView
darcs-hash:20080225180350-cba2c-95b57af5f105496a17148c49578ae83d1e0f0a35.gz
-rw-r--r-- | tests/Properties.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs index e96b03f..ec2e32a 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -139,7 +139,7 @@ prop_view_I (n :: NonNegative Int) (x :: T) = n `tagMember` x ==> invariant $ view (fromIntegral n) x prop_greedyView_I (n :: NonNegative Int) (x :: T) = - n `tagMember` x ==> invariant $ view (fromIntegral n) x + n `tagMember` x ==> invariant $ greedyView (fromIntegral n) x prop_focusUp_I (n :: NonNegative Int) (x :: T) = invariant $ foldr (const focusUp) x [1..n] @@ -236,6 +236,13 @@ prop_greedyView_current (x :: T) (n :: NonNegative Int) = i `tagMember` x ==> where i = fromIntegral n +-- greedyView leaves things unchanged for invalid workspaces +prop_greedyView_current_id (x :: T) (n :: NonNegative Int) = not (i `tagMember` x) ==> + tag (workspace $ current (greedyView i x)) == j + where + i = fromIntegral n + j = tag (workspace (current x)) + -- greedyView *only* sets the current workspace, and touches Xinerama. -- no workspace contents will be changed. prop_greedyView_local (x :: T) (n :: NonNegative Int) = i `tagMember` x ==> @@ -675,6 +682,7 @@ main = do ,("greedyView : invariant" , mytest prop_greedyView_I) ,("greedyView sets current" , mytest prop_greedyView_current) + ,("greedyView is safe " , mytest prop_greedyView_current_id) ,("greedyView idempotent" , mytest prop_greedyView_idem) ,("greedyView reversible" , mytest prop_greedyView_reversible) ,("greedyView is local" , mytest prop_greedyView_local) |