Hey this looks great!

On Dec 7, 2008, at 10:51 AM, Stuart Sierra wrote:

>
> Hi folks,
...
>
> 2. "each=" and "all-true" are gone, replaced by the new macro "are",
> which works with any predicate:
>    (are =
>      2 (+ 1 1)
>      4 (+ 2 2))
>

Just one bone to pick, though.  The "are" macro doesn't work so well  
if I want to test a custom assert-expr function that only deals with a  
single expression.

Since this works fine:

(deftest array
   (is (:json= [1 2 3 4 5])))

it would be nice if I could write:

(deftest basics
   (are :json=
        [1 2 3 4 5]
        {:bar 2 :foo 1}
        [[1 2 3 4 5]]
        {:bam {:foo 1} :baz {:bar 2}}
        [{:foo 1} {:bar 2}]))


The :json= handler for assert-expr encodes and then decodes the expr  
into/from JSON.

--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to