From 381c33c33abee5ba2073546e21e3d01f311acb82 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 11 Oct 2007 12:08:44 +0000 Subject: [PATCH] [gitconv @ Properties.hs: correct property names.] --- tests/Properties.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Properties.hs b/tests/Properties.hs index 62b1edb..2cabfe9 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -14,13 +14,13 @@ main :: IO () main = do n <- (maybe 100 read . listToMaybe) `liftM` getArgs mapM_ (\(s, f) -> printf "%-25s : " s >> f n) tests - where tests = [("splitGroups / idempotent", - mytest prop_splitGroups_idem) + where tests = [("splitGroups / reversible", + mytest prop_splitGroups_rev) ,("splitGroups / integrity", mytest prop_splitGroups_integrity) ,("parseBool", mytest prop_parseBool) - ,("toAssoc / idempotent", - mytest prop_toAssoc_idem) + ,("toAssoc / reversible", + mytest prop_toAssoc_rev) ,("toAssoc / integrity", mytest prop_toAssoc_integrity)] @@ -42,8 +42,8 @@ instance Arbitrary AssocString where return . AS $ key ++ ": " ++ val coarbitrary = undefined -prop_toAssoc_idem :: [AssocString] -> Bool -prop_toAssoc_idem x = toAssoc (fromAssoc r) == r +prop_toAssoc_rev :: [AssocString] -> Bool +prop_toAssoc_rev x = toAssoc (fromAssoc r) == r where r = toAssoc (fromAS x) fromAssoc = map (\(a, b) -> a ++ ": " ++ b) @@ -56,8 +56,8 @@ fromAS s = [x | AS x <- s] prop_parseBool :: Bool -> Bool prop_parseBool x = parseBool (showBool x) == x -prop_splitGroups_idem :: [(String, String)] -> Bool -prop_splitGroups_idem xs = +prop_splitGroups_rev :: [(String, String)] -> Bool +prop_splitGroups_rev xs = let r = splitGroups xs in r == splitGroups (concat r) prop_splitGroups_integrity :: [(String, String)] -> Bool -- 2.11.4.GIT