mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add test
This commit is contained in:
parent
f368a0a0d2
commit
694168a3cb
@ -829,6 +829,20 @@ public class ArrayUtilTest {
|
|||||||
new String(a.getBytes(CharsetUtil.UTF_8), 1, 4));
|
new String(a.getBytes(CharsetUtil.UTF_8), 1, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void copyTest() {
|
||||||
|
final String[] dest = new String[3];
|
||||||
|
ArrayUtil.copy(new String[]{"a", "b"}, dest);
|
||||||
|
Assertions.assertArrayEquals(new String[]{"a", "b", null}, dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void copyTest2() {
|
||||||
|
final String[] dest = new String[3];
|
||||||
|
ArrayUtil.copy(new String[]{"a", "b"}, dest, 1);
|
||||||
|
Assertions.assertArrayEquals(new String[]{"a", null, null}, dest);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void regionMatchesTest() {
|
public void regionMatchesTest() {
|
||||||
final byte[] a = new byte[]{1, 2, 3, 4, 5};
|
final byte[] a = new byte[]{1, 2, 3, 4, 5};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user