Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ix.NET/Source/Ix.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 17.2.32131.331
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}"
ProjectSection(SolutionItems) = preProject
NetCore31TestReadme.txt = NetCore31TestReadme.txt
NetStandard21TestReadme.txt = NetStandard21TestReadme.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B733D97A-F1ED-4FC3-BF8E-9AC47A89DE96}"
Expand Down
7 changes: 0 additions & 7 deletions Ix.NET/Source/NetCore31TestReadme.txt

This file was deleted.

5 changes: 5 additions & 0 deletions Ix.NET/Source/NetStandard21TestReadme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Ix.NET 6.0 offers a .NET Standard 2.1 target, but currently, we have no way of testing this.

We used to test this target by running tests in .NET Core 3.1. Unfortunately, the test runners now crash when running tests in .NET Core 3.1. .NET Core 3.1 has long since been out of support, so there's not much we can do about this. (It now reports the absence of ssllib on the hosted build agents.)

Although current versions of .NET (but not .NET Framework) support .NET Standard 2.1, they are all going to prefer the net6.0 target. It might be possible to test via Mono instead, or possibly even Unity, but this would likely involve additional CI/CD work. But for now this target is untested. If we can't find a way to test netstandard2.1, that suggests there's no scenario in which it is useful now, so we may remove it in a future release.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>

<!--
CA1510: Use ArgumentNullException.ThrowIfNull - not available on .NET 4.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ public async Task Distinct6()
{
var xs = new[] { 1, 2, 1, 3, 5, 2, 1, 4 }.ToAsyncEnumerable().Distinct(k => k);

var res = new[] { 1, 2, 3, 5, 4 };
Assert.True(res.SequenceEqual(await xs.ToArrayAsync()));
var expected = new[] { 1, 2, 3, 5, 4 };
var actual = await xs.ToArrayAsync();
Assert.True(expected.SequenceEqual(actual));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>

<!--
CA1822: Make member static. Not necessary for test code.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- See NetCore31TestReadme.txt for why we still use netcoreapp3.1 -->
<TargetFrameworks>net48;net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net48;net8.0;net6.0</TargetFrameworks>

<!--
CA1510: Use ArgumentNullException.ThrowIfNull - not available on .NET 4.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ public async Task Concat_Three_ToArray()

var c = xs.Concat(ys).Concat(zs);

var res = new[] { 1, 2, 3, 4, 5, 6, 7, 8 };
Assert.True(res.SequenceEqual(await c.ToArrayAsync()));
var expected = new[] { 1, 2, 3, 4, 5, 6, 7, 8 };
var actual = await c.ToArrayAsync();
Assert.True(expected.SequenceEqual(actual));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ public async Task DefaultIfEmpty_IAsyncIListProvider_ToArray_Empty()
{
var xs = AsyncEnumerable.Empty<int>().DefaultIfEmpty(42);

var res = new[] { 42 };
var expected = new[] { 42 };
var actual = await xs.ToArrayAsync();

Assert.True(res.SequenceEqual(await xs.ToArrayAsync()));
Assert.True(expected.SequenceEqual(actual));
}

[Fact]
Expand All @@ -156,9 +157,10 @@ public async Task DefaultIfEmpty_IAsyncIListProvider_ToList()
{
var xs = new[] { 1, 2, 3, 4 }.ToAsyncEnumerable().DefaultIfEmpty();

var res = new[] { 1, 2, 3, 4 };
var expected = new[] { 1, 2, 3, 4 };

Assert.True(res.SequenceEqual(await xs.ToArrayAsync()));
var actual = await xs.ToArrayAsync();
Assert.True(expected.SequenceEqual(actual));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ public async Task Distinct_ToArray()
{
var xs = new[] { 1, 2, 1, 3, 5, 2, 1, 4 }.ToAsyncEnumerable().Distinct();

var res = new[] { 1, 2, 3, 5, 4 };
Assert.True(res.SequenceEqual(await xs.ToArrayAsync()));
var expected = new[] { 1, 2, 3, 5, 4 };
var actual = await xs.ToArrayAsync();
Assert.True(expected.SequenceEqual(actual));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7498,8 +7498,10 @@ public async Task OrderBy_OrderByDescendingAsyncWithCancellation_ThenByDescendin
private async Task AssertSorted<T>(IAsyncEnumerable<T> asyncRes, IEnumerable<T> syncRes)
{
Assert.True(await syncRes.ToAsyncEnumerable().SequenceEqualAsync(asyncRes));
Assert.True(syncRes.ToList().SequenceEqual(await asyncRes.ToListAsync()));
Assert.True(syncRes.ToArray().SequenceEqual(await asyncRes.ToArrayAsync()));
var toListResult = await asyncRes.ToListAsync();
Assert.True(syncRes.ToList().SequenceEqual(toListResult));
var toArrayResult = await asyncRes.ToArrayAsync();
Assert.True(syncRes.ToArray().SequenceEqual(toArrayResult));

int syncCount = syncRes.Count();
int asyncCount = await asyncRes.CountAsync();
Expand Down
12 changes: 3 additions & 9 deletions azure-pipelines.ix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stages:
jobs:
- job: Build
pool:
vmImage: ubuntu-latest
vmImage: windows-latest
steps:
- task: UseDotNet@2
displayName: Use .NET Core 8.x SDK
Expand All @@ -42,20 +42,14 @@ stages:
version: '6.x'
packageType: runtime

- task: UseDotNet@2
displayName: .NET Core 3.1 runtime
inputs:
version: '3.1.x'
packageType: runtime

- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool

- script: ./nbgv cloud -p Ix.NET/Source
- script: nbgv cloud -a -p Ix.NET/Source
displayName: Set Version

- task: DotNetCoreCLI@2
Expand Down Expand Up @@ -97,7 +91,7 @@ stages:
arguments: -c $(BuildConfiguration) --settings Ix.NET/Source/CodeCoverage.runsettings --collect:"XPlat Code Coverage" -- RunConfiguration.DisableAppDomain=true
displayName: Run Tests

- script: ./reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports -reporttypes:"Cobertura"
- script: reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/Ix.NET/Source/coverlet/reports -reporttypes:"Cobertura"
displayName: Create reports

- task: PublishCodeCoverageResults@1
Expand Down