Check empty arrrays handled OK

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1394318 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-10-04 22:55:43 +00:00
parent ff5b829efd
commit 73a89b07dc
1 changed files with 4 additions and 0 deletions

View File

@ -461,6 +461,10 @@ public void testRemoveAllNullFloatArray() {
@Test @Test
public void testRemoveAllIntArray() { public void testRemoveAllIntArray() {
int[] array; int[] array;
array = ArrayUtils.removeAll(ArrayUtils.EMPTY_INT_ARRAY, ArrayUtils.EMPTY_INT_ARRAY);
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
array = ArrayUtils.removeAll(new int[] { 1 }, ArrayUtils.EMPTY_INT_ARRAY);
assertTrue(Arrays.equals(new int[] { 1 }, array));
array = ArrayUtils.removeAll(new int[] { 1 }, 0); array = ArrayUtils.removeAll(new int[] { 1 }, 0);
assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array)); assertTrue(Arrays.equals(ArrayUtils.EMPTY_INT_ARRAY, array));
assertEquals(Integer.TYPE, array.getClass().getComponentType()); assertEquals(Integer.TYPE, array.getClass().getComponentType());