aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2007-09-29 01:57:45 +0200
committerDon Stewart <dons@galois.com>2007-09-29 01:57:45 +0200
commit0707db1c12a03382f9749613542cc432af1566f4 (patch)
tree9e61c9566f8a88e1d6f9127636b9656765dd1938 /tests
parent4ed2a4258d7c633706190eaf81abcf7ccdd67c2a (diff)
downloadxmonad-0707db1c12a03382f9749613542cc432af1566f4.tar.gz
xmonad-0707db1c12a03382f9749613542cc432af1566f4.tar.xz
xmonad-0707db1c12a03382f9749613542cc432af1566f4.zip
100% coverage of alternative branches
darcs-hash:20070928235745-cba2c-c8d9bd87100da803d11d00300bfd6486bbc29911.gz
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 138924f..385769e 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -519,6 +519,10 @@ prop_shift_win_focus i (x :: T) =
Nothing -> True
Just w -> shiftWin i w x == shift i x
+-- shiftWin on a non-existant window is identity
+prop_shift_win_indentity i w (x :: T) =
+ i `tagMember` x && not (w `member` x) ==> shiftWin i w x == x
+
-- shiftWin leaves the current screen as it is, if neither i is the tag
-- of the current workspace nor w on the current workspace
prop_shift_win_fix_current i w (x :: T) =
@@ -568,6 +572,8 @@ prop_new_abort x = unsafePerformIO $ C.catch f
_ = x :: Int
+-- prop_view_should_fail = view {- with some bogus data -}
+
------------------------------------------------------------------------
-- some properties for layouts:
@@ -702,8 +708,9 @@ main = do
,("lookupTagOnScreen", mytest prop_lookup_current)
-- testing for failure:
- ,("abort fails", mytest prop_abort)
- ,("new fails with abort", mytest prop_new_abort)
+ ,("abort fails", mytest prop_abort)
+ ,("new fails with abort", mytest prop_new_abort)
+ ,("shiftWin identity", mytest prop_shift_win_indentity)
{-
,("tile 1 window fullsize", mytest prop_tile_fullscreen)