[tests] introduce a new checker for hunit based on the property checker

This commit is contained in:
Vincent Hanquez 2015-07-19 17:53:07 +01:00
parent 6e5ad0c640
commit 58c6efe4c4

View File

@ -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