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
Original issue reported on code.google.com by
ppera...@gmail.com
on 24 Apr 2012 at 9:14