TIntLinkedList.indexOf(...) returns -1

Issue #16 resolved
Alexandr Romanyuk created an issue

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]

Comments (5)

  1. Log in to comment