This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 5de03cf77 Rname test
5de03cf77 is described below
commit 5de03cf773b915d0dbea097162996cb018d03009
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jan 15 12:37:15 2026 -0500
Rname test
---
.../commons/collections4/list/TreeListTest.java | 42 +++++++++++-----------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git
a/src/test/java/org/apache/commons/collections4/list/TreeListTest.java
b/src/test/java/org/apache/commons/collections4/list/TreeListTest.java
index 1f502208e..bff75d2bc 100644
--- a/src/test/java/org/apache/commons/collections4/list/TreeListTest.java
+++ b/src/test/java/org/apache/commons/collections4/list/TreeListTest.java
@@ -101,17 +101,6 @@ public class TreeListTest<E> extends AbstractListTest<E> {
return new TreeList<>();
}
- @Test
- void testPreviousNullPointerException() throws Throwable {
- final TreeList<String> treeList = new TreeList<>();
- treeList.add("a");
- treeList.add("b");
- assertThrows(IndexOutOfBoundsException.class, () ->
treeList.listIterator(3).previous());
- assertThrows(IndexOutOfBoundsException.class, () -> new
TreeList.TreeListIterator<String>(treeList, 3));
- // Test doesn't get to previous()
- assertThrows(IndexOutOfBoundsException.class, () -> new
TreeList.TreeListIterator<String>(treeList, 3).previous());
- }
-
@Test
@SuppressWarnings("unchecked")
void testAddMultiple() {
@@ -214,16 +203,6 @@ public class TreeListTest<E> extends AbstractListTest<E> {
assertEquals(0, l.indexOf("3"));
}
-// void testCheck() {
-// List l = makeEmptyList();
-// l.add("A1");
-// l.add("A2");
-// l.add("A3");
-// l.add("A4");
-// l.add("A5");
-// l.add("A6");
-// }
-
@Test
@SuppressWarnings("unchecked")
void testInsertBefore() {
@@ -234,6 +213,16 @@ public class TreeListTest<E> extends AbstractListTest<E> {
assertEquals("erna", l.get(1));
}
+// void testCheck() {
+// List l = makeEmptyList();
+// l.add("A1");
+// l.add("A2");
+// l.add("A3");
+// l.add("A4");
+// l.add("A5");
+// l.add("A6");
+// }
+
@Test
@SuppressWarnings("boxing") // OK in test code
void testIterationOrder() {
@@ -338,4 +327,15 @@ public class TreeListTest<E> extends AbstractListTest<E> {
assertEquals("harald", l.get(i++));
}
+ @Test
+ void testTreeListIteratorConstruction() throws Throwable {
+ final TreeList<String> treeList = new TreeList<>();
+ treeList.add("a");
+ treeList.add("b");
+ assertThrows(IndexOutOfBoundsException.class, () ->
treeList.listIterator(3).previous());
+ assertThrows(IndexOutOfBoundsException.class, () -> new
TreeList.TreeListIterator<String>(treeList, 3));
+ // Test doesn't get to previous()
+ assertThrows(IndexOutOfBoundsException.class, () -> new
TreeList.TreeListIterator<String>(treeList, 3).previous());
+ }
+
}