# problem5.txt # Dan Ports # 6.170 PS2-5, 2004/02/19 # $Id: problem5.txt,v 1.1 2004/02/19 23:05:51 drkp Exp $ The provided implementation of BasicList was tested using the BasicListTest test suite. The following errors were observed: testEqualsFalse() failed: The comparison (with equals()) of two non-equal BasicLists returned true. equals() operated correctly when tested on test cases that should have returned true, and comparisons to null and objects of different runtime types. Perhaps equals() may be returning true for all comparisons of two BasicLists. testContains() failed: The contains() method does not correctly return whether an object is contained in the list. testIndexOfNull() failed: indexOf() threw a NullPointerException when checking the index of null in a BasicList; it should have returned a correct value. testRemoveReturnValue() failed: remove() correctly removed objects from the BasicList, but it did not return the objects it removed. It returned null instead. testToArrayOversize() failed: When called with an array as argument that has more elements than the list, toArray() should return the same array with the elements from the list placed in the first spaces followed by a null element. However, when a BasicList of length 3 was placed in an array of length 5 using toArray, the returned array had length 3 -- the length of the BasicList, which is not correct.