Skip to content

Commit 312617b

Browse files
author
c.a.corbyn
committed
Fixed test that was asserting false requirements (copy & paste errors from the negation of itself)
1 parent 7f797ea commit 312617b

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎hamcrest-unit-test/src/main/java/org/hamcrest/collection/IsArrayContainingInOrderTest.java‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ public void testHasAReadableDescription() {
2121
}
2222

2323
public void testMatchesItemsInOrder() {
24-
assertMatches("in order", arrayContainingInAnyOrder(1, 2, 3), new Integer[] {1, 2, 3});
25-
assertMatches("single", arrayContainingInAnyOrder(1), new Integer[] {1});
24+
assertMatches("in order", arrayContaining(1, 2, 3), new Integer[] {1, 2, 3});
25+
assertMatches("single", arrayContaining(1), new Integer[] {1});
2626
}
2727

2828
@SuppressWarnings("unchecked")
29-
public void testAppliesMatchersInAnyOrder() {
30-
assertMatches("in order", arrayContainingInAnyOrder(equalTo(1), equalTo(2), equalTo(3)), new Integer[] {1, 2, 3});
31-
assertMatches("single", arrayContainingInAnyOrder(equalTo(1)), new Integer[] {1});
29+
public void testAppliesMatchersInOrder() {
30+
assertMatches("in order", arrayContaining(equalTo(1), equalTo(2), equalTo(3)), new Integer[] {1, 2, 3});
31+
assertMatches("single", arrayContaining(equalTo(1)), new Integer[] {1});
3232
}
3333

34-
public void testMismatchesItemsInAnyOrder() {
35-
Matcher<Integer[]> matcher = arrayContainingInAnyOrder(1, 2, 3);
34+
public void testMismatchesItemsInOrder() {
35+
Matcher<Integer[]> matcher = arrayContaining(1, 2, 3);
3636
assertMismatchDescription("was null", matcher, null);
37-
assertMismatchDescription("No item matches: <1>, <2>, <3> in []", matcher, new Integer[] {});
38-
assertMismatchDescription("No item matches: <2>, <3> in [<1>]", matcher, new Integer[] {1});
39-
assertMismatchDescription("Not matched: <4>", matcher, new Integer[] {4,3,2,1});
40-
assertMismatchDescription("Not matched: <4>", matcher, new Integer[] {1,2, 4});
37+
assertMismatchDescription("No item matched: <1>", matcher, new Integer[] {});
38+
assertMismatchDescription("No item matched: <2>", matcher, new Integer[] {1});
39+
assertMismatchDescription("item 0: was <4>", matcher, new Integer[] {4,3,2,1});
40+
assertMismatchDescription("item 2: was <4>", matcher, new Integer[] {1,2, 4});
4141
}
4242
}

0 commit comments

Comments
 (0)