diff --git a/Recyclable.Collections/RecyclableLongList.cs b/Recyclable.Collections/RecyclableLongList.cs index 7f925ca..58d2d9e 100644 --- a/Recyclable.Collections/RecyclableLongList.cs +++ b/Recyclable.Collections/RecyclableLongList.cs @@ -337,7 +337,7 @@ namespace Recyclable.Collections return false; } - if (_nextItemBlockIndex == 0 || (_nextItemBlockIndex == 1 && _nextItemIndex == 0)) + if (_nextItemBlockIndex == 0 || (_nextItemIndex == 0 && _nextItemBlockIndex == 1)) { return Array.IndexOf(_memoryBlocks[0], item, 0, checked((int)_longCount)) >= 0; } diff --git a/Recyclable.CollectionsTests/RecyclableLongListTests.cs b/Recyclable.CollectionsTests/RecyclableLongListTests.cs index 0d20af0..9c74a9a 100644 --- a/Recyclable.CollectionsTests/RecyclableLongListTests.cs +++ b/Recyclable.CollectionsTests/RecyclableLongListTests.cs @@ -173,7 +173,7 @@ namespace Recyclable.CollectionsTests } // Validate - _ = list.Capacity.Should().Be(0); + _ = list.Capacity.Should().BeGreaterThanOrEqualTo(RecyclableDefaults.InitialCapacity); _ = list.LastBlockWithData.Should().Be(-1); _ = list.LongCount.Should().Be(itemsCount); _ = list.Should().BeEmpty();