From 039b04c2ef9dd72fe50355a09e9c77c23ffed99d Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Wed, 1 Jan 2020 00:19:21 +0700 Subject: [PATCH] Implemented SCG.IEqualityComparer on C5.Tests.SC class --- C5.Tests/SupportClasses.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/C5.Tests/SupportClasses.cs b/C5.Tests/SupportClasses.cs index 470342bb..97fe5936 100644 --- a/C5.Tests/SupportClasses.cs +++ b/C5.Tests/SupportClasses.cs @@ -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 + internal class SC : SCG.IComparer, SCG.IEqualityComparer { 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) {