Sean Corfield wrote:
If you're mocking a function that is specifically declared to take a long 
(primitive), shouldn't the mocked call also be declared to take a long?

Midje has an idea called a "metaconstant" 
https://github.com/marick/Midje/wiki/Metaconstants. Metaconstants are used to document that nothing 
about a test value matters except what you explicitly mention (by declaring what values particular 
functions have when applied to the test value). It's useful at making tests more abstract, closer 
to "for all" statements.

So the actual (still example) code looked something like:

   (fact "convert any integer into a map thing"
     (function-under-test ..any-integer..) => {..any-integer [..any-integer..]}
     (provided
       (intlister ..any-integer..) => [..any-integer..]))


If this isn't a bug, I wouldn't expect Clojure to change. Once one chooses 
static types, one has many crosses to bear, and this would be another. But the 
way it works for non-primitives but not primitives could conceivably be a 
symptom of an important bug.

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