zhangjingli35 / hamcrest

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

Incorrect description for lessThan matcher #182

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Given the following:

int a = 1;
int b = 2;

assertThat(a, lessThan(b));
assertThat(b, lessThan(a));

The first assert passes, the second one fails as expected. However the message 
generated is as follows:

Exception in thread "main" java.lang.AssertionError: 
Expected: a value less than <1>
     but: <1> was greater than <2>
    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
    ...

I expected the message to say "but <2> was greater than <1>".

Original issue reported on code.google.com by ppera...@gmail.com on 24 Apr 2012 at 9:14

GoogleCodeExporter commented 8 years ago
we appear to have fixed this already

Original comment by smgfree...@gmail.com on 25 Apr 2012 at 10:46

GoogleCodeExporter commented 8 years ago
I'll grab the latest. Thanks for your quick response!

Original comment by ppera...@gmail.com on 25 Apr 2012 at 1:49