Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Add tests for IStructuralEquatable/Comparable throwing NullReferenceException #13436

Merged
merged 1 commit into from
Nov 9, 2016
Merged

Conversation

hughbe
Copy link

@hughbe hughbe commented Nov 7, 2016

Closes #13410
Closes #13429

/cc @stephentoub @jcouv

@jcouv
Copy link
Member

jcouv commented Nov 8, 2016

@stephentoub My intuition is that changing the thrown exception from System.Tuple APIs is a breaking change. Is that correct?
If we do decide to make this change, we should flag or track this to make the same change to various mscorlibs that are not public (.Net desktop).

FYI @KevinRansom This PR proposes to change the exception thrown by both System.Tuple and ValueTuple.

@stephentoub
Copy link
Member

My intuition is that changing the thrown exception from System.Tuple APIs is a breaking change. Is that correct?

Correct

This PR proposes to change the exception thrown by both System.Tuple and ValueTuple.

Has the PR been updated? It looks like it's only adding tests at this point, not changing any exception-throwing logic in implementation.

IStructuralComparable_NullComparer_ThrowsNullReferenceException();
}

public void IStructuralComparable_NullComparer_ThrowsNullReferenceException()
Copy link
Member

@jcouv jcouv Nov 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a [Fact] on this so it runs as its own test (no need to invoke it from method above). Same suggestion for similar methods.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this is not possible, as no classes inherit from TupleTestDriver, so the [Fact] test will never run.

If you see the meat of the Tuple tests below, we have to call each test manually

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obvi, this should be cleaned up/fixed up, but for another PR

@jcouv
Copy link
Member

jcouv commented Nov 8, 2016

My bad. I got confused by the comment saying this fixes linked issues. Thanks for the correction.

The tests LGTM, although I'd suggest tagging the new methods as their own [Fact]. Thanks
#Closed

@hughbe
Copy link
Author

hughbe commented Nov 8, 2016

@jcouv my fault too - I just updated the description to say "closes" instead of "fixes"

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests LGTM

@stephentoub stephentoub merged commit 71014b3 into dotnet:master Nov 9, 2016
@hughbe hughbe deleted the ise-nre branch November 9, 2016 14:33
@jcouv
Copy link
Member

jcouv commented Nov 9, 2016

@hughbe Thanks!

@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants