-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add tests for IStructuralEquatable/Comparable throwing NullReferenceException #13436
Conversation
@stephentoub My intuition is that changing the thrown exception from FYI @KevinRansom This PR proposes to change the exception thrown by both System.Tuple and ValueTuple. |
Correct
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() |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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 |
@jcouv my fault too - I just updated the description to say "closes" instead of "fixes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests LGTM
@hughbe Thanks! |
Closes #13410
Closes #13429
/cc @stephentoub @jcouv