From bee79c83e6a978abd1c3b76c8f6efd697a7b67df Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Thu, 27 Sep 2007 23:19:28 +0000 Subject: [PATCH] add prop for 'differentiate' --- tests/Properties.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Properties.hs b/tests/Properties.hs index aa698bc..0f4b733 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -538,6 +538,10 @@ prop_screens (x :: T) = n `elem` screens x where n = current x +prop_differentiate xs = + if null xs then differentiate xs == Nothing + else focus (fromJust (differentiate xs)) == head xs + where _ = xs :: [Int] ------------------------------------------------------------------------ -- some properties for layouts: @@ -669,6 +673,7 @@ main = do ,("floating is reversible" , mytest prop_float_reversible) ,("screens includes current", mytest prop_screens) + ,("differentiate works", mytest prop_differentiate) {- ,("tile 1 window fullsize", mytest prop_tile_fullscreen)