This commit is contained in:
Looly
2020-12-01 15:06:03 +08:00
parent 57d68a4db1
commit 23ee2d623a
2 changed files with 15 additions and 24 deletions

View File

@@ -377,4 +377,11 @@ public class ArrayUtilTest {
i = ArrayUtil.lastIndexOfSub(null, b);
Assert.assertEquals(-1, i);
}
@Test
public void reverseTest(){
int[] a = {1,2,3,4};
final int[] reverse = ArrayUtil.reverse(a);
Assert.assertArrayEquals(new int[]{4,3,2,1}, reverse);
}
}