mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
X.A.CycleRecentWS: Make unView work with greedyView as well
Entirely unnecessary for the current version of `cycleWindowSets`, but if anyone ever wants to use `greedyView`, this shows that it's not at all complicated to adapt `unView` to that.
This commit is contained in:
@@ -6,7 +6,7 @@ import Test.Hspec.QuickCheck
|
||||
import Test.QuickCheck
|
||||
|
||||
import XMonad.Actions.CycleRecentWS (unView)
|
||||
import XMonad.StackSet (view, mapLayout)
|
||||
import XMonad.StackSet (view, greedyView, mapLayout)
|
||||
|
||||
import Instances
|
||||
import Utils (tags)
|
||||
@@ -17,7 +17,8 @@ spec = do
|
||||
|
||||
prop_unView :: T -> Property
|
||||
prop_unView ss = conjoin
|
||||
[ counterexample (show t) (unView ss (state (view t ss)) === state ss)
|
||||
| t <- tags ss ]
|
||||
[ counterexample desc (unView ss (state (v t ss)) === state ss)
|
||||
| t <- tags ss
|
||||
, (desc, v) <- [("view " <> show t, view), ("greedyView " <> show t, greedyView)] ]
|
||||
where
|
||||
state = mapLayout succ
|
||||
|
Reference in New Issue
Block a user