test-check

2020-10-12T20:50:39.033400Z

is it possible to have a generator that doesn’t shrink at one level, but its children do shrink? For example:

(commit-to (gen/one-of [gen-for-case-1 gen-for-case-2]))
So once it chooses either case 1 or 2 it won’t try the other, but will shrink the things gen’d in them?

2020-10-12T20:53:07.033800Z

Not using public functionality, I don't think

2020-10-12T20:56:23.035600Z

A hacky idea is to have a predicate on the generated values to tell you what branch matched, and then wrap that in a such-that that insists it is something from that branch

2020-10-12T20:57:01.036400Z

Super goofy looking, and wastes a bit of cpu, but otherwise would do what you're describing

2020-10-12T20:59:48.037600Z

Having a hard time imagining what that would look like, but I think if it’s not standard I can just duplicate my test 😅

2020-10-12T21:35:46.038100Z

Yeah I couldn't tell what your appetite for Weird was 🙂

😂 1