From 58c6efe4c48423f20d2010b984631dfe89a8d92f Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Sun, 19 Jul 2015 17:53:07 +0100 Subject: [PATCH] [tests] introduce a new checker for hunit based on the property checker --- tests/Utils.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Utils.hs b/tests/Utils.hs index 279aca6..bd0f829 100644 --- a/tests/Utils.hs +++ b/tests/Utils.hs @@ -14,6 +14,7 @@ import Crypto.Number.Serialize (os2ip) import Prelude import Test.Tasty.QuickCheck +import Test.Tasty.HUnit ((@=?)) newtype TestDRG = TestDRG (Word64, Word64, Word64, Word64, Word64) deriving (Show,Eq) @@ -142,3 +143,6 @@ propertyHold l = | a == b = acc | otherwise = (name ++ ": expected " ++ show a ++ " but got: " ++ show b) : acc + +propertyHoldCase :: [PropertyTest] -> IO () +propertyHoldCase l = True @=? propertyHold l