Re: Add a function annotation for scoping in unit tests

2016-03-23 Thread sundbry
Thanks Alex, that's very helpful. -- Ryan On Wednesday, March 23, 2016 at 5:02:43 AM UTC-7, Alex Miller wrote: > > I guess the other important detail there is that when you invoke a var > holding a function, it invokes the function. > > On Wednesday, March 23, 2016 at 7:01:41 AM UTC-5, Alex Mill

Re: Add a function annotation for scoping in unit tests

2016-03-23 Thread Alex Miller
I guess the other important detail there is that when you invoke a var holding a function, it invokes the function. On Wednesday, March 23, 2016 at 7:01:41 AM UTC-5, Alex Miller wrote: > > Private functions (really vars marked private holding a function) can > always be accessed via the var #' s

Re: Add a function annotation for scoping in unit tests

2016-03-23 Thread Alex Miller
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 UT

Add a function annotation for scoping in unit tests

2016-03-23 Thread sundbry
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