qcheck
qcheck copied to clipboard
Is _opt_map_n relevant for printers ?
For instance:
# open QCheck;;
# let arb = pair small_int (always 0);;
val arb : (int * int) QCheck.arbitrary =
{gen = <fun>; print = None; small = None; shrink = Some <fun>;
collect = None; stats = []}
We could have the printer print (n, <no-printer>)? This could still be useful.
I noticed the behavior while providing printers for #181
What I propose is very similar to what you did for shrinkers:
let quad =
...
~shrink:(Shrink.quad
(_opt_or a.shrink Shrink.nil)
(_opt_or b.shrink Shrink.nil)
(_opt_or c.shrink Shrink.nil)
(_opt_or d.shrink Shrink.nil))
...
You know, that makes a lot of sense. Good idea :+1: