In other words, don't use the same names for variables in your code
under test that you use for the placeholder variables in the `are`
binding and the test expressions.

I seem to remember this coming up before (fairly recently?) and it was
just considered a limitation of the `are` macro implementation?

On Mon, Jan 28, 2013 at 7:49 AM, James Xu <xumingming64398...@gmail.com> wrote:
> user=> (macroexpand-1 (are [ x y ] (= x y) ((fn[a] a) 1) 1))
> true
> user=> (macroexpand-1 '(are [ x y ] (= x y) ((fn[a] a) 1) 1))
> (clojure.template/do-template [x y] (clojure.test/is (= x y)) ((fn [a] a)
> 1) 1)
>
>
> The StackOverflowError may have something to do with the do-template func
>
> On 13-1-28 下午11:37, "John Lawrence Aspden" <aspd...@googlemail.com> wrote:
>
>>Hi, am I doing something wrong here?:
>>
>>user=> (clojure-version)
>>"1.4.0"
>>user=> (use 'clojure.test)
>>nil
>>user=> (is ((fn[x] x) 1) 1)
>>1
>>user=> (are [ x y ] (= x y) ((fn[x] x) 1) 1)
>>StackOverflowError   clojure.core/map/fn--4087 (core.clj:2426)
>>
>>user=> (macroexpand '(are [ x y ] (= x y) ((fn[x] x) 1) 1))
>>StackOverflowError   clojure.lang.RT.boundedLength (RT.java:1633)
>>
>>--
>>--
>>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, send email to
>>clojure+unsubscr...@googlegroups.com.
>>For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
>
> --
> --
> 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, send email to 
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"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, send email to 
clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to