Hey Andrew,
Good question. tl;dr, change your test to:
(tc/quick-check 100 prop1 :max-size 50) ;; and that should pass.
Longer explanation:
test.check’s generators take two parameters, a random number generator, and an
integer ‘size’. During testing, the size starts at 0, and increases up to some fixed
maximum. This is used to that the ‘size’ of the generated data increases as more
and more tests pass. The rationale here is that you don’t want your very first to
generate a million-length vector, when, if there is a bug, its more than likely also
present with ‘smaller’ data. As it turns out, with a complex generator like gen/any,
a size of 100 (the default maximum) can generate very large, nested data-structures.
This is explained in some detail in the documentation [1]. I’ve tried to make all of the
built-in generators have sane defaults, but its appear like gen/any can still generate
massive, nested structures with the default values. I’ll look into a more sane default
sizing strategy for this generator. As I mention in the tl;dr above, you can set the
maximum ‘size’ used during testing.