mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
ListUtil的page方法
调用PageUtil.setFirstPageNo(),如果firstPageNo不是从0开始计算会发生错误
This commit is contained in:
@@ -97,5 +97,10 @@ public class ListUtilTest {
|
||||
Assert.assertArrayEquals(new int[]{3,4},c2);
|
||||
Assert.assertArrayEquals(new int[]{5},c3);
|
||||
Assert.assertArrayEquals(new int[]{},c4);
|
||||
|
||||
|
||||
PageUtil.setFirstPageNo(1);
|
||||
int[] d1 = ListUtil.page(0,8,a).stream().mapToInt(Integer::valueOf).toArray();
|
||||
Assert.assertArrayEquals(new int[]{1,2,3,4,5},d1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user