Number of random tests created by QuickChick in Coq

Whenever I use QuickChick in Coq, it has 10,000 tests by default. Is there a way to change this default to generate a different number of tests?

+4
source share
2 answers

I figured out a way:

Extract Constant Test.defNumTests => "42".

QuickChick test_predicate.

Will check test_predicateup to 42 times:

+++ Passed 42 tests (0 discards)
+4
source

You can also try using QuickChickWith, stdArgsand updMaxSuccessas follows:

    QuickChickWith (updMaxSuccess stdArgs 42) test_predicate.

However, most of the time I use your hack to extract to avoid large natural numbers.

+4
source

Source: https://habr.com/ru/post/1684509/


All Articles