aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaniel <daniel@wagner-home.com>2007-03-28 04:53:37 +0200
committerdaniel <daniel@wagner-home.com>2007-03-28 04:53:37 +0200
commitfa39c478ec32fd04af0edd3f08321cf774da2a25 (patch)
treed722fee5cfc14aa29e34315afc474da1bb4540d7
parente776043d34998ae95bbba57c91e6828372d2acb7 (diff)
downloadxmonad-fa39c478ec32fd04af0edd3f08321cf774da2a25.tar.gz
xmonad-fa39c478ec32fd04af0edd3f08321cf774da2a25.tar.xz
xmonad-fa39c478ec32fd04af0edd3f08321cf774da2a25.zip
added a quickcheck property
darcs-hash:20070328025337-c98ca-5ce390ce8d1d5f5a35fe1ba851cf09fc96ca7183.gz
-rw-r--r--tests/Properties.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 503330f..9e5a0fd 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -10,6 +10,7 @@ import System.IO
import System.Random
import Text.Printf
import Data.List (nub,sort,group,sort,intersperse)
+import Data.Map (keys,elems)
-- ---------------------------------------------------------------------
-- QuickCheck properties for the StackSet
@@ -80,6 +81,11 @@ prop_shiftshift r x =
in shift n (shift r x) == x
where _ = x :: T
+prop_fullcache x = cached == allvals where
+ cached = sort . keys $ cache x
+ allvals = sort . concat . elems $ stacks x
+ _ = x :: T
+
------------------------------------------------------------------------
main :: IO ()
@@ -103,6 +109,7 @@ main = do
,("delete idempotent", mytest prop_delete2)
,("rotate/rotate ", mytest prop_rotaterotate)
,("view/view ", mytest prop_viewview)
+ ,("fullcache ", mytest prop_fullcache)
]
debug = False