Skip to content

Commit

Permalink
Merge branch 'main' into release/v1.3.0-preview.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andreise committed Sep 14, 2023
2 parents 2a87476 + 7a2c71e commit 0140e7f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,28 @@ public static void FilterWithIndex_SourceIsNotEmptyAndNotAllPredicatesReturnFals
{ UpperAnotherString, true },
{ WhiteSpaceString, true },
{ AnotherString, false },
{ TabString, true }
{ TabString, true },
{ LowerAnotherString, true },
{ LowerSomeString, false },
{ MixedWhiteSpacesString, true }
};

var sourceItems = new[]
{
EmptyString,
SomeString,
UpperAnotherString,
WhiteSpaceString,
AnotherString,
TabString,
LowerAnotherString,
LowerSomeString
};

var sourceItems = new[] { EmptyString, SomeString, UpperAnotherString, WhiteSpaceString, AnotherString };
var source = mapper.Keys.ToArray().InitializeFlatArray(sourceItems.Length);

var actual = source.Filter(Predicate);
var expectedItems = new[] { EmptyString, UpperAnotherString, WhiteSpaceString };
var expectedItems = new[] { EmptyString, UpperAnotherString, WhiteSpaceString, TabString, LowerAnotherString };

actual.VerifyTruncatedState(expectedItems);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ public static void Filter_SourceIsNotEmptyAndNotAllPredicatesReturnFalse_ExpectF
{ Zero, true },
{ MinusOne, true },
{ One, false },
{ int.MinValue, true },
{ 75, true },
{ int.MaxValue, false },
{ PlusFifteen, true }
};

var source = mapper.Keys.ToArray().InitializeFlatArray(4);
var source = mapper.Keys.ToArray().InitializeFlatArray(mapper.Count);

var actual = source.Filter(Predicate);
var expectedItems = new[] { Zero, MinusOne };
var expectedItems = new[] { Zero, MinusOne, int.MinValue, 75, PlusFifteen };

actual.VerifyTruncatedState(expectedItems);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public FlatArray<T> Filter(Func<T, bool> predicate)

resultItems[resultLength++] = items![counter];
}
while (++counter < resultItems.Length);
while (++counter < length);

if (resultLength == default)
{
Expand Down Expand Up @@ -70,7 +70,7 @@ public FlatArray<T> Filter(Func<T, int, bool> predicate)

resultItems[resultLength++] = items![counter];
}
while (++counter < resultItems.Length);
while (++counter < length);

if (resultLength == default)
{
Expand Down
2 changes: 1 addition & 1 deletion src/flatcollections-array/FlatArray/FlatArray.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Description>PrimeFuncPack Core.FlatArray is a core library for .NET consisting of immutable FlatArray targeted for use in functional programming.</Description>
<RootNamespace>System</RootNamespace>
<AssemblyName>PrimeFuncPack.Core.FlatArray</AssemblyName>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/flatcollections/FlatCollections/FlatCollections.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Description>PrimeFuncPack Core.FlatCollections is a set of immutable Flat collections for .NET designed for developing business applications based on functional programming.</Description>
<RootNamespace>System</RootNamespace>
<AssemblyName>PrimeFuncPack.Core.FlatCollections</AssemblyName>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,7 +32,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="PrimeFuncPack.Core.FlatArray" Version="1.2.0" />
<PackageReference Include="PrimeFuncPack.Core.FlatArray" Version="1.2.1" />
</ItemGroup>

</Project>

0 comments on commit 0140e7f

Please sign in to comment.