문제

I'm using cabal to build and test my projects with the commands:

cabal configure --enable-tests
cabal build
cabal test

As a framework I use testing-framework (https://batterseapower.github.io/test-framework/). Everything works, however the number of QuickCheck-tests defaults to 50 which in my use-case is very little because I have to filter the generated data to fit certain properties.

Is there any possibility to pass something like

--maximum-generated-tests=5000

to the test-executable via cabal? I tried things like

 cabal test --test-options='maximum-generated-tests=5000'

but no luck so far. Is there any possibility to achieve this?

Many thanks in advance!

jules

도움이 되었습니까?

해결책

You missed the dashes:

cabal test --test-options=--maximum-generated-tests=5000

Also, if too few generated tests satisfy your property, you may have better luck with SmallCheck. It's not random and thus will find all inputs satisfying the condition in the given search space. (Disclosure: I'm the maintainer of SmallCheck.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top