From 3552dd00d1a5b7d9940a632f36507e46a9731bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Lema=C5=84czyk?= Date: Wed, 1 Mar 2023 23:09:48 +0100 Subject: [PATCH] Test object count increased to 100_000 to better cover cases. --- Recyclable.CollectionsTests/RecyclableListTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Recyclable.CollectionsTests/RecyclableListTests.cs b/Recyclable.CollectionsTests/RecyclableListTests.cs index 36ab1c0..95d59cd 100644 --- a/Recyclable.CollectionsTests/RecyclableListTests.cs +++ b/Recyclable.CollectionsTests/RecyclableListTests.cs @@ -5,7 +5,7 @@ namespace Recyclable.CollectionsTests { public class RecyclableListTests { - private const int _totalObjectCount = 5_000; + private const int _totalObjectCount = 100_000; private static RecyclableList NewRecyclableList => CreateReversedRecyclableList(_testData); private static readonly IEnumerable _testData = Enumerable.Range(1, _totalObjectCount); private static RecyclableList CreateReversedRecyclableList(IEnumerable source) => new(source, 1024); @@ -97,7 +97,7 @@ namespace Recyclable.CollectionsTests foreach (var item in testData) { // Validate - _ = list.Contains(item).Should().BeTrue(); + _ = list.Contains(item).Should().BeTrue($"we searched for {item}"); } } @@ -256,7 +256,7 @@ namespace Recyclable.CollectionsTests list.AddRange(testData); // Validate - _ = list.Capacity.Should().Be(16384, "when capacity == 0, then we allocate as much memory as needed, only"); + _ = list.Capacity.Should().Be(114_688, "when capacity == 0, then we allocate as much memory as needed, only"); _ = list.Should().HaveCount(testData.Length) .And.ContainInConsecutiveOrder(testData) .And.BeEquivalentTo(testData); @@ -273,7 +273,7 @@ namespace Recyclable.CollectionsTests list.AddRange(testData); // Validate - _ = list.Capacity.Should().Be(16384, "when capacity == 0, then we allocate as much memory as needed, only"); + _ = list.Capacity.Should().Be(114_688, "when capacity == 0, then we allocate as much memory as needed, only"); _ = list.Should().HaveCount(testData.Count) .And.ContainInConsecutiveOrder(testData) .And.BeEquivalentTo(testData);