Skip to content

Commit 2719f05

Browse files
committed
Fix java 8 unit tests.
1 parent f352d34 commit 2719f05

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/test/java8/com/github/underscore/ArraysTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ public void singleOrNull() {
140140
assertEquals(result7, null);
141141
final Integer result8 = uWithOneElement.singleOrNull();
142142
assertEquals(result8, Integer.valueOf(1));
143-
final Integer result9 = uWithMoreElement.singleOrNull(uWithMoreElement.singleOrNull(item -> item % 2 == 0);
143+
final Integer result9 = uWithMoreElement.singleOrNull(item -> item % 2 == 0);
144144
assertEquals(result9, Integer.valueOf(2));
145-
final Integer result10 = uWithMoreElement.singleOrNull(uWithMoreElement.singleOrNull(item -> item % 2 == 1));
145+
final Integer result10 = uWithMoreElement.singleOrNull(item -> item % 2 == 1);
146146
assertEquals(result10, null);
147147
}
148148

@@ -653,22 +653,22 @@ public void findLastIndex() {
653653
*/
654654
@Test
655655
public void range() {
656-
final int[] result = U.range(10);
657-
assertArrayEquals(new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, result);
656+
final List<Integer> result = U.range(10);
657+
assertEquals("[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", result.toString());
658658
final List<Integer> resultChain = U.chain("").range(10).value();
659659
assertEquals("[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]", resultChain.toString());
660-
final int[] result2 = U.range(1, 11);
661-
assertArrayEquals(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, result2);
660+
final List<Integer> result2 = U.range(1, 11);
661+
assertEquals("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", result2.toString());
662662
final List<Integer> result2Chain = U.chain("").range(1, 11).value();
663663
assertEquals("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]", result2Chain.toString());
664-
final int[] result3 = U.range(0, 30, 5);
665-
assertArrayEquals(new int[] {0, 5, 10, 15, 20, 25}, result3);
664+
final List<Integer> result3 = U.range(0, 30, 5);
665+
assertEquals("[0, 5, 10, 15, 20, 25]", result3.toString());
666666
final List<Integer> result3Chain = U.chain("").range(0, 30, 5).value();
667667
assertEquals("[0, 5, 10, 15, 20, 25]", result3Chain.toString());
668-
final int[] result4 = U.range(0, -10, -1);
669-
assertArrayEquals(new int[] {0, -1, -2, -3, -4, -5, -6, -7, -8, -9}, result4);
670-
final int[] result5 = U.range(0);
671-
assertArrayEquals(new int[] {}, result5);
668+
final List<Integer> result4 = U.range(0, -10, -1);
669+
assertEquals("[0, -1, -2, -3, -4, -5, -6, -7, -8, -9]", result4.toString());
670+
final List<Integer> result5 = U.range(0);
671+
assertEquals("[]", result5.toString());
672672
}
673673

674674
/*

0 commit comments

Comments
 (0)