Skip to content

Commit

Permalink
Implemented SCG.IEqualityComparer<T> on C5.Tests.SC class
Browse files Browse the repository at this point in the history
  • Loading branch information
NightOwl888 committed Dec 31, 2019
1 parent 00b7326 commit 039b04c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion C5.Tests/SupportClasses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,28 @@

using NUnit.Framework;
using System;
using System.Diagnostics.CodeAnalysis;
using SCG = System.Collections.Generic;


namespace C5.Tests
{
internal class SC : SCG.IComparer<string>
internal class SC : SCG.IComparer<string>, SCG.IEqualityComparer<string>
{
public int Compare(string a, string b)
{
return a.CompareTo(b);
}

public bool Equals(string x, string y)
{
return StringComparer.Ordinal.Equals(x, y);
}

public int GetHashCode(string obj)
{
return StringComparer.Ordinal.GetHashCode(obj);
}

public void appl(String s)
{
Expand Down

0 comments on commit 039b04c

Please sign in to comment.