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 .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
dotnet-version: ${{ matrix.options.rv }}

- name: Publish tests
run: dotnet publish "test/SortingNetworks.Tests/SortingNetworks.Tests.csproj" -o ".deploy/SortingNetworks.Tests" -c "Release" -f "${{ matrix.options.tf }}"
run: dotnet publish "test/SortingNetworks.Tests/SortingNetworks.Tests.csproj" -o ".deploy/SortingNetworks.Tests" -c "Release" -f "${{ matrix.options.tf }}" /p:DisableDefaultDocumentation=true

- name: Run tests with code coverage
if: ${{ matrix.options.codecov }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
languages: 'csharp'

- name: Build
run: dotnet build "src/SortingNetworks/SortingNetworks.csproj" -c "Release" -f "net6.0" /p:UseSharedCompilation=false /p:DisableDefaultDocumentation=true
run: dotnet build "src/SortingNetworks/SortingNetworks.csproj" -c "Release" -f "net7.0" /p:UseSharedCompilation=false /p:DisableDefaultDocumentation=true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<NeutralLanguage>en</NeutralLanguage>
<Icon>icon.png</Icon>
<Copyright>2020 Petar Petrov</Copyright>

<!--Ensure `SolutionName|SolutionDir` in Github actions-->
<SolutionName Condition="$(SolutionName) == '' Or $(SolutionName) == '*Undefined*'">SortingNetworks</SolutionName>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildThisFileDirectory)</SolutionDir>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions SortingNetworks.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE = LICENSE
nuget.config = nuget.config
README.md = README.md
SortingNetworks.snk = SortingNetworks.snk
TemplateUtilities.ttinclude = TemplateUtilities.ttinclude
EndProjectSection
EndProject
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/SortingNetworks/SortingNetworks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<!-- Strong name -->
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>SortingNetworks.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(SolutionDir)$(SolutionName).snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions test/SortingNetworks.Tests/SNTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private static T[] PrivateGenerateArrays<T>(GenerationMode mode, T[] expected, i
}
}).Reverse().ToArray(),
GenerationMode.Random
=> expected.OrderBy(x => ThreadSafeRandom.Next()).ToArray(),
=> expected.OrderBy(x => Random.Shared.Next()).ToArray(),
GenerationMode.SpecialValues
=> expected.ToArray(),
_
Expand All @@ -132,7 +132,7 @@ private static T[] PrivateGenerateArrays<T>(GenerationMode mode, bool ascending,
{
result = Enumerable
.Range(1, length)
.Select(x => Helper<T>.Values[ThreadSafeRandom.Next(0, Helper<T>.Values.Length)])
.Select(x => Helper<T>.Values[Random.Shared.Next(0, Helper<T>.Values.Length)])
.OrderBy(x => x)
.Select(x => (T)Convert.ChangeType(x, typeof(T), CultureInfo.InvariantCulture));
}
Expand Down
35 changes: 0 additions & 35 deletions test/SortingNetworks.Tests/ThreadSafeRandom.cs

This file was deleted.