-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give an option to also implement IEquatable when generating Equals/GetHashCode. #18021
Give an option to also implement IEquatable when generating Equals/GetHashCode. #18021
Conversation
Tagging @dotnet/roslyn-ide |
ed85194
to
3fd0567
Compare
@@ -14,6 +14,8 @@ | |||
|
|||
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.GenerateEqualsAndGetHashCodeFromMembers | |||
{ | |||
using static GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider; |
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.
Using inside namespace - please just stahp!
} | ||
|
||
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateEqualsAndGetHashCode)] | ||
public async Task TestImplementIEquatable1() |
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.
Better names for tests would be nice (mention that the interesting part is that it's a struct for example)
} | ||
|
||
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateEqualsAndGetHashCode)] | ||
public async Task TestImplementIEquatable3() |
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.
What is this test trying to document?
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.
Good point on naming. Will fix up. To answer your question, in this specific case we are verifying that if you already implement IEquatable that we do not offer to implement that interface in the dialog.
Fixes #17650