diff options
author | Don Stewart <dons@galois.com> | 2008-03-23 00:49:52 +0100 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2008-03-23 00:49:52 +0100 |
commit | c549c20a84193b9ea7df7a7b9310cbdf4c3e8791 (patch) | |
tree | 0293cb644e7c622faef4f7adeef3c24632d93c8b | |
parent | 3cf27e26df85fd89a8c85b61ec31a27a9c5eff73 (diff) | |
download | xmonad-c549c20a84193b9ea7df7a7b9310cbdf4c3e8791.tar.gz xmonad-c549c20a84193b9ea7df7a7b9310cbdf4c3e8791.tar.xz xmonad-c549c20a84193b9ea7df7a7b9310cbdf4c3e8791.zip |
some tests for the size increment handling in Operations.hs
darcs-hash:20080322234952-cba2c-5bc18928813ea1674988a6857a15eedde696bf7d.gz
-rw-r--r-- | tests/Properties.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs index dd3dd8e..3f78b03 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -4,6 +4,7 @@ module Properties where import XMonad.StackSet hiding (filter) import XMonad.Layout import XMonad.Core hiding (workspaces,trace) +import XMonad.Operations ( applyResizeIncHint ) import qualified XMonad.StackSet as S (filter) import Debug.Trace @@ -810,6 +811,19 @@ noOverlaps xs = and [ verts a `notOverlap` verts b || (right1 < left2 || right2 < left1) ------------------------------------------------------------------------ +-- Aspect ratios + +prop_resize_inc (NonZero (NonNegative inc_w),NonZero (NonNegative 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) + +prop_resize_inc_extra ((NonNegative inc_w)) b@(w,h) = + (w,h) == (w',h') + where (w',h') = applyResizeIncHint a b + a = (-inc_w,0::Dimension)-- inc_h) + +------------------------------------------------------------------------ main :: IO () main = do @@ -954,6 +968,10 @@ main = do ,("describe mirror", mytest prop_desc_mirror) + -- resize hints + ,("window hints: inc", mytest prop_resize_inc) + ,("window hints: inc all", mytest prop_resize_inc_extra) + ] ------------------------------------------------------------------------ |