Skip to content

Commit

Permalink
Ensure all GetHashCode functions are implemented (#2804) (v2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Oct 26, 2023
1 parent c853205 commit 8a84fdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/xunit.assert/Asserts
6 changes: 3 additions & 3 deletions src/xunit.execution/Sdk/Reflection/ReflectionMethodInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using Xunit.Abstractions;
Expand Down Expand Up @@ -219,10 +218,11 @@ bool IEqualityComparer.Equals(object x, object y)
return typeX == typeY;
}

[SuppressMessage("Code Notifications", "RECS0083:Shows NotImplementedException throws in the quick task bar", Justification = "This class is not intended to be used in a hashed container")]
int IEqualityComparer.GetHashCode(object obj)
{
throw new NotImplementedException();
Guard.ArgumentNotNull(nameof(obj), obj);

return obj.GetHashCode();
}
}
}
Expand Down

0 comments on commit 8a84fdb

Please sign in to comment.