I think it's useful to think of macros as an odd form of I/O. Just as you
would separate out your templating from your domain functions, separate out
your defmacro from regular functions that just happen to manipulate
symbols. These functions will be easier to test.

On 23 March 2015 at 16:23, Sean Corfield <s...@corfield.org> wrote:

> On Mar 22, 2015, at 7:52 PM, myguidingstar <phuthuycuoimayhut...@gmail.com>
> wrote:
> > I wonder if there is any way to make macro expansion in Clojure
> deterministic. That would be useful in unit tests.
>
> I’d be very interested to understand your use case… Testing what the macro
> expands to seems like it is test the macro system itself, not your own
> code. Surely in a unit test you’d want to test the _behavior_ of the code
> instead?
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
>
>
> --
> 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.
>

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