diff options
author | Brent Yorgey <byorgey@gmail.com> | 2007-10-22 22:41:05 +0200 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2007-10-22 22:41:05 +0200 |
commit | e3ef1c28b8862964f7a211b409edbef6056163dc (patch) | |
tree | 4f89506d223396f228815e2b4b0ccc1608046408 /tests | |
parent | 9134aaf952df72b68c0ea491467ef1a4e8814f5b (diff) | |
download | metatile-e3ef1c28b8862964f7a211b409edbef6056163dc.tar metatile-e3ef1c28b8862964f7a211b409edbef6056163dc.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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Properties.hs | 10 |
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) |