... instead of generating 100 new random samples for each property?
My testsuite contains the TemplateHaskell hack described here [1] to test all functions with the name prop_ *. Running a test program prints
and it’s like going through 100 random samples for each property.
Problem: creating samples is quite expensive, checking for no properties. Therefore, I would like to be able to pass each random pattern for each of the prop_ * functions instead of creating new (#properties * 100) many samples.
Is there something similar? In fact, I think I will need a replacement for splicing
$(forAllProperties)
at
main :: IO ()
main
= do args <- parseArgs <$> getArgs
s <- $(forAllProperties) $ quickCheckWithResult args
s ? return () $ exitFailure
where
parseArgs as
= null as ? stdArgs $ stdArgs{ maxSuccess = read $ head as }
[1] haskell QuickCheck