summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2008-03-07 19:09:05 +0100
committerDon Stewart <dons@galois.com>2008-03-07 19:09:05 +0100
commitf7234ee877eecbea7a3cfe1c9f6ecfe7c68b5ef7 (patch)
tree489752800ff258a7360d0b2a26a08b0708693cad
parent464d07d8aae2938a84f45e6f0f97f09a80ad2430 (diff)
downloadmetatile-f7234ee877eecbea7a3cfe1c9f6ecfe7c68b5ef7.tar
metatile-f7234ee877eecbea7a3cfe1c9f6ecfe7c68b5ef7.zip
bit more code coverage
darcs-hash:20080307180905-cba2c-723aab5ae3ca821207bdc70dbd05a8da8d1822ea
-rw-r--r--tests/Properties.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 0448776..23d6c8b 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -355,6 +355,10 @@ prop_focusWindow_local (n :: NonNegative Int) (x::T ) =
i = fromIntegral n `mod` length s
in hidden_spaces (focusWindow (s !! i) x) == hidden_spaces x
+-- On an invalid window, the stackset is unmodified
+prop_focusWindow_identity (n :: Char) (x::T ) =
+ not (n `member` x) ==> focusWindow n x == x
+
-- ---------------------------------------------------------------------
-- member/findTag
@@ -718,6 +722,7 @@ main = do
,("focusWindow is local", mytest prop_focusWindow_local)
,("focusWindow works" , mytest prop_focusWindow_works)
+ ,("focusWindow identity", mytest prop_focusWindow_identity)
,("findTag" , mytest prop_findIndex)
,("allWindows/member" , mytest prop_allWindowsMember)