liangzai-cool / hamcrest

Automatically exported from code.google.com/p/hamcrest
0 stars 0 forks source link

OrderingComparison is _still_ describing mismatches backwards #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

see Issue 77, the bug is now in describeMismatchSafely(). A correct version
would be (actual.compareTo(expected) -> expected.compareTo(actual)):

    @Override
    public void describeMismatchSafely(T actual, Description
mismatchDescription) {
      mismatchDescription.appendValue(expected) .appendText(" was ")
                         .appendText(comparison(expected.compareTo(actual)))
                         .appendText(" ").appendValue(actual);
    };

Original issue reported on code.google.com by soma67it...@googlemail.com on 10 Jun 2009 at 3:26

GoogleCodeExporter commented 9 years ago
Oops. Fixed

Original comment by smgfree...@gmail.com on 11 Jun 2009 at 7:03