add clear() method
This commit is contained in:
@@ -447,6 +447,16 @@ public class IntListTest {
|
||||
Assert.assertEquals(0, list.getCapacity());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClear() {
|
||||
final IntList list = IntList.of(2, 0, 1); // unsorted list
|
||||
list.clear();
|
||||
|
||||
Assert.assertEquals(0, list.size());
|
||||
Assert.assertEquals(0, list.getCapacity());
|
||||
Assert.assertTrue(list.isSorted());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHashCodeEquals() {
|
||||
final IntList a = new IntList();
|
||||
|
||||
Reference in New Issue
Block a user