From fb60d205050cf17ce4778e1279ea8fdb8ae57ef3 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Fri, 5 Oct 2007 01:45:37 +0200 Subject: Add mapLayout darcs-hash:20071004234537-a5988-504015d5c938a232d1355c0f3c602cf366c20aea --- tests/Properties.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/Properties.hs b/tests/Properties.hs index bd8bc2b..7ef7e67 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -602,6 +602,10 @@ prop_rename1 (x::T) o n = o `tagMember` x && not (n `tagMember` x) ==> prop_ensure (x :: T) l xs = let y = ensureTags l xs x in and [ n `tagMember` y | n <- xs ] +prop_mapLayoutId (x::T) = x == mapLayout id x + +prop_mapLayoutInverse (x::T) = x == mapLayout pred (mapLayout succ x) + ------------------------------------------------------------------------ -- some properties for layouts: @@ -740,6 +744,9 @@ main = do ,("renaming works", mytest prop_rename1) ,("ensure works", mytest prop_ensure) + ,("mapLayout id", mytest prop_mapLayoutId) + ,("mapLayout inverse", mytest prop_mapLayoutInverse) + -- testing for failure: ,("abort fails", mytest prop_abort) ,("new fails with abort", mytest prop_new_abort) -- cgit v1.2.3