Skip to content
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

Merged
merged 9 commits into from
Mar 21, 2017

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Mar 21, 2017

Fixes #17650

@CyrusNajmabadi
Copy link
Member Author

Tagging @dotnet/roslyn-ide

@@ -14,6 +14,8 @@

namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.GenerateEqualsAndGetHashCodeFromMembers
{
using static GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider;
Copy link
Member

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()
Copy link
Member

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()
Copy link
Member

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?

Copy link
Member Author

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.

@CyrusNajmabadi CyrusNajmabadi merged commit 1168c4c into dotnet:master Mar 21, 2017
@CyrusNajmabadi CyrusNajmabadi deleted the implementIEquatable branch March 21, 2017 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants