I’m not sure it answers your question *directly*, but a quote from Rich in 
another 
thread <https://groups.google.com/d/msg/clojure/jcVnjk1MOWY/UwP5bc1oCAAJ> seems 
relevant:

On Monday, July 11, 2016 at 10:01:05 AM UTC-4, Rich Hickey wrote:

> On Sunday, July 10, 2016 at 6:04:39 AM UTC-4, puzzler wrote:

1. No way to test function output specs.  For documentation purposes, I 
>> want to have an output spec on my function.  However, as far as I know, 
>> after instrumentation-triggered checking of output specs was removed a 
>> couple of alphas ago, the only way remaining to check against output specs 
>> is to use randomly generated tests.  So if I can't make good generators, I 
>> have no way to confirm that my output spec works the way I think it does.  
>> My documentation could be totally out of touch with reality, and that 
>> displeases me.
>
> Running return-value instrument-style checking on whatever few 
> hand-written tests you might have isn’t going to give you better coverage 
> than a simple (even hardwired) generator that captures similar ranges. And 
> you can directly exercise your :ret spec - it’s just another spec. You can 
> also spec/assert on your return - the tests will disappear in production, 
> although this is similarly as weak as instrument-triggered return checking, 
> so I’m not going to help you do it, but you can do it yourself :) 


Incidentally, I think your question is common enough that it might be worth 
writing something up for http://clojure.org/guides/faq.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to