aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2007-10-22 22:41:05 +0200
committerBrent Yorgey <byorgey@gmail.com>2007-10-22 22:41:05 +0200
commit0537e591a915f47c9227940163a16df40f14eedb (patch)
tree4f89506d223396f228815e2b4b0ccc1608046408 /tests
parente8928472be87183609883032a09fe01dfb3195b6 (diff)
downloadxmonad-0537e591a915f47c9227940163a16df40f14eedb.tar.gz
xmonad-0537e591a915f47c9227940163a16df40f14eedb.tar.xz
xmonad-0537e591a915f47c9227940163a16df40f14eedb.zip
Replace 'findIndex' with 'findTag', which more accurately describes what the function does.
I realize this is a big change, but the name 'findIndex' was confusing for me, since I expected it to return some sort of integer. What it actually does, of course, is return a workspace tag, which might be more general than an index. Of course, this change breaks several contrib modules; I'll submit a patch to make the change there as well. darcs-hash:20071022204105-bd4d7-9f5d5b8ce00c61b4830fde329f528b2d79af2fa6.gz
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs
index 77a16cb..e62172d 100644
--- a/tests/Properties.hs
+++ b/tests/Properties.hs
@@ -351,14 +351,14 @@ prop_focusWindow_local (n :: NonNegative Int) (x::T ) =
in hidden_spaces (focusWindow (s !! i) x) == hidden_spaces x
-- ---------------------------------------------------------------------
--- member/findIndex
+-- member/findTag
--
--- For all windows in the stackSet, findIndex should identify the
+-- For all windows in the stackSet, findTag should identify the
-- correct workspace
--
prop_findIndex (x :: T) =
- and [ tag w == fromJust (findIndex i x)
+ and [ tag w == fromJust (findTag i x)
| w <- workspace (current x) : map workspace (visible x) ++ hidden x
, t <- maybeToList (stack w)
, i <- focus t : up t ++ down t
@@ -529,7 +529,7 @@ prop_shift_win_indentity i w (x :: T) =
-- 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) =
- i `tagMember` x && w `member` x && i /= n && findIndex w x /= Just n
+ i `tagMember` x && w `member` x && i /= n && findTag w x /= Just n
==> (current $ x) == (current $ shiftWin i w x)
where
n = tag (workspace $ current x)
@@ -707,7 +707,7 @@ main = do
,("focusWindow is local", mytest prop_focusWindow_local)
,("focusWindow works" , mytest prop_focusWindow_works)
- ,("findIndex" , mytest prop_findIndex)
+ ,("findTag" , mytest prop_findIndex)
,("allWindows/member" , mytest prop_allWindowsMember)
,("insert: invariant" , mytest prop_insertUp_I)