This commit is contained in:
Looly
2023-04-14 22:48:06 +08:00
parent 55ee4298e9
commit b4a5d830a3
2 changed files with 23 additions and 9 deletions

View File

@@ -255,4 +255,11 @@ public class ListUtilTest {
final CopyOnWriteArrayList<String> strings = ListUtil.ofCopyOnWrite("a", "b");
Assertions.assertEquals(2, strings.size());
}
@Test
void reverseNewTest() {
final List<Integer> view = ListUtil.view(1, 2, 3);
final List<Integer> reverse = ListUtil.reverseNew(view);
Assertions.assertEquals("[3, 2, 1]", reverse.toString());
}
}