Skip to content

Commit

Permalink
3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ondfisk committed Jun 5, 2024
1 parent 8da3a68 commit dc13def
Show file tree
Hide file tree
Showing 94 changed files with 157 additions and 763 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: "daily"
interval: daily

- package-ecosystem: nuget
directory: /
Expand Down
56 changes: 28 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ on:
workflow_dispatch:

env:
RESOURCE_GROUP_NAME: ondfisk
WEBAPP_NAME: c5
BUILD_CONFIGURATION: Release

jobs:
build:
name: Build & Test

runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: actions/setup-dotnet@v4.0.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Restore
run: dotnet restore
Expand All @@ -39,37 +39,37 @@ jobs:
run: dotnet build --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore

- name: Test
run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=TestResults/ -p:CoverletOutputFormat=opencover
run: dotnet test --configuration ${{ env.BUILD_CONFIGURATION }} --no-build

- uses: actions/upload-artifact@v3
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: lib
path: bin/**/*.nupkg

documentation:
name: Generate Documentation
deploy:
name: Deploy

# if: ${{ github.ref == 'refs/heads/master' }}

runs-on: ubuntu-latest
container:
image: corentinaltepe/doxygen

steps:
- uses: actions/[email protected]
permissions:
packages: write
contents: read
issues: read
checks: write
pull-requests: write

- name: Install GraphViz
run: apk update && apk add graphviz font-bitstream-type1 ghostscript-fonts

- name: Generate Documentation
run: doxygen Doxyfile
needs:
- build

- uses: actions/upload-artifact@v3
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: docs
path: docs/

# deploy:
# name: Deploy
# runs-on: ubuntu-latest
# if: ${{ github.ref == 'refs/heads/master' }}
# needs:
# - build
# environment: Production
name: lib

- name: Push package to GitHub packages
run: dotnet nuget push ./**/*.nupkg --source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" --api-key ${{ secrets.GITHUB_TOKEN }}
32 changes: 0 additions & 32 deletions C5.Tests/ArrayListTests.cs

This file was deleted.

12 changes: 6 additions & 6 deletions C5.Tests/Arrays/ArrayListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2249,10 +2249,10 @@ public void DirectionAndCount()
lst.Add(i);
}

Assert.AreEqual(EnumerationDirection.Forwards, lst.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, lst[3, 4].Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst[3, 4].Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, lst.Direction);
Assert.AreEqual(Direction.Forwards, lst[3, 4].Direction);
Assert.AreEqual(Direction.Backwards, lst[3, 4].Backwards().Direction);
Assert.AreEqual(Direction.Backwards, lst.Backwards().Direction);
Assert.AreEqual(4, lst[3, 4].Count);
Assert.AreEqual(4, lst[3, 4].Backwards().Count);
Assert.AreEqual(10, lst.Backwards().Count);
Expand Down Expand Up @@ -2462,8 +2462,8 @@ public void Bxxx()
Assert.IsTrue(IC.Eq(view.Backwards(), 2, 1));
Assert.AreSame(list, view.Underlying);
Assert.IsNull(list.Underlying);
Assert.AreEqual(EnumerationDirection.Forwards, view.Direction);
Assert.AreEqual(EnumerationDirection.Backwards, view.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, view.Direction);
Assert.AreEqual(Direction.Backwards, view.Backwards().Direction);
Assert.AreEqual(0, list.Offset);
Assert.AreEqual(1, view.Offset);
}
Expand Down
12 changes: 6 additions & 6 deletions C5.Tests/Arrays/HashedArrayListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2060,10 +2060,10 @@ public void DirectionAndCount()
lst.Add(i);
}

Assert.AreEqual(EnumerationDirection.Forwards, lst.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, lst[3, 4].Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst[3, 4].Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, lst.Direction);
Assert.AreEqual(Direction.Forwards, lst[3, 4].Direction);
Assert.AreEqual(Direction.Backwards, lst[3, 4].Backwards().Direction);
Assert.AreEqual(Direction.Backwards, lst.Backwards().Direction);
Assert.AreEqual(4, lst[3, 4].Count);
Assert.AreEqual(4, lst[3, 4].Backwards().Count);
Assert.AreEqual(10, lst.Backwards().Count);
Expand Down Expand Up @@ -2284,8 +2284,8 @@ public void Bxxx()
Assert.IsTrue(IC.Eq(view.Backwards(), 2, 1));
Assert.AreSame(list, view.Underlying);
Assert.IsNull(list.Underlying);
Assert.AreEqual(EnumerationDirection.Forwards, view.Direction);
Assert.AreEqual(EnumerationDirection.Backwards, view.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, view.Direction);
Assert.AreEqual(Direction.Backwards, view.Backwards().Direction);
Assert.AreEqual(0, list.Offset);
Assert.AreEqual(1, view.Offset);
}
Expand Down
20 changes: 10 additions & 10 deletions C5.Tests/Arrays/SortedArrayTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,16 @@ public void Backwards()
[Test]
public void Direction()
{
Assert.AreEqual(EnumerationDirection.Forwards, array.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, array.RangeFrom(20).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, array.RangeTo(7).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, array.RangeFromTo(1, 12).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, array.RangeAll().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, array.Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, array.RangeFrom(20).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, array.RangeTo(7).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, array.RangeFromTo(1, 12).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, array.RangeAll().Backwards().Direction);
Assert.AreEqual(C5.Direction.Forwards, array.Direction);
Assert.AreEqual(C5.Direction.Forwards, array.RangeFrom(20).Direction);
Assert.AreEqual(C5.Direction.Forwards, array.RangeTo(7).Direction);
Assert.AreEqual(C5.Direction.Forwards, array.RangeFromTo(1, 12).Direction);
Assert.AreEqual(C5.Direction.Forwards, array.RangeAll().Direction);
Assert.AreEqual(C5.Direction.Backwards, array.Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, array.RangeFrom(20).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, array.RangeTo(7).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, array.RangeFromTo(1, 12).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, array.RangeAll().Backwards().Direction);
}


Expand Down
4 changes: 2 additions & 2 deletions C5.Tests/C5.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand All @@ -12,7 +12,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
12 changes: 6 additions & 6 deletions C5.Tests/LinkedLists/HashedLinkedListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1578,10 +1578,10 @@ public void DirectionAndCount()
lst.Add(i);
}

Assert.AreEqual(EnumerationDirection.Forwards, lst.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, lst[3, 7].Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst[3, 7].Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, lst.Direction);
Assert.AreEqual(Direction.Forwards, lst[3, 7].Direction);
Assert.AreEqual(Direction.Backwards, lst[3, 7].Backwards().Direction);
Assert.AreEqual(Direction.Backwards, lst.Backwards().Direction);
Assert.AreEqual(4, lst[3, 4].Count);
Assert.AreEqual(4, lst[3, 4].Backwards().Count);
Assert.AreEqual(10, lst.Backwards().Count);
Expand Down Expand Up @@ -1790,8 +1790,8 @@ public void Bxxx()
Assert.IsTrue(IC.Eq(view.Backwards(), 2, 1));
Assert.AreSame(list, view.Underlying);
Assert.IsNull(list.Underlying);
Assert.AreEqual(EnumerationDirection.Forwards, view.Direction);
Assert.AreEqual(EnumerationDirection.Backwards, view.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, view.Direction);
Assert.AreEqual(Direction.Backwards, view.Backwards().Direction);
Assert.AreEqual(0, list.Offset);
Assert.AreEqual(1, view.Offset);
}
Expand Down
12 changes: 6 additions & 6 deletions C5.Tests/LinkedLists/LinkedListTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,10 +1610,10 @@ public void DirectionAndCount()
lst.Add(i);
}

Assert.AreEqual(EnumerationDirection.Forwards, lst.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, lst[3, 7].Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst[3, 7].Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, lst.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, lst.Direction);
Assert.AreEqual(Direction.Forwards, lst[3, 7].Direction);
Assert.AreEqual(Direction.Backwards, lst[3, 7].Backwards().Direction);
Assert.AreEqual(Direction.Backwards, lst.Backwards().Direction);
Assert.AreEqual(4, lst[3, 4].Count);
Assert.AreEqual(4, lst[3, 4].Backwards().Count);
Assert.AreEqual(10, lst.Backwards().Count);
Expand Down Expand Up @@ -1826,8 +1826,8 @@ public void Bxxx()
Assert.IsTrue(IC.Eq(view.Backwards(), 2, 1));
Assert.AreSame(list, view.Underlying);
Assert.IsNull(list.Underlying);
Assert.AreEqual(EnumerationDirection.Forwards, view.Direction);
Assert.AreEqual(EnumerationDirection.Backwards, view.Backwards().Direction);
Assert.AreEqual(Direction.Forwards, view.Direction);
Assert.AreEqual(Direction.Backwards, view.Backwards().Direction);
Assert.AreEqual(0, list.Offset);
Assert.AreEqual(1, view.Offset);
}
Expand Down
20 changes: 10 additions & 10 deletions C5.Tests/Trees/Bag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -565,16 +565,16 @@ public void Backwards()
[Test]
public void Direction()
{
Assert.AreEqual(EnumerationDirection.Forwards, tree.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeFrom(20).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeTo(7).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeFromTo(1, 12).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeAll().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeFrom(20).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeTo(7).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeFromTo(1, 12).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeAll().Backwards().Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeFrom(20).Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeTo(7).Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeFromTo(1, 12).Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeAll().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeFrom(20).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeTo(7).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeFromTo(1, 12).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeAll().Backwards().Direction);
}


Expand Down
20 changes: 10 additions & 10 deletions C5.Tests/Trees/RedBlackTreeSetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,16 +318,16 @@ public void Backwards()
[Test]
public void Direction()
{
Assert.AreEqual(EnumerationDirection.Forwards, tree.Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeFrom(20).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeTo(7).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeFromTo(1, 12).Direction);
Assert.AreEqual(EnumerationDirection.Forwards, tree.RangeAll().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeFrom(20).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeTo(7).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeFromTo(1, 12).Backwards().Direction);
Assert.AreEqual(EnumerationDirection.Backwards, tree.RangeAll().Backwards().Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeFrom(20).Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeTo(7).Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeFromTo(1, 12).Direction);
Assert.AreEqual(C5.Direction.Forwards, tree.RangeAll().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeFrom(20).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeTo(7).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeFromTo(1, 12).Backwards().Direction);
Assert.AreEqual(C5.Direction.Backwards, tree.RangeAll().Backwards().Direction);
}


Expand Down
4 changes: 2 additions & 2 deletions C5.Tests/WrappersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public void NoExc()
Assert.IsTrue(IC.Eq(extarray, 0, 4, 6, 5, 0));
Assert.AreEqual(3, wrapped.Count);
Assert.AreEqual(Speed.Constant, wrapped.CountSpeed);
Assert.AreEqual(EnumerationDirection.Forwards, wrapped.Direction);
Assert.AreEqual(Direction.Forwards, wrapped.Direction);
Assert.AreEqual(false, wrapped.DuplicatesByCounting);
Assert.AreEqual(System.Collections.Generic.EqualityComparer<int>.Default, wrapped.EqualityComparer);
Assert.AreEqual(true, wrapped.Exists(is4));
Expand Down Expand Up @@ -718,7 +718,7 @@ public void View()
Assert.IsTrue(IC.Eq(extarray, 0, 4, 6, 5, 0));
Assert.AreEqual(3, wrapped.Count);
Assert.AreEqual(Speed.Constant, wrapped.CountSpeed);
Assert.AreEqual(EnumerationDirection.Forwards, wrapped.Direction);
Assert.AreEqual(Direction.Forwards, wrapped.Direction);
Assert.AreEqual(false, wrapped.DuplicatesByCounting);
Assert.AreEqual(System.Collections.Generic.EqualityComparer<int>.Default, wrapped.EqualityComparer);
Assert.AreEqual(true, wrapped.Exists(is4));
Expand Down
2 changes: 1 addition & 1 deletion C5.UserGuideExamples/C5.UserGuideExamples.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
Loading

0 comments on commit dc13def

Please sign in to comment.