6 writes to Capacity
Microsoft.CodeAnalysis (2)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (2)
570
Capacity
= newCapacity;
1298
Capacity
= _size;
Microsoft.CodeAnalysis.UnitTests (4)
Collections\List\SegmentedList.Generic.Tests.Capacity.cs (4)
44
Assert.Throws<ArgumentOutOfRangeException>(() => list.
Capacity
= initialCapacity - 1);
57
list.
Capacity
= requestedCapacity;
73
segmented.
Capacity
= initialCapacity + elementCountToAdd;
100
segmented.
Capacity
= initialCapacity + addItemCount;
9 references to Capacity
Microsoft.CodeAnalysis.UnitTests (9)
Collections\List\SegmentedList.Generic.Tests.Capacity.cs (7)
59
Assert.Equal(requestedCapacity, list.
Capacity
);
107
Assert.Equal(segmented.
Capacity
, resizedSegments[0].Length);
121
Assert.Equal(expectedCapacity, list.
Capacity
);
133
Assert.Equal(elementCount, list.
Capacity
);
141
Assert.Equal(expectedCapacity, list.
Capacity
);
150
Assert.Equal(elementCount, list.
Capacity
);
154
Assert.Equal(SegmentedArray<T>.TestAccessor.SegmentSize, list.
Capacity
);
Collections\List\SegmentedList.Generic.Tests.Constructor.cs (2)
28
Assert.Equal(0, list.
Capacity
); //"Expected capacity of list to be the same as given."
43
Assert.Equal(capacity, list.
Capacity
); //"Expected capacity of list to be the same as given."