- changed milestone to Next Minor Release
TIntLinkedList.indexOf(...) returns -1
Issue #16
resolved
Hi all,
there is an issue with TIntLinkedList.indexOf. Suppose we have 4 elements in list and then indexOf for the forth value would return -1. On the TIntArrayList behavior of indexOf is as expected.
To reproduce, try:
TIntLinkedList list = new TIntLinkedList(); list.add(0); list.add(1); list.add(2); list.add(3); Assert.assertEquals(list.indexOf(0), 0); Assert.assertEquals(list.indexOf(1), 1); Assert.assertEquals(list.indexOf(2), 2); Assert.assertEquals(list.indexOf(3), 3);
Result: FAILED: testTroveDataTypes java.lang.AssertionError: expected [3] but found [-1]
Verified the issue via unit test.