Skip to content

Commit b5c3ea8

Browse files
[automated] Merge branch 'main' => 'release/dev17.15' (#77812)
I detected changes in the main branch which have not been merged yet to release/dev17.15. I'm a robot and am configured to help you automatically keep release/dev17.15 up to date, so I've opened this PR. This PR merges commits made on main by the following committers: * CyrusNajmabadi ## Instructions for merging from UI This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, *not* a squash or rebase commit. <img alt="merge button instructions" src="https://i.imgur.com/GepcNJV.png" width="300" /> If this repo does not allow creating merge commits from the GitHub UI, use command line instructions. ## Instructions for merging via command line Run these commands to merge this pull request from the command line. ``` sh git fetch git checkout main git pull --ff-only git checkout release/dev17.15 git pull --ff-only git merge --no-ff main # If there are merge conflicts, resolve them and then run git merge --continue to complete the merge # Pushing the changes to the PR branch will re-trigger PR validation. git push https://github.com/dotnet/roslyn HEAD:merge/main-to-release/dev17.15 ``` <details> <summary>or if you are using SSH</summary> ``` git push [email protected]:dotnet/roslyn HEAD:merge/main-to-release/dev17.15 ``` </details> After PR checks are complete push the branch ``` git push ``` ## Instructions for resolving conflicts :warning: If there are merge conflicts, you will need to resolve them manually before merging. You can do this [using GitHub][resolve-github] or using the [command line][resolve-cli]. [resolve-github]: https://help.github.com/articles/resolving-a-merge-conflict-on-github/ [resolve-cli]: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ ## Instructions for updating this pull request Contributors to this repo have permission update this pull request by pushing to the branch 'merge/main-to-release/dev17.15'. This can be done to resolve conflicts or make other changes to this pull request before it is merged. The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote. ``` git fetch git checkout -b merge/main-to-release/dev17.15 origin/release/dev17.15 git pull https://github.com/dotnet/roslyn merge/main-to-release/dev17.15 (make changes) git commit -m "Updated PR with my changes" git push https://github.com/dotnet/roslyn HEAD:merge/main-to-release/dev17.15 ``` <details> <summary>or if you are using SSH</summary> ``` git fetch git checkout -b merge/main-to-release/dev17.15 origin/release/dev17.15 git pull [email protected]:dotnet/roslyn merge/main-to-release/dev17.15 (make changes) git commit -m "Updated PR with my changes" git push [email protected]:dotnet/roslyn HEAD:merge/main-to-release/dev17.15 ``` </details> Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues. Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.
2 parents 072f4b0 + 1ef60fe commit b5c3ea8

5 files changed

+134
-391
lines changed

src/EditorFeatures/CSharpTest/SignatureHelp/AbstractCSharpSignatureHelpProviderTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#nullable disable
6-
75
using System.Collections.Generic;
86
using Microsoft.CodeAnalysis.CSharp;
97
using Microsoft.CodeAnalysis.Editor.UnitTests.SignatureHelp;

src/EditorFeatures/CSharpTest/SignatureHelp/InitializerExpressionSignatureHelpProviderTests.cs

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
#nullable disable
6-
75
using System;
8-
using System.Collections.Generic;
96
using System.Threading.Tasks;
107
using Microsoft.CodeAnalysis.CSharp;
118
using Microsoft.CodeAnalysis.CSharp.SignatureHelp;
12-
using Microsoft.CodeAnalysis.Editor.UnitTests.SignatureHelp;
139
using Microsoft.CodeAnalysis.Test.Utilities;
1410
using Xunit;
1511

1612
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.SignatureHelp;
1713

1814
[Trait(Traits.Feature, Traits.Features.SignatureHelp)]
19-
public class InitializerExpressionSignatureHelpProviderTests : AbstractCSharpSignatureHelpProviderTests
15+
public sealed class InitializerExpressionSignatureHelpProviderTests : AbstractCSharpSignatureHelpProviderTests
2016
{
2117
internal override Type GetSignatureHelpProviderType()
2218
=> typeof(InitializerExpressionSignatureHelpProvider);
@@ -36,12 +32,7 @@ void Goo()
3632
}
3733
""";
3834

39-
var expectedOrderedItems = new List<SignatureHelpTestItem>
40-
{
41-
new SignatureHelpTestItem("void List<int>.Add(int item)", currentParameterIndex: 0)
42-
};
43-
44-
await TestAsync(markup, expectedOrderedItems);
35+
await TestAsync(markup, [new("void List<int>.Add(int item)", currentParameterIndex: 0)]);
4536
}
4637

4738
[Fact]
@@ -59,12 +50,7 @@ void Goo()
5950
}
6051
""";
6152

62-
var expectedOrderedItems = new List<SignatureHelpTestItem>
63-
{
64-
new SignatureHelpTestItem("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 0)
65-
};
66-
67-
await TestAsync(markup, expectedOrderedItems);
53+
await TestAsync(markup, [new("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 0)]);
6854
}
6955

7056
[Fact]
@@ -82,12 +68,7 @@ void Goo()
8268
}
8369
""";
8470

85-
var expectedOrderedItems = new List<SignatureHelpTestItem>
86-
{
87-
new SignatureHelpTestItem("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 1)
88-
};
89-
90-
await TestAsync(markup, expectedOrderedItems);
71+
await TestAsync(markup, [new("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 1)]);
9172
}
9273

9374
[Fact]
@@ -110,12 +91,7 @@ void Goo()
11091
}
11192
""";
11293

113-
var expectedOrderedItems = new List<SignatureHelpTestItem>
114-
{
115-
new SignatureHelpTestItem("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 0)
116-
};
117-
118-
await TestAsync(markup, expectedOrderedItems);
94+
await TestAsync(markup, [new("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 0)]);
11995
}
12096

12197
[Fact]
@@ -136,12 +112,7 @@ void Goo()
136112
new Bar { D = { { $$
137113
""";
138114

139-
var expectedOrderedItems = new List<SignatureHelpTestItem>
140-
{
141-
new SignatureHelpTestItem("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 0)
142-
};
143-
144-
await TestAsync(markup, expectedOrderedItems);
115+
await TestAsync(markup, [new("void Dictionary<int, string>.Add(int key, string value)", currentParameterIndex: 0)]);
145116
}
146117

147118
[Fact]
@@ -164,14 +135,10 @@ void Goo()
164135
new Bar { { $$
165136
""";
166137

167-
var expectedOrderedItems = new List<SignatureHelpTestItem>
168-
{
169-
new SignatureHelpTestItem("void Bar.Add(int i)", currentParameterIndex: 0),
170-
new SignatureHelpTestItem("void Bar.Add(int i, string s)", currentParameterIndex: 0, isSelected: true),
171-
new SignatureHelpTestItem("void Bar.Add(int i, string s, bool b)", currentParameterIndex: 0)
172-
};
173-
174-
await TestAsync(markup, expectedOrderedItems);
138+
await TestAsync(markup, [
139+
new("void Bar.Add(int i)", currentParameterIndex: 0),
140+
new("void Bar.Add(int i, string s)", currentParameterIndex: 0, isSelected: true),
141+
new("void Bar.Add(int i, string s, bool b)", currentParameterIndex: 0)]);
175142
}
176143

177144
[Fact]
@@ -194,9 +161,7 @@ void Goo()
194161
new Bar { { $$
195162
""";
196163

197-
var expectedOrderedItems = new List<SignatureHelpTestItem>();
198-
199-
await TestAsync(markup, expectedOrderedItems);
164+
await TestAsync(markup, expectedOrderedItemsOrNull: []);
200165
}
201166

202167
[Fact]
@@ -223,13 +188,9 @@ void Goo()
223188
new Bar { { $$
224189
""";
225190

226-
var expectedOrderedItems = new List<SignatureHelpTestItem>
227-
{
228-
new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) void Bar.Add(int i)", currentParameterIndex: 0),
229-
new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) void Bar.Add(int i, string s)", currentParameterIndex: 0, isSelected: true),
230-
new SignatureHelpTestItem($"({CSharpFeaturesResources.extension}) void Bar.Add(int i, string s, bool b)", currentParameterIndex: 0)
231-
};
232-
233-
await TestAsync(markup, expectedOrderedItems, sourceCodeKind: SourceCodeKind.Regular);
191+
await TestAsync(markup, [
192+
new($"({CSharpFeaturesResources.extension}) void Bar.Add(int i)", currentParameterIndex: 0),
193+
new($"({CSharpFeaturesResources.extension}) void Bar.Add(int i, string s)", currentParameterIndex: 0, isSelected: true),
194+
new($"({CSharpFeaturesResources.extension}) void Bar.Add(int i, string s, bool b)", currentParameterIndex: 0)], sourceCodeKind: SourceCodeKind.Regular);
234195
}
235196
}

0 commit comments

Comments
 (0)