Skip to content

Cleanup IDE space around instance operators #78349

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11257,75 +11257,71 @@ class C : ITest
}.RunAsync();
}

[Theory(Skip = "Yes")] // PROTOTYPE: Something doesn't work
[CombinatorialData]
[Theory, CombinatorialData]
public async Task TestInstanceIncrementOperator_ImplementExplicitly([CombinatorialValues("++", "--")] string op)
{
await new VerifyCS.Test
{
ReferenceAssemblies = ReferenceAssemblies.Net.Net60,
LanguageVersion = LanguageVersion.Preview,
TestCode = $$$"""
interface ITest
{
abstract void operator {{{op}}}();
}
class C : {|CS0535:ITest|}
{
}
""" + CompilerFeatureRequiredAttribute,
interface ITest
{
abstract void operator {{{op}}}();
}
class C : {|CS0535:ITest|}
{
}
""" + CompilerFeatureRequiredAttribute,
FixedCode = $$$"""
interface ITest
{
abstract void operator {{{op}}}();
}
class C : ITest
{
void ITest.operator {{{op}}}()
interface ITest
{
throw new System.NotImplementedException();
abstract void operator {{{op}}}();
}
}
""" + CompilerFeatureRequiredAttribute,
class C : ITest
{
void ITest.operator {{{op}}}()
{
throw new System.NotImplementedException();
}
}
""" + CompilerFeatureRequiredAttribute,
CodeActionVerifier = (codeAction, verifier) => verifier.Equal(CodeFixesResources.Implement_all_members_explicitly, codeAction.Title),
CodeActionEquivalenceKey = "True;False;False:global::ITest;Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService+ImplementInterfaceCodeAction;",
CodeActionIndex = 0,
CodeActionIndex = 1,
}.RunAsync();
}

[Theory(Skip = "Yes")] // PROTOTYPE: Something doesn't work
[CombinatorialData]
[Theory, CombinatorialData]
public async Task TestInstanceCompoundAssignmentOperator_ImplementExplicitly([CombinatorialValues("+=", "-=", "*=", "/=", "%=", "&=", "|=", "^=", "<<=", ">>=", ">>>=")] string op)
{
await new VerifyCS.Test
{
ReferenceAssemblies = ReferenceAssemblies.Net.Net60,
LanguageVersion = LanguageVersion.Preview,
TestCode = $$"""
interface ITest
{
abstract void operator {{op}}(int y);
}
class C : {|CS0535:ITest|}
{
}
""" + CompilerFeatureRequiredAttribute,
interface ITest
{
abstract void operator {{op}}(int y);
}
class C : {|CS0535:ITest|}
{
}
""" + CompilerFeatureRequiredAttribute,
FixedCode = $$"""
interface ITest
{
abstract void operator {{op}}(int y);
}
class C : ITest
{
void ITest.operator {{op}}}(int y)
interface ITest
{
throw new System.NotImplementedException();
abstract void operator {{op}}(int y);
}
}
""" + CompilerFeatureRequiredAttribute,
class C : ITest
{
void ITest.operator {{op}}(int y)
{
throw new System.NotImplementedException();
}
}
""" + CompilerFeatureRequiredAttribute,
CodeActionVerifier = (codeAction, verifier) => verifier.Equal(CodeFixesResources.Implement_all_members_explicitly, codeAction.Title),
CodeActionEquivalenceKey = "True;False;False:global::ITest;Microsoft.CodeAnalysis.ImplementInterface.AbstractImplementInterfaceService+ImplementInterfaceCodeAction;",
CodeActionIndex = 0,
CodeActionIndex = 1,
}.RunAsync();
}

Expand Down
Loading
Loading