Skip to content

Commit

Permalink
Fix SlimBagTest
Browse files Browse the repository at this point in the history
  • Loading branch information
notgiven688 committed Jun 1, 2024
1 parent 5da06db commit 7fe8680
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/JitterTests/MiscTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,36 @@ public void Setup()
public static void SlimBagTest()
{
var bag= new SlimBag<object>();

bag.Add(new object());
bag.Add(new object());
bag.Add(new object());

bag.Clear();
Assert.That(bag[0], Is.Not.EqualTo(null));

bag.NullOut();
Assert.That(bag[0], Is.EqualTo(null));

bag.Add(new object());
bag.Add(new object());

bag.RemoveAt(1);
Assert.That(bag[0], Is.Not.EqualTo(null));
Assert.That(bag[1], Is.Not.EqualTo(null));

bag.NullOut();
Assert.That(bag[0], Is.Not.EqualTo(null));
Assert.That(bag[1], Is.EqualTo(null));

bag.Clear();
bag.NullOut();

bag.Add(new object());
bag.Add(new object());
bag.Add(new object());

bag.NullOutOne();

Assert.That(bag[0], Is.Not.EqualTo(null));
Assert.That(bag[1], Is.Not.EqualTo(null));
Assert.That(bag[2], Is.Not.EqualTo(null));

bag.NullOutOne();
bag.RemoveAt(1);
Assert.That(bag[2], Is.Not.EqualTo(null));

bag.NullOutOne();
Assert.That(bag[2], Is.EqualTo(null));

bag.NullOutOne();

Assert.That(bag[0], Is.Not.EqualTo(null));
Assert.That(bag[1], Is.Not.EqualTo(null));
Assert.That(bag[2], Is.EqualTo(null));
Expand Down

0 comments on commit 7fe8680

Please sign in to comment.