Skip to content

Commit

Permalink
NetFabric.Assertive 4.0.0-beta01
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmada committed May 20, 2021
1 parent 81d9acf commit 6349704
Show file tree
Hide file tree
Showing 52 changed files with 531 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1.1521" />
<PackageReference Include="BenchmarkDotNet" Version="0.12.1.1527" />
<PackageReference Include="LinqFaster.SIMD" Version="1.0.3" />
<PackageReference Include="StructLinq" Version="0.26.0" />
<PackageReference Include="System.Interactive" Version="5.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Meziantou.Analyzer" Version="1.0.645">
<PackageReference Include="Meziantou.Analyzer" Version="1.0.656">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="NetFabric.Assertive" Version="3.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="NetFabric.Assertive" Version="4.0.0-beta01" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.8.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.9.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="Nullable" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ public void AsValueEnumerable1_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests1
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
EnumerableExtensions.ValueEnumerable<int>,
ValueEnumerableExtensions.SkipEnumerable<EnumerableExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int>,
ValueEnumerableExtensions.TakeEnumerable<EnumerableExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int>>
ValueEnumerableExtensions.TakeEnumerable<EnumerableExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int>,
ValueEnumerableExtensions.WhereEnumerable<EnumerableExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<EnumerableExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueEnumerableTests1()
: base(array => Wrap.AsEnumerable(array).AsValueEnumerable<int>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ public void AsValueEnumerable1_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests1
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
ReadOnlyCollectionExtensions.ValueEnumerable<int>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int>>
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int>,
ValueReadOnlyCollectionExtensions.WhereEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int, FunctionWrapper<int, bool>>,
ValueReadOnlyCollectionExtensions.WhereAtEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<int>, ValueEnumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueEnumerableTests1()
: base(array => Wrap.AsReadOnlyCollection(array).AsValueEnumerable<int>())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,13 @@ public void AsValueEnumerable2_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests2
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
ValueEnumerableExtensions.ValueEnumerable<Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.SkipEnumerable<IValueEnumerable<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.TakeEnumerable<IValueEnumerable<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int>>
ValueEnumerableExtensions.TakeEnumerable<IValueEnumerable<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.WhereEnumerable<IValueEnumerable<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<IValueEnumerable<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueEnumerableTests2()
// ReSharper disable once HeapView.BoxingAllocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ public void AsValueReadOnlyCollection2_Sum_With_ValidData_Must_Succeed(int[] sou
}

public class ValueReadOnlyCollectionTests2
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
ValueReadOnlyCollectionExtensions.ValueEnumerable<Wrap.Enumerator<int>, int>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<IValueReadOnlyCollection<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<IValueReadOnlyCollection<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int>>
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<IValueReadOnlyCollection<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int>,
ValueReadOnlyCollectionExtensions.WhereEnumerable<IValueReadOnlyCollection<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, bool>>,
ValueReadOnlyCollectionExtensions.WhereAtEnumerable<IValueReadOnlyCollection<int, Wrap.Enumerator<int>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueReadOnlyCollectionTests2()
// ReSharper disable once HeapView.BoxingAllocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ public void AsValueEnumerable6_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests6
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
EnumerableExtensions.ValueEnumerable<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>>,
ValueEnumerableExtensions.SkipEnumerable<EnumerableExtensions.ValueEnumerable<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.TakeEnumerable<EnumerableExtensions.ValueEnumerable<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int>>
ValueEnumerableExtensions.TakeEnumerable<EnumerableExtensions.ValueEnumerable<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.WhereEnumerable<EnumerableExtensions.ValueEnumerable<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<EnumerableExtensions.ValueEnumerable<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.EnumerableWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueEnumerableTests6()
: base(array => Wrap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@ public void AsValueEnumerable6_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests6
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
ReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int>>
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int>,
ValueReadOnlyCollectionExtensions.WhereEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, bool>>,
ValueReadOnlyCollectionExtensions.WhereAtEnumerable<ReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>, Wrap.Enumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueEnumerableTests6()
: base(array => ReadOnlyCollectionExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ public void AsValueEnumerable6_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests6
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
ValueEnumerableExtensions.ValueEnumerable<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>>>,
ValueEnumerableExtensions.SkipEnumerable<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.TakeEnumerable<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>, int>>
ValueEnumerableExtensions.TakeEnumerable<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>, int>,
ValueEnumerableExtensions.WhereEnumerable<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<Wrap.ValueEnumerableWrapper<int>, Wrap.Enumerator<int>, int, FunctionWrapper<int, int, bool>>
>
{
public ValueEnumerableTests6()
: base(array => ValueEnumerableExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void AsValueEnumerable6_Sum_With_ValidData_Must_Succeed(int[] source)
}

public class ValueEnumerableTests6
: ValueEnumerableTestsBase<
: ValueEnumerableTests<
ValueReadOnlyCollectionExtensions.ValueEnumerable<Wrap.ValueReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, Wrap.Enumerator<int>, int, FunctionWrapper<Wrap.ValueReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>, FunctionWrapper<Wrap.ValueReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>>>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<Wrap.ValueReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, int>,
ValueReadOnlyCollectionExtensions.SkipTakeEnumerable<Wrap.ValueReadOnlyCollectionWrapper<int>, Wrap.Enumerator<int>, int>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void AsValueEnumerable1_With_ValidData_Must_Succeed(int[] source)
.AsValueEnumerable();

// Assert
result.SequenceEqual(source).Must().BeTrue();
result.Must().BeEnumerableOf<int>().BeEqualTo(source);
}

[Theory]
Expand Down Expand Up @@ -51,7 +51,10 @@ public void AsValueEnumerable1_Sum_With_ValidData_Must_Succeed(int[] source, int
}

public class ArraySegmentValueEnumerableTests
: ValueEnumerableTestsBase<ArrayExtensions.ArraySegmentValueEnumerable<int>>
: ValueEnumerableTests<
ArrayExtensions.ArraySegmentValueEnumerable<int>,
ValueEnumerableExtensions.WhereEnumerable<ArrayExtensions.ArraySegmentValueEnumerable<int>, ArrayExtensions.ArraySegmentValueEnumerable<int>.DisposableEnumerator, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<ArrayExtensions.ArraySegmentValueEnumerable<int>, ArrayExtensions.ArraySegmentValueEnumerable<int>.DisposableEnumerator, int, FunctionWrapper<int, int, bool>>>
{
public ArraySegmentValueEnumerableTests()
: base(array => new ArraySegment<int>(array).AsValueEnumerable())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ public void AsValueEnumerable1_Sum_With_ValidData_Must_Succeed(int[] source, int
}

public class ValueEnumerableTests
: ValueEnumerableTestsBase<ReadOnlyListExtensions.ValueEnumerable<Wrap.ReadOnlyListWrapper<int>, int>>
: ValueEnumerableTests<
ReadOnlyListExtensions.ValueEnumerable<Wrap.ReadOnlyListWrapper<int>, int>,
ValueEnumerableExtensions.WhereEnumerable<ReadOnlyListExtensions.ValueEnumerable<Wrap.ReadOnlyListWrapper<int>, int>, ReadOnlyListExtensions.ValueEnumerable<Wrap.ReadOnlyListWrapper<int>, int>.DisposableEnumerator, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<ReadOnlyListExtensions.ValueEnumerable<Wrap.ReadOnlyListWrapper<int>, int>, ReadOnlyListExtensions.ValueEnumerable<Wrap.ReadOnlyListWrapper<int>, int>.DisposableEnumerator, int, FunctionWrapper<int, int, bool>>>
{
public ValueEnumerableTests()
: base(array => Wrap.AsReadOnlyList(array).AsValueEnumerable())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void AsValueEnumerable1_With_ValidData_Must_Succeed(int[] source)
.AsValueEnumerable();

// Assert
result.SequenceEqual(source).Must().BeTrue();
result.Must().BeEnumerableOf<int>().BeEqualTo(source);
}

[Theory]
Expand Down Expand Up @@ -51,7 +51,10 @@ public void AsValueEnumerable1_Sum_With_ValidData_Must_Succeed(int[] source, int
}

public class MemoryValueEnumerableTests
: ValueEnumerableTestsBase<ArrayExtensions.MemoryValueEnumerable<int>>
: ValueEnumerableTests<
ArrayExtensions.MemoryValueEnumerable<int>,
ValueEnumerableExtensions.WhereEnumerable<ArrayExtensions.MemoryValueEnumerable<int>, ArrayExtensions.MemoryValueEnumerable<int>.DisposableEnumerator, int, FunctionWrapper<int, bool>>,
ValueEnumerableExtensions.WhereAtEnumerable<ArrayExtensions.MemoryValueEnumerable<int>, ArrayExtensions.MemoryValueEnumerable<int>.DisposableEnumerator, int, FunctionWrapper<int, int, bool>>>
{
public MemoryValueEnumerableTests()
: base(array => ((ReadOnlyMemory<int>)array.AsMemory()).AsValueEnumerable())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public void AsValueEnumerable_With_List_Must_ReturnWrapper(int[] source)
_ = result.Must()
.BeOfType<ArrayExtensions.ArraySegmentValueEnumerable<int>>()
.BeEnumerableOf<int>()
.BeEqualTo(wrapped, testRefStructs: false);
_ = result.SequenceEqual(wrapped).Must().BeTrue();
.BeEqualTo(wrapped);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public void AsValueEnumerable_With_ImmutableArray_Must_ReturnWrapper(int[] sourc
_ = result.Must()
.BeOfType<ArrayExtensions.ArraySegmentValueEnumerable<int>>()
.BeEnumerableOf<int>()
.BeEqualTo(wrapped, testRefStructs: false);
result.SequenceEqual(wrapped).Must().BeTrue();
.BeEqualTo(wrapped);
}
}
}
Loading

0 comments on commit 6349704

Please sign in to comment.