aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vogt <vogt.adam@gmail.com>2015-03-01 14:50:49 +0100
committerAdam Vogt <vogt.adam@gmail.com>2015-03-01 14:50:49 +0100
commit130e0d8c351d4c7a3f00fa7669a12333c3b7e75f (patch)
tree1a267f8685de1356ce268ccc97d1d6925fc4fed9
parent883fae53d9c3d892d39909e06d035860a3e0e45f (diff)
downloadxmonad-130e0d8c351d4c7a3f00fa7669a12333c3b7e75f.tar.gz
xmonad-130e0d8c351d4c7a3f00fa7669a12333c3b7e75f.tar.xz
xmonad-130e0d8c351d4c7a3f00fa7669a12333c3b7e75f.zip
Avoid using instances removed in QuickCheck-2.7
Ignore-this: 4f9b3906b88ae6a94602e2b29a3eecfc see https://github.com/nick8325/quickcheck/issues/31 for details darcs-hash:20150301135049-1499c-f19e63c6780c29fbc4d2f3b32fdefd6afe4f0e2a.gz
Diffstat (limited to '')
-rw-r--r--tests/Properties/Focus.hs4
-rw-r--r--tests/Properties/Layout/Tall.hs8
-rw-r--r--tests/Properties/Screen.hs4
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/Properties/Focus.hs b/tests/Properties/Focus.hs
index 865dc72..6bc0055 100644
--- a/tests/Properties/Focus.hs
+++ b/tests/Properties/Focus.hs
@@ -39,7 +39,7 @@ prop_focus_right (x :: T) = (focusDown (focusUp x)) == x
prop_focusMaster_idem (x :: T) = focusMaster x == focusMaster (focusMaster x)
-- 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
Nothing -> True
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_focusWindow_local (n :: NonNegative Int) (x::T ) =
+prop_focusWindow_local (NonNegative (n :: Int)) (x::T ) =
case peek x of
Nothing -> True
Just _ -> let s = index x
diff --git a/tests/Properties/Layout/Tall.hs b/tests/Properties/Layout/Tall.hs
index 2f836ef..5353e62 100644
--- a/tests/Properties/Layout/Tall.hs
+++ b/tests/Properties/Layout/Tall.hs
@@ -65,7 +65,7 @@ prop_purelayout_tall n r1 r2 rect = do
-- Test message handling of 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
&& frac' <= frac && (if frac' < frac then frac' == 0 || frac' == frac - delta
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
prop_expand_tall (NonNegative n)
- (NonZero (NonNegative delta))
+ (Positive delta)
(NonNegative n1)
- (NonZero (NonNegative d1)) =
+ (Positive d1) =
n == n'
&& delta == delta' -- these state components are unchanged
@@ -97,7 +97,7 @@ prop_expand_tall (NonNegative n)
-- pureMessage :: layout a -> SomeMessage -> Maybe (layout a)
-- 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) =
delta == delta' && frac == frac' && n' == n + k
where
diff --git a/tests/Properties/Screen.hs b/tests/Properties/Screen.hs
index cf76252..d12f954 100644
--- a/tests/Properties/Screen.hs
+++ b/tests/Properties/Screen.hs
@@ -24,7 +24,7 @@ prop_screens_works (x :: T) = screens x == current x : visible x
------------------------------------------------------------------------
-- 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
where (w',h') = applyResizeIncHint a b
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
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
where (w',h') = applyMaxSizeHint a b
a = (inc_w,inc_h)