Is there a way to get there-exists
behavior to compliment for-all
? Context: I have a protocol, and a bunch of implementations (30+), and a test suite that is a series of test.check properties. A broken implementation slipped through, because it returned a pathological response: i.e. (s/nilable ::foo) always returned nil
. I’d like to assert during the test, “this can return nil or ::foo, but the test must return ::foo at least once”
You could generate 10 or 50 calls or something
Something large enough that it should never fail
true
It does seem like that would be a useful feature though
Because then you could test things of that sort without paying for 50 trials each time
A similar structure is using such-that and just generating a single thing
I think I’ve got it using such-that
, thanks
There's a bunch of dumb tests in t.c itself that use the 50 things approach; it's slow