Expand file tree Collapse file tree 4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ public AllOf(Iterable<Matcher<? super T>> matchers) {
22
22
public boolean matches (Object o , Description mismatch ) {
23
23
for (Matcher <? super T > matcher : matchers ) {
24
24
if (!matcher .matches (o )) {
25
- mismatch .appendDescriptionOf (matcher ).appendText (" " );
26
- matcher .describeMismatch (o , mismatch );
25
+ matcher .describeMismatch (o , mismatch );
27
26
return false ;
28
27
}
29
28
}
Original file line number Diff line number Diff line change @@ -60,6 +60,6 @@ public final class AllOfTest {
60
60
61
61
@ Test public void
62
62
hasAMismatchDescriptionDescribingTheFirstFailingMatch () {
63
- assertMismatchDescription ("\" good \" was \" bad\" " , allOf (equalTo ("bad" ), equalTo ("good" )), "bad" );
63
+ assertMismatchDescription ("was \" bad\" " , allOf (equalTo ("bad" ), equalTo ("good" )), "bad" );
64
64
}
65
65
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public final class CombinableTest {
37
37
@ Test public void
38
38
bothDescribesItself () {
39
39
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 );
41
41
}
42
42
43
43
@ Test public void
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public final class IsCollectionContainingTest {
82
82
reportsMismatchWithAReadableDescriptionForMultipleItems () {
83
83
final Matcher <Iterable <Integer >> matcher = hasItems (3 , 4 );
84
84
85
- assertMismatchDescription ("a collection containing <4> mismatches were: [was <1>, was <2>, was <3>]" ,
85
+ assertMismatchDescription ("mismatches were: [was <1>, was <2>, was <3>]" ,
86
86
matcher , asList (1 , 2 , 3 ));
87
87
}
88
88
0 commit comments