From f7234ee877eecbea7a3cfe1c9f6ecfe7c68b5ef7 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Fri, 7 Mar 2008 19:09:05 +0100 Subject: bit more code coverage darcs-hash:20080307180905-cba2c-723aab5ae3ca821207bdc70dbd05a8da8d1822ea --- tests/Properties.hs | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v1.2.3