diff options
author | Jason Creighton <jcreigh@gmail.com> | 2007-04-11 06:42:15 +0200 |
---|---|---|
committer | Jason Creighton <jcreigh@gmail.com> | 2007-04-11 06:42:15 +0200 |
commit | 7e88f8a48c3daecff0b5d62219ee2b0a937d8b82 (patch) | |
tree | 13fa85ae236834e80dbd8beb428c33312f38a731 /tests/Properties.hs | |
parent | 399cca198965e1bd1810b72bdf487567688c3861 (diff) | |
download | xmonad-7e88f8a48c3daecff0b5d62219ee2b0a937d8b82.tar.gz xmonad-7e88f8a48c3daecff0b5d62219ee2b0a937d8b82.tar.xz xmonad-7e88f8a48c3daecff0b5d62219ee2b0a937d8b82.zip |
fromList/toList have # of screens + another QC property
darcs-hash:20070411044215-b9aa7-e66ef93fac9102201bfd145ebb26c38bbecd25de.gz
Diffstat (limited to 'tests/Properties.hs')
-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 41f729d..4a4a4b2 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -24,8 +24,9 @@ instance (Ord a, Arbitrary a) => Arbitrary (StackSet a) where arbitrary = do sz <- choose (1,20) n <- choose (0,sz-1) + sc <- choose (1,sz) ls <- vector sz - return $ fromList (n,ls) + return $ fromList (n,sc,ls) coarbitrary = error "no coarbitrary for StackSet" prop_id x = fromList (toList x) == x @@ -96,6 +97,12 @@ prop_ws2screen_screen2ws x = (ws == ws') && (sc == sc') sc' = sort . elems $ ws2screen x _ = x :: T +prop_screenworkspace x = all test [0..((size x)-1)] + where test ws = case screen ws x of + Nothing -> True + Just sc -> workspace sc x == Just ws + _ = x :: T + ------------------------------------------------------------------------ main :: IO () @@ -122,6 +129,7 @@ main = do ,("fullcache ", mytest prop_fullcache) ,("currentwsvisible ", mytest prop_currentwsvisible) ,("ws screen mapping", mytest prop_ws2screen_screen2ws) + ,("screen/workspace ", mytest prop_screenworkspace) ] debug = False |