Clojurians
# test-check

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

gfredericks 14:42:35

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

gfredericks 14:42:52

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

nberger 14:56: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

gfredericks 15:04:20

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

gfredericks 15:04: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

gfredericks 15:05:44

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

gfredericks 15:07: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

gfredericks 15:08:26

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

gfredericks 15:08:44

I may have just talked myself out of it