aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-05-02 22:16:22 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-05-02 22:16:22 +0200
commit2ce844d521b9360c287873d8dfcd37662ede5abb (patch)
treed9c03695ba08c768232b5475eda01dc48e4e9777 /tests
parente8b06cf749fb78c66a9ede1c4a56f90f8eb498c6 (diff)
downloadxmonad-2ce844d521b9360c287873d8dfcd37662ede5abb.tar.gz
xmonad-2ce844d521b9360c287873d8dfcd37662ede5abb.tar.xz
xmonad-2ce844d521b9360c287873d8dfcd37662ede5abb.zip
Fix tests after StackSet changes
darcs-hash:20070502201622-a5988-ac80f011c59276c52314ea128c07a54487c9bee9.gz
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 3b57dff..1240734 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -66,8 +66,9 @@ instance (Integral i, Integral j, Ord a, Arbitrary a) => Arbitrary (StackSet i j
--
-- All operations must preserve this.
--
-invariant (w :: T) = inBounds w && noDuplicates (concat $ M.elems (stacks w))
+invariant (w :: T) = inBounds w && noDuplicates allWindows
where
+ allWindows = concatMap (uncurry (++)) . M.elems . stacks $ w
noDuplicates ws = nub ws == ws
inBounds x = current x >= 0 && current x < sz where sz = M.size (stacks x)
@@ -76,7 +77,7 @@ prop_invariant = invariant
-- empty StackSets have no windows in them
-prop_empty n m = n > 0 && m > 0 ==> all null (M.elems (stacks x))
+prop_empty n m = n > 0 && m > 0 ==> all (null . uncurry (++)) (M.elems (stacks x))
where x = empty n m :: T
-- empty StackSets always have focus on workspace 0