-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Runtimehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstest-enhancementImprovements of test source codeImprovements of test source code
Milestone
Description
The following tests demonstrates this.
[Fact]
public void IStructuralEquatable_Equals_NullEqualityComparer_ThrowsNullReferenceException()
{
IStructuralEquatable structuralEquatable = Tuple.Create(1);
Assert.Throws<NullReferenceException>(() => structuralEquatable.Equals(Tuple.Create(1), null));
}
[Fact]
public void IStructuralEquatable_GetHashCode_NullEqualityComparer_ThrowsNullReferenceException()
{
IStructuralEquatable structuralEquatable = Tuple.Create(1);
Assert.Throws<NullReferenceException>(() => structuralEquatable.GetHashCode(null));
}
[Fact]
public void IStructuralComparable_CompareTo_NullEqualityComparer_ThrowsNullReferenceException()
{
IStructuralComparable structuralComparable = Tuple.Create(1);
Assert.Throws<NullReferenceException>(() => structuralComparable.CompareTo(Tuple.Create(1), null));
}
I can send in a PR fixing this to throw ArgumentNullException, but there might be breaking change so I'll let you guys approve it before I go wasting my time ;)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Runtimehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstest-enhancementImprovements of test source codeImprovements of test source code