Skip to content

Commit 89b51c7

Browse files
committed
Merge branch 'master' of git://github.com/mazarati/JavaHamcrest into mazarati-v7.0
2 parents 8fc9a01 + 0f061d6 commit 89b51c7

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ public AllOf(Iterable<Matcher<? super T>> matchers) {
2222
public boolean matches(Object o, Description mismatch) {
2323
for (Matcher<? super T> matcher : matchers) {
2424
if (!matcher.matches(o)) {
25-
mismatch.appendDescriptionOf(matcher).appendText(" ");
26-
matcher.describeMismatch(o, mismatch);
25+
matcher.describeMismatch(o, mismatch);
2726
return false;
2827
}
2928
}

hamcrest-core/src/test/java/org/hamcrest/core/AllOfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ public final class AllOfTest {
6060

6161
@Test public void
6262
hasAMismatchDescriptionDescribingTheFirstFailingMatch() {
63-
assertMismatchDescription("\"good\" was \"bad\"", allOf(equalTo("bad"), equalTo("good")), "bad");
63+
assertMismatchDescription("was \"bad\"", allOf(equalTo("bad"), equalTo("good")), "bad");
6464
}
6565
}

hamcrest-core/src/test/java/org/hamcrest/core/CombinableTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public final class CombinableTest {
3737
@Test public void
3838
bothDescribesItself() {
3939
assertDescription("(not <3> and not <4>)", NOT_3_AND_NOT_4);
40-
assertMismatchDescription("not <3> was <3>", NOT_3_AND_NOT_4, 3);
40+
assertMismatchDescription("was <3>", NOT_3_AND_NOT_4, 3);
4141
}
4242

4343
@Test public void

hamcrest-core/src/test/java/org/hamcrest/core/IsCollectionContainingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public final class IsCollectionContainingTest {
8282
reportsMismatchWithAReadableDescriptionForMultipleItems() {
8383
final Matcher<Iterable<Integer>> matcher = hasItems(3, 4);
8484

85-
assertMismatchDescription("a collection containing <4> mismatches were: [was <1>, was <2>, was <3>]",
85+
assertMismatchDescription("mismatches were: [was <1>, was <2>, was <3>]",
8686
matcher, asList(1, 2, 3));
8787
}
8888

0 commit comments

Comments
 (0)