Thanks Guys, I'll avoid the are macro.
Any ideas why this doesn't work?:
user=> (use 'clojure.test)
nil
user=> (use 'clojure.test.tap)
nil
user=> (deftest a (is true))
#'user/a
user=> (run-tests)
Testing user
Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
{:type :summary, :pass 1, :
On Jan 28, 2013, at 11:13 AM, Sean Corfield wrote:
> 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.
It might be a good practice to distinguish the roles via a naming con
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 implementa
sorry, James Xu already said that (didn't want to steal any credit, but
I've just realized that he said the same thing)
On Mon, Jan 28, 2013 at 5:25 PM, AtKaaZ wrote:
> well this should explain it:
>
> => (are [ x y ] (= x y) ((fn[x] x) 1) 1)
> StackOverflowError clojure.core/partial/fn--4209
well this should explain it:
=> (are [ x y ] (= x y) ((fn[x] x) 1) 1)
StackOverflowError clojure.core/partial/fn--4209 (core.clj:2396)
=> (are [ x y ] (= x y) ((fn[a] a) 1) 1)
true
On Mon, Jan 28, 2013 at 4:37 PM, John Lawrence Aspden <
aspd...@googlemail.com> wrote:
> Hi, am I doing somethin
=> (are [ x y ] (= x y) ((fn[x] x) 1) 1)
StackOverflowError clojure.lang.PersistentArrayMap.containsKey
(PersistentArrayMap.java:158)
=> (dorun (map #(println (.toString %)) (take-last 100 (.getStackTrace *e
clojure.lang.RestFn.invoke(RestFn.java:408)
clojure.core$map$fn__4226.invoke(core.cl
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 下午1
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