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 507f323
Show file tree
Hide file tree
Showing 92 changed files with 129 additions and 333 deletions.
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
48 changes: 0 additions & 48 deletions C5.UserGuideExamples/SerializationExample.cs

This file was deleted.

2 changes: 0 additions & 2 deletions C5/Arrays/ArrayList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace C5
/// When the FIFO property is set to true the class will function as a (FIFO) queue
/// but very inefficiently, use a LinkedList (<see cref="T:C5.LinkedList`1"/>) instead.</i>
/// </summary>
[Serializable]
public class ArrayList<T> : ArrayBase<T>, IList<T>, IStack<T>, IQueue<T>
{
#region Fields
Expand Down Expand Up @@ -541,7 +540,6 @@ private void DisposeOverlappingViews(bool reverse)
#endregion

#region Position, PositionComparer and ViewHandler nested types
[Serializable]
private class PositionComparer : SCG.IComparer<Position>
{
public int Compare(Position a, Position b)
Expand Down
1 change: 0 additions & 1 deletion C5/Arrays/CircularQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace C5
///
/// </summary>
/// <typeparam name="T"></typeparam>
[Serializable]
public class CircularQueue<T> : SequencedBase<T>, IQueue<T>, IStack<T>
{
#region Fields
Expand Down
2 changes: 0 additions & 2 deletions C5/Arrays/HashedArrayList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace C5
/// When the FIFO property is set to true the class will function as a (FIFO) queue
/// but very inefficiently, use a LinkedList (<see cref="T:C5.LinkedList`1"/>) instead.</i>
/// </summary>
[Serializable]
public class HashedArrayList<T> : ArrayBase<T>, IList<T>, SCG.IList<T>
{
#region Fields
Expand Down Expand Up @@ -550,7 +549,6 @@ private void DisposeOverlappingViews(bool reverse)
#endregion

#region Position, PositionComparer and ViewHandler nested types
[Serializable]
private class PositionComparer : SCG.IComparer<Position>
{
public int Compare(Position a, Position b)
Expand Down
1 change: 0 additions & 1 deletion C5/Arrays/SortedArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ namespace C5
/// <summary>
/// A collection class implementing a sorted dynamic array data structure.
/// </summary>
[Serializable]
public class SortedArray<T> : ArrayBase<T>, IIndexedSorted<T>
{
#region Events
Expand Down
Loading

0 comments on commit 507f323

Please sign in to comment.