It doesn't seem to be in the published javadoc, but this is an array
comparison with an epsilon tolerance, which was likely added after the
published javadoc was generated.  0.01 here is the maximum permitted
absolute difference between each compared number.

https://github.com/junit-team/junit/blob/master/src/main/java/org/junit/Assert.java#L474

peace, Chris


On Tue, May 28, 2013 at 12:42 PM, Jim - FooBar(); <jimpil1...@gmail.com>wrote:

>  Hi everyone,
>
> sometimes I feel really stupid!
>
> I am currently looking at a well-known java library's tests and found this:
>
> Assert.assertArrayEquals(arrayOutput[0], arrayOutput[1], 0.01);
> //arrayOutput is a 2d double-array btw
>
> since I've basically wrapped this lib, I'd like to port the java tests as
> well. First of all, how do I compare 2 arrays in Clojure without using
> .equals() which is broken for arrays. More importantly, where on earth is
> that method (*assertArrayEquals*)? Looking at the docs for JUnit [1], I
> can see no overload that takes 2 arrays and a double!!! In fact the only
> methods that take 3 args expect a String as the first arg....what is
> happening? can anyone shine some light please?  I am utterly confused...
>
> thanks in advance,
>
> Jim
>
> [1]http://junit.sourceforge.net/javadoc/org/junit/Assert.html
>
> --
> --
> 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/groups/opt_out.
>
>
>



-- 
Chris Jeris
cje...@brightcove.com
freenode/twitter/github: ystael

-- 
-- 
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/groups/opt_out.


Reply via email to