[TCHECK-10] defspec makes it impossible to specify :max-size (and seed) Created: 04/Mar/14 Updated: 04/Mar/14
|Reporter:||Jean Niklas L'orange||Assignee:||Reid Draper|
While defspec is very valuable for integration with clojure.test, it is almost impossible to specify :max-size for the quick-check call. The only way I've found around it right now is by using the following macro:
This macro alters the meta of a named test such that the quick-check-call uses a specified expression for max-size, but obviously this is a very hacky solution. Preferably, I would be able to specify the :max-size value directly through defspec. I imagine that something like this could work:
Essentially, if the optional argument (currently named default-times) is a map, inspect the map for values given, or use defaults if not.
|Comment by Reid Draper [ 04/Mar/14 8:52 PM ]|
I like the idea of making the first (optional) argument a map. This allows us to add in more options in the future, without breaking existing code.