public void Null_enumerator_pass() { var x = new EnumerableStruct <int>(null); var comparer = new ComparerBuilder().GetComparer <EnumerableStruct <int> >(); Assert.Throws <NullReferenceException>(() => comparer.Compare(x, x)); Assert.Throws <NullReferenceException>(() => comparer.Compare(default, default));
public void Null_enumerator_pass() { var x = new EnumerableStruct <int>(null); var comparer = ComparerBuilder.Default.GetEqualityComparer <EnumerableStruct <int> >(); var hashX = comparer.GetHashCode(x); using (new AssertionScope()) { Assert.Throws <NullReferenceException>(() => comparer.Equals(x, x)); Assert.Throws <NullReferenceException>(() => comparer.Equals(default, default));