Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amount of random tests generated by QuickChick in Coq

Tags:

libraries

coq

Whenever I use QuickChick in Coq, it has a default of 10000 tests. Is there a way to change this default value to generate a different amount of tests?

like image 296
Felipe Bañados S Avatar asked Jan 29 '23 17:01

Felipe Bañados S


2 Answers

I figured out a way:

Extract Constant Test.defNumTests => "42".

QuickChick test_predicate.

Will test test_predicate up to 42 times:

+++ Passed 42 tests (0 discards)
like image 180
Felipe Bañados S Avatar answered Feb 20 '23 15:02

Felipe Bañados S


You could also try using QuickChickWith, stdArgs and updMaxSuccess as follows:

    QuickChickWith (updMaxSuccess stdArgs 42) test_predicate.

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

like image 28
Leonidas Lampropoulos Avatar answered Feb 20 '23 13:02

Leonidas Lampropoulos