From 054400599b7302587902c8da571d2a35734431ae Mon Sep 17 00:00:00 2001 From: mlemanczyk Date: Sun, 17 Dec 2023 18:56:19 +0100 Subject: [PATCH] Ranges extended. Package version bumped. --- .../Recyclable.Collections.TestData.csproj | 4 ++-- .../RecyclableLongListTestData.cs | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Recyclable.Collections.TestData/Recyclable.Collections.TestData.csproj b/Recyclable.Collections.TestData/Recyclable.Collections.TestData.csproj index 64979c7..fdca3cd 100644 --- a/Recyclable.Collections.TestData/Recyclable.Collections.TestData.csproj +++ b/Recyclable.Collections.TestData/Recyclable.Collections.TestData.csproj @@ -7,7 +7,7 @@ Library true Recyclable.Collections.TestData - 0.0.3.1 + 0.0.3.3 Marek LemaƄczyk N/A Recyclable.Collections.TestData @@ -19,7 +19,7 @@ LICENSE.md README.md git - Fixed runtime error caused by missing MoreLinq. + Range variants extended. AnyCPU;x64 logo.png diff --git a/Recyclable.Collections.TestData/RecyclableLongListTestData.cs b/Recyclable.Collections.TestData/RecyclableLongListTestData.cs index 155bc76..6dbc7cd 100644 --- a/Recyclable.Collections.TestData/RecyclableLongListTestData.cs +++ b/Recyclable.Collections.TestData/RecyclableLongListTestData.cs @@ -318,6 +318,12 @@ namespace Recyclable.Collections.TestData yield return (0L, Math.Max(itemIndex, 1L)); yield return (0L, Math.Max(itemsCount - itemIndex, 1L)); yield return (0L, Math.Max(Math.Min(itemsCount - itemIndex, 2L), 1L)); + + var rangeSize = (int)Math.Min(itemsCount - itemIndex, 4); + yield return ((int)(rangeSize > 2 ? Math.Max(0, itemIndex - 2) : itemIndex), rangeSize); + + rangeSize = (int)Math.Max(Math.Min(itemsCount - itemIndex - 2, 4), 0); + yield return ((int)(rangeSize > 2 ? Math.Max(0, itemIndex - 2 - 1) : Math.Max(0, itemIndex - 1)), rangeSize); } public static IEnumerable SourceDataWithBlockSizeWithItemIndexVariants { get; } = CombineSourceRefDataWithBlockSizeWithItemIndex(false);