Thomas van Noort wrote:
> However, I would like a single result for the complete list of 
> properties instead of a result for each property. I realize that this 
> restricts the properties to be of the same type, but that isn't a 
> problem for my application.

You're types can be different, so long as the result of quickCheck
isn't.

I've often seen (and used):

data Test = forall a. (Testable a) => T String a

testSetA :: [Test]
testSetA = [T "1+1=2" prop_onePlusOne
        ,T "2+2=5" prop_twoPlusTwo
        ...
        ]

tests = testSetA ++ testSetB ++ ...

runTests = :: [Test] -> Bool
runTests = and $ map runTest tests

runTest :: Test -> Bool
runTest (T s a) = putStr (s ++ ": ") >> quickCheck a >> putStr "\n"



Tom

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to