summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2008-03-23 01:34:36 +0100
committerDon Stewart <dons@galois.com>2008-03-23 01:34:36 +0100
commit98b329e0cad36b6b622cec9d4e165051f99c4cd8 (patch)
treeceb8250dddcc879cee4745ca2f2654dc2873768c /tests
parentbd0f1f7a50ac386c2946b64cf65f9459dd8f86c5 (diff)
downloadmetatile-98b329e0cad36b6b622cec9d4e165051f99c4cd8.tar
metatile-98b329e0cad36b6b622cec9d4e165051f99c4cd8.zip
more tests
darcs-hash:20080323003436-cba2c-f896cff759d6413571b6c32f2a78f64e6399feea
Diffstat (limited to 'tests')
-rw-r--r--tests/Properties.hs14
1 files changed, 13 insertions, 1 deletions
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)
]