I was just very surprised to discover my :ret specs were not being checked 
via instrument. I've read the rationale above, but I'm not yet convinced. 
While of course I can (and will) use spec/assert from a post condition, I 
lose the nice selective instrumentation features.

I'd also like to make a counter-point to this reasoning:
 

> 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.


In my case, I was already testing the root-level return value, but this 
function is deeply recursive. A small non-conforming value deep in the 
evaluation stack was yielding non-conformance at a path deep in the root 
return value. I was confused by why the :ret check wasn't finding it 
earlier. By relying on the top-level check rather than inline checks 
per-call (as per instrument or :pre/:post) I lost access to the call stack. 
Adding the post condition pin-pointed the problem instantly.

-- 
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