1
Vote

Return value not as expected. Heap class, Remove method

description

When the heap size < 4 and contains no item of value 0, the Remove method still returns true, when the expected return value is false
[Test]
public void testMethod()
{
Heap<int> actual = new Heap<int> {1,2,3};
actual.Remove(0);
}
 
Comment: The problem is due to the default assignment of array of size 4 in the constructor

comments