mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-09 11:35:28 +00:00
Add junit for GrowthListTest(int initialCapacity) (#92)
This commit is contained in:
parent
6e1443e3b1
commit
3bb76c2da1
@ -44,6 +44,21 @@ public class GrowthListTest<E> extends AbstractListTest<E> {
|
||||
return GrowthList.growthList(list);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
public void testGrowthList() {
|
||||
final Integer zero = Integer.valueOf(0);
|
||||
final Integer one = Integer.valueOf(1);
|
||||
final Integer two = Integer.valueOf(2);
|
||||
final GrowthList<Integer> grower = new GrowthList(1);
|
||||
assertEquals(0, grower.size());
|
||||
grower.add(0, zero);
|
||||
assertEquals(1, grower.size());
|
||||
grower.add(1, one);
|
||||
assertEquals(2, grower.size());
|
||||
grower.add(2, two);
|
||||
assertEquals(3, grower.size());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
public void testGrowthAdd() {
|
||||
final Integer one = Integer.valueOf(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user