mirror of
https://github.com/xmonad/xmonad.git
synced 2025-05-19 08:30:21 -07:00
Avoid using instances removed in QuickCheck-2.7
see https://github.com/nick8325/quickcheck/issues/31 for details
This commit is contained in:
parent
28c3482411
commit
69c5dae00d
@ -39,7 +39,7 @@ prop_focus_right (x :: T) = (focusDown (focusUp x)) == x
|
|||||||
prop_focusMaster_idem (x :: T) = focusMaster x == focusMaster (focusMaster x)
|
prop_focusMaster_idem (x :: T) = focusMaster x == focusMaster (focusMaster x)
|
||||||
|
|
||||||
-- focusWindow actually leaves the window focused...
|
-- focusWindow actually leaves the window focused...
|
||||||
prop_focusWindow_works (n :: NonNegative Int) (x :: T) =
|
prop_focusWindow_works (NonNegative (n :: Int)) (x :: T) =
|
||||||
case peek x of
|
case peek x of
|
||||||
Nothing -> True
|
Nothing -> True
|
||||||
Just _ -> let s = index x
|
Just _ -> let s = index x
|
||||||
@ -61,7 +61,7 @@ prop_focus_up_local (x :: T) = hidden_spaces (focusUp x) == hidden_spaces x
|
|||||||
|
|
||||||
prop_focus_master_local (x :: T) = hidden_spaces (focusMaster x) == hidden_spaces x
|
prop_focus_master_local (x :: T) = hidden_spaces (focusMaster x) == hidden_spaces x
|
||||||
|
|
||||||
prop_focusWindow_local (n :: NonNegative Int) (x::T ) =
|
prop_focusWindow_local (NonNegative (n :: Int)) (x::T ) =
|
||||||
case peek x of
|
case peek x of
|
||||||
Nothing -> True
|
Nothing -> True
|
||||||
Just _ -> let s = index x
|
Just _ -> let s = index x
|
||||||
|
@ -65,7 +65,7 @@ prop_purelayout_tall n r1 r2 rect = do
|
|||||||
-- Test message handling of Tall
|
-- Test message handling of Tall
|
||||||
|
|
||||||
-- what happens when we send a Shrink message to Tall
|
-- what happens when we send a Shrink message to Tall
|
||||||
prop_shrink_tall (NonNegative n) (NonZero (NonNegative delta)) (NonNegative frac) =
|
prop_shrink_tall (NonNegative n) (Positive delta) (NonNegative frac) =
|
||||||
n == n' && delta == delta' -- these state components are unchanged
|
n == n' && delta == delta' -- these state components are unchanged
|
||||||
&& frac' <= frac && (if frac' < frac then frac' == 0 || frac' == frac - delta
|
&& frac' <= frac && (if frac' < frac then frac' == 0 || frac' == frac - delta
|
||||||
else frac == 0 )
|
else frac == 0 )
|
||||||
@ -78,9 +78,9 @@ prop_shrink_tall (NonNegative n) (NonZero (NonNegative delta)) (NonNegative frac
|
|||||||
|
|
||||||
-- what happens when we send a Shrink message to Tall
|
-- what happens when we send a Shrink message to Tall
|
||||||
prop_expand_tall (NonNegative n)
|
prop_expand_tall (NonNegative n)
|
||||||
(NonZero (NonNegative delta))
|
(Positive delta)
|
||||||
(NonNegative n1)
|
(NonNegative n1)
|
||||||
(NonZero (NonNegative d1)) =
|
(Positive d1) =
|
||||||
|
|
||||||
n == n'
|
n == n'
|
||||||
&& delta == delta' -- these state components are unchanged
|
&& delta == delta' -- these state components are unchanged
|
||||||
@ -97,7 +97,7 @@ prop_expand_tall (NonNegative n)
|
|||||||
-- pureMessage :: layout a -> SomeMessage -> Maybe (layout a)
|
-- pureMessage :: layout a -> SomeMessage -> Maybe (layout a)
|
||||||
|
|
||||||
-- what happens when we send an IncMaster message to Tall
|
-- what happens when we send an IncMaster message to Tall
|
||||||
prop_incmaster_tall (NonNegative n) (NonZero (NonNegative delta)) (NonNegative frac)
|
prop_incmaster_tall (NonNegative n) (Positive delta) (NonNegative frac)
|
||||||
(NonNegative k) =
|
(NonNegative k) =
|
||||||
delta == delta' && frac == frac' && n' == n + k
|
delta == delta' && frac == frac' && n' == n + k
|
||||||
where
|
where
|
||||||
|
@ -24,7 +24,7 @@ prop_screens_works (x :: T) = screens x == current x : visible x
|
|||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Hints
|
-- Hints
|
||||||
|
|
||||||
prop_resize_inc (NonZero (NonNegative inc_w),NonZero (NonNegative inc_h)) b@(w,h) =
|
prop_resize_inc (Positive inc_w,Positive inc_h) b@(w,h) =
|
||||||
w' `mod` inc_w == 0 && h' `mod` inc_h == 0
|
w' `mod` inc_w == 0 && h' `mod` inc_h == 0
|
||||||
where (w',h') = applyResizeIncHint a b
|
where (w',h') = applyResizeIncHint a b
|
||||||
a = (inc_w,inc_h)
|
a = (inc_w,inc_h)
|
||||||
@ -34,7 +34,7 @@ prop_resize_inc_extra ((NonNegative inc_w)) b@(w,h) =
|
|||||||
where (w',h') = applyResizeIncHint a b
|
where (w',h') = applyResizeIncHint a b
|
||||||
a = (-inc_w,0::Dimension)-- inc_h)
|
a = (-inc_w,0::Dimension)-- inc_h)
|
||||||
|
|
||||||
prop_resize_max (NonZero (NonNegative inc_w),NonZero (NonNegative inc_h)) b@(w,h) =
|
prop_resize_max (Positive inc_w,Positive inc_h) b@(w,h) =
|
||||||
w' <= inc_w && h' <= inc_h
|
w' <= inc_w && h' <= inc_h
|
||||||
where (w',h') = applyMaxSizeHint a b
|
where (w',h') = applyMaxSizeHint a b
|
||||||
a = (inc_w,inc_h)
|
a = (inc_w,inc_h)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user