You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather it should use the same approach as IsIterableContainingInOrder and use the offending matcher to describe the mismatch. Here is what the IsIterableContainingInOrder Matcher does:
if (!matcher.matches(item)) {
describeMismatch(matcher, item);
return false;
}
The text was updated successfully, but these errors were encountered:
see also: http://code.google.com/p/hamcrest/issues/detail?id=108 about how TypeSafeDiagnosingMatcher overrides describeMismatch() and calls matchesSafely() again, this time passing in the mismatchDescription which was given to it by assertThat()
At that point, there may be more than one Matcher, and none of them matched. This isn't quite like IsIterableContainingInOrder where it's a specific matcher that failed.
This could pick an arbitrary matcher to ask for a description, or use describeMismatch only when there's a single matcher available.
IsIterableContainingInAnyOrder tries to describe the mismatch like this in Matching.isMatched, thus relying on toString:
Rather it should use the same approach as IsIterableContainingInOrder and use the offending matcher to describe the mismatch. Here is what the IsIterableContainingInOrder Matcher does:
The text was updated successfully, but these errors were encountered: