1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-21 21:38:47 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
0b978f5cdf
refactor!: remove Span<T>.Split 2024-11-13 18:22:36 +00:00
9d870b2c24
chore(test): update dependencies
* coverlet.collector 6.0.2
* Microsoft.Extensions.Hosting 9.0.0
* Microsoft.NET.Test.Sdk 17.11.1
* NSubstitute 5.3.0
* NUnit 4.2.2
* NUnit3TestAdapter 4.6.0
* NUnit.Analyzers 4.3.0
* System.Reactive 6.0.1
2024-11-13 18:16:00 +00:00
b3dfaa727e
ci: bump actions/setup-dotnet to v4 2024-11-13 18:12:44 +00:00
9 changed files with 29 additions and 15 deletions

View File

@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x

View File

@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

View File

@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

View File

@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

View File

@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

View File

@ -5,7 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 4.0.0 - [Unreleased]
## 4.0.1 - [Unreleased]
### Removed
- X10D: Removed `Span<T>.Split` for .NET 9.0 target due to conflicts with
[`System.MemoryExtensions.Split`](https://learn.microsoft.com/en-us/dotnet/api/system.memoryextensions.split?view=net-8.0).
## [4.0.0] - 2024-06-12
### Added
@ -642,7 +649,8 @@ please [open an issue](https://github.com/oliverbooth/X10D/issues)!
Earlier versions of this package are undocumented and unlisted from package results.
[unreleased]: https://github.com/oliverbooth/X10D/compare/v3.3.1...main
[unreleased]: https://github.com/oliverbooth/X10D/compare/v4.0.0...main
[4.0.0]: https://github.com/oliverbooth/X10D/releases/tag/v4.0.0
[3.3.1]: https://github.com/oliverbooth/X10D/releases/tag/v3.3.1
[3.3.0]: https://github.com/oliverbooth/X10D/releases/tag/v3.3.0
[3.2.2]: https://github.com/oliverbooth/X10D/releases/tag/v3.2.2

View File

@ -14,14 +14,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
<PackageReference Include="NSubstitute" Version="5.1.0"/>
<PackageReference Include="NUnit" Version="3.14.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/>
<PackageReference Include="coverlet.collector" Version="6.0.0"/>
<PackageReference Include="System.Reactive" Version="6.0.0"/>
<PackageReference Include="coverlet.collector" Version="6.0.2"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1"/>
<PackageReference Include="NSubstitute" Version="5.3.0"/>
<PackageReference Include="NUnit" Version="4.2.2"/>
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0"/>
<PackageReference Include="NUnit.Analyzers" Version="4.3.0"/>
<PackageReference Include="System.Reactive" Version="6.0.1"/>
</ItemGroup>
<ItemGroup>

View File

@ -1,5 +1,7 @@
using NUnit.Framework;
#if !NET9_0_OR_GREATER
using X10D.Collections;
#endif
namespace X10D.Tests.Collections;
@ -70,6 +72,7 @@ internal class SpanTest
Assert.That(span.ToArray(), Is.EqualTo(new[] {1, 2, 3, 2, 5, 2, 7, 2, 9, 2, 11, 2, 13, 2, 15, 2}));
}
#if !NET9_0_OR_GREATER
[Test]
public void Split_OnEmptySpan_ShouldYieldNothing_UsingCharDelimiter_GivenReadOnlySpan()
{
@ -497,4 +500,5 @@ internal class SpanTest
Assert.That(index, Is.EqualTo(3));
}
#endif
}

View File

@ -75,6 +75,7 @@ public static class SpanExtensions
}
#endif
#if !NET9_0_OR_GREATER
/// <summary>
/// Splits a span of elements into sub-spans based on a delimiting element.
/// </summary>
@ -134,4 +135,5 @@ public static class SpanExtensions
{
return new SpanSplitEnumerator<T>(source, delimiter);
}
#endif
}