small fix
This commit is contained in:
parent
376206389f
commit
9ce32992a7
|
@ -71,7 +71,7 @@ public class ArrayInitializer {
|
|||
return array;
|
||||
}
|
||||
|
||||
public static char[] initializeArrayUsingArraysUtilClone() {
|
||||
static char[] initializeArrayUsingArraysUtilClone() {
|
||||
char[] array = new char[] { 'a', 'b', 'c' };
|
||||
return ArrayUtils.clone(array);
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ public class ArrayInitializerTest {
|
|||
assertArrayEquals(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, initializeArrayUsingArraysSetAll());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenInitializeArrayUsingArraysUtilClone_thenCorrect() {
|
||||
assertArrayEquals(new char[] { 'a', 'b', 'c' }, initializeArrayUsingArraysUtilClone());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue