Fork me on GitHub
#test-check
<
2016-11-14
>
gfredericks12:11:35

I'm trying to figure out if prop/for-all could be changed to support clojure.test assertions without breaking anything

gfredericks12:11:52

either all the time, or only when using defspec (not sure which of those is better to aim for)

nberger12:11:44

That would be awesome. At first glance I'd say that having it in defspec and providing an easy way to use it when not in defspec should be enough

gfredericks13:11:20

I was hoping to make it just start working, without adding any new functions/macros

gfredericks13:11:46

i.e., if you put assertions in the body of your prop/for-all, it bases pass/failure on that instead of the expression return value

gfredericks13:11:44

if new functions/macros are okay, then just adding a clojure.test.check.clojure-test/for-all would work

gfredericks13:11:44

actually I just thought about it a bit, and the edge cases involved in having both behaviors in the same macro are kind of nasty

gfredericks13:11:26

edge cases meaning how things play out if you accidentally do or don't include assertions

gfredericks13:11:44

I may have just talked myself out of it