Private functions (really vars marked private holding a function) can always be accessed via the var #' syntax:
(ns banana-test ...) (deftest ring-ring [] (is (sting? (#'banana/phone))) This is the way private functions are typically tested. On Wednesday, March 23, 2016 at 6:53:12 AM UTC-5, sundbry wrote: > > Hi everyone, > > What are your opinions on adding a special metadata to functions to > provide it in scope for tests? This would be a nice language feature to > have: > > For example, > > (ns banana) > (defn- ^:+test phone [] "ring ring ring") > > (ns banana-test > ...) > (deftest ring-ring [] > ; We can call the private function from here > (is (sting? (banana/phone))) > > Is this feature available in any current test frameworks? > -- 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.