Update parameter names to match https://github.com/dotnet/coreclr/pull/23029#35813
Conversation
|
Consider disabling the tests on netfx instead of special casing. |
I thought of that and I think it's still useful to know that the exception is thrown on NetFX even if the parameter name is missing. |
| AssertExtensions.Throws<ArgumentException>(null, () => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" })); | ||
| AssertExtensions.Throws<ArgumentException>( | ||
| PlatformDetection.IsFullFramework ? null : "userData", | ||
| () => handle.AllocateNativeOverlapped((_, __, ___) => { }, new object(), new NonBlittableType() { s = "foo" })); |
There was a problem hiding this comment.
AssertExtensions.Throws<ArgumentException>(
"userData",
null,
() => ...);Is close to this same behavior, but for that method null to netfx means "don't check" instead of "check it's actually null".
If checking that it's actually null is useful, it's probably worth a comment saying that using the overload is wrong; otherwise consider using the overload.
There was a problem hiding this comment.
@bartonjs Thanks, I figued out that the method exists based on the feedback on another PR. Would have been the perfect solution here.
|
Closing this for now because I abandoned dotnet/coreclr#23029 for performance reasons. |
No description provided.