scalacheck
scalacheck copied to clipboard
Vary the length of Gen.listOfN
Fixes #844.
I will just weigh in my opinion as a user - I think changing the behaviour in this way has the potential to break too many tests. Also the current behaviour is consistent with the name listOfN
. For these reasons I think it would be better to just change the documentation of listOfN
and add new methods with "at most" semantics. If it's possible, calling buildableOfN
for Set
and Map
could then be deprecated.
I agree. I raised the same concern of breaking tests in #844. The chance of generating lists less than N with listOfN
is possible but usually pretty remote and actually is only possible on what your combined generator is or what the test is.