1
0
mirror of https://github.com/xmonad/xmonad-contrib.git synced 2025-07-30 03:31:51 -07:00
Files
.github
XMonad
scripts
tests
CycleRecentWS.hs
EZConfig.hs
ExtensibleConf.hs
GridSelect.hs
Instances.hs
Main.hs
ManageDocks.hs
NoBorders.hs
OrgMode.hs
RotateSome.hs
Selective.hs
SwapWorkspaces.hs
Utils.hs
XPrompt.hs
.gitignore
.hlint.yaml
.mailmap
CHANGES.md
CONTRIBUTING.md
LICENSE
NIX.md
README.md
Setup.lhs
cabal.haskell-ci
cabal.project
flake.nix
stack-master.yaml
stack.yaml
xmonad-contrib.cabal
xmonad-contrib/tests/CycleRecentWS.hs
slotThe bd5b969d9b Apply hlint hints
All hints are applied in one single commit, as a commit per hint would
result in 80+ separate commits—tihs is really just too much noise.

Related: https://github.com/xmonad/xmonad-contrib/issues/537
2021-06-06 18:59:05 +02:00

25 lines
585 B
Haskell

{-# OPTIONS_GHC -Wall #-}
module CycleRecentWS where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import XMonad.Actions.CycleRecentWS (unView)
import XMonad.StackSet (view, greedyView, mapLayout)
import Instances
import Utils (tags)
spec :: Spec
spec = do
prop "prop_unView" prop_unView
prop_unView :: T -> Property
prop_unView ss = conjoin
[ 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