Made Add function, Added Tests. Added comments to int Tests
This commit is contained in:
parent
aad560b4fc
commit
a032e495cf
3 changed files with 71 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
public class FlexArrayIntTests
|
||||
{
|
||||
// Constructor tests
|
||||
[Fact]
|
||||
public void Construction_NoSize()
|
||||
{
|
||||
|
|
@ -36,6 +37,7 @@ public class FlexArrayIntTests
|
|||
array.Capacity.Should().Be(0, "negative size provided => set to 0");
|
||||
}
|
||||
|
||||
// Add tests
|
||||
[Fact]
|
||||
public void AddItem_Single()
|
||||
{
|
||||
|
|
@ -81,6 +83,7 @@ public class FlexArrayIntTests
|
|||
array.Count.Should().Be(FlexArrayInt.DefaultStartSize + 2);
|
||||
}
|
||||
|
||||
// Contains tests
|
||||
[Fact]
|
||||
public void Contains_Success()
|
||||
{
|
||||
|
|
@ -127,6 +130,7 @@ public class FlexArrayIntTests
|
|||
.Should().BeFalse("not contained in list");
|
||||
}
|
||||
|
||||
// Indexer tests
|
||||
[Fact]
|
||||
public void Indexer_Simple()
|
||||
{
|
||||
|
|
@ -160,7 +164,7 @@ public class FlexArrayIntTests
|
|||
|
||||
array[index].Should().Be(-1, reason);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void Iterate()
|
||||
{
|
||||
|
|
@ -176,6 +180,7 @@ public class FlexArrayIntTests
|
|||
}
|
||||
}
|
||||
|
||||
// Remove tests
|
||||
[Fact]
|
||||
public void Remove_ByIndex_Simple()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue