Skip to content

Commit 7f797ea

Browse files
author
smgfreeman
committed
tweaked mismatch message
1 parent b15c66f commit 7f797ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public boolean matches(F item) {
5353

5454
public boolean isFinished() {
5555
if (nextMatchIx < matchers.size()) {
56-
mismatchDescription.appendText("No item: ").appendDescriptionOf(matchers.get(nextMatchIx));
56+
mismatchDescription.appendText("No item matched: ").appendDescriptionOf(matchers.get(nextMatchIx));
5757
return false;
5858
}
5959
return true;

hamcrest-unit-test/src/main/java/org/hamcrest/collection/IsIterableContainingInOrderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void testDoesNotMatchWithMoreElementsThanExpected() throws Exception {
3232
}
3333

3434
public void testDoesNotMatchWithFewerElementsThanExpected() throws Exception {
35-
assertMismatchDescription("No item: value with <3>", contains123, asList(make(1), make(2)));
35+
assertMismatchDescription("No item matched: value with <3>", contains123, asList(make(1), make(2)));
3636
}
3737

3838
public void testDoesNotMatchIfSingleItemMismatches() throws Exception {
@@ -44,7 +44,7 @@ public void testDoesNotMatchIfOneOfMultipleItemsMismatch() throws Exception {
4444
}
4545

4646
public void testDoesNotMatchEmptyIterable() throws Exception {
47-
assertMismatchDescription("No item: value with <4>", contains(value(4)), new ArrayList<WithValue>());
47+
assertMismatchDescription("No item matched: value with <4>", contains(value(4)), new ArrayList<WithValue>());
4848
}
4949

5050
public void testHasAReadableDescription() {

0 commit comments

Comments
 (0)