I agree with this motivation behind this request, which I explain in more detail here: http://stackoverflow.com/questions/16745135/how-to-test-a-clojure-macro-that-uses-gensyms
We should be able to test the behavior *and* the macroexpansion. (Most things in life are not simple either/or decisions. Don't believe people that tell you otherwise.) On Monday, March 23, 2015 at 12:58:49 PM UTC-4, Chris Ford wrote: > > 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 <se...@corfield.org <javascript:> > > wrote: > >> On Mar 22, 2015, at 7:52 PM, myguidingstar <phuthuycuo...@gmail.com >> <javascript:>> 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 clo...@googlegroups.com >> <javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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+u...@googlegroups.com <javascript:>. >> 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.