From 98b329e0cad36b6b622cec9d4e165051f99c4cd8 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Sun, 23 Mar 2008 01:34:36 +0100 Subject: more tests darcs-hash:20080323003436-cba2c-f896cff759d6413571b6c32f2a78f64e6399feea --- tests/Properties.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/Properties.hs') diff --git a/tests/Properties.hs b/tests/Properties.hs index 3f78b03..010a05e 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -4,7 +4,7 @@ module Properties where import XMonad.StackSet hiding (filter) import XMonad.Layout import XMonad.Core hiding (workspaces,trace) -import XMonad.Operations ( applyResizeIncHint ) +import XMonad.Operations ( applyResizeIncHint, applyMaxSizeHint ) import qualified XMonad.StackSet as S (filter) import Debug.Trace @@ -823,6 +823,16 @@ 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) = + w' <= inc_w && h' <= inc_h + where (w',h') = applyMaxSizeHint a b + a = (inc_w,inc_h) + +prop_resize_max_extra ((NonNegative inc_w)) b@(w,h) = + (w,h) == (w',h') + where (w',h') = applyMaxSizeHint a b + a = (-inc_w,0::Dimension)-- inc_h) + ------------------------------------------------------------------------ main :: IO () @@ -971,6 +981,8 @@ main = do -- resize hints ,("window hints: inc", mytest prop_resize_inc) ,("window hints: inc all", mytest prop_resize_inc_extra) + ,("window hints: max", mytest prop_resize_max) + ,("window hints: max all ", mytest prop_resize_max_extra) ] -- cgit v1.2.3