For some reason when something like:
expect.that(1.1).closeTo(1.0, 0.11);
is written Java 5 does not box the double (1.1) to a Double object, but
instead matches the:
<T extends Comparable<T>> ComparableChecker<T> that(T comparable);
declaration of 'that', as opposed to the:
DoubleChecker that(Double d);
declaration of 'that'.
I've tried reordering the declarations in the interface so that the
DoubleChecker version of 'that' appears before the ComparableChecker<T>
version, but to no avail.
The only work around I know of is to write:
expect.that(new Double(1.1)).closeTo(1.0, 0.11);
Original issue reported on code.google.com by cwmy...@gmail.com on 10 Aug 2007 at 5:01
Original issue reported on code.google.com by
cwmy...@gmail.com
on 10 Aug 2007 at 5:01