-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Use the same codepath for computing light-bulb actions to determine if hte lightbulb shoudl appear at all. #59599
Changes from 15 commits
e26c158
965a6be
0b8bd0f
2af54ee
aa353fe
d7b9f03
6667775
a0a88ae
a5d0270
8b5c1ac
103f92e
783f777
7cce002
d78637b
290b067
96cd892
3ddb4ef
ea54284
52cd3a9
3c7c77d
7b23cee
b6d7523
a739368
1e14889
61092f3
3e3e3fc
8f4c7f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Collections.Immutable; | ||
using System.Linq; | ||
using Microsoft.CodeAnalysis.Editor.Implementation.Suggestions; | ||
using Microsoft.VisualStudio.Language.Intellisense; | ||
using Roslyn.Test.Utilities; | ||
using Xunit; | ||
|
||
namespace Microsoft.CodeAnalysis.Editor.UnitTests.SuggestedActions | ||
{ | ||
public class SuggestedActionSourceProviderTests | ||
{ | ||
[Fact] | ||
public void EnsureAttributesMatchData() | ||
{ | ||
// Ensure that the list of orderings on this type matches the set we expose in SuggestedActionsSourceProvider.Orderings | ||
var attributes = typeof(SuggestedActionsSourceProvider).GetCustomAttributes(inherit: false) | ||
.OfType<SuggestedActionPriorityAttribute>() | ||
.ToImmutableArray(); | ||
Assert.Equal(attributes.Length, SuggestedActionsSourceProvider.Orderings.Length); | ||
CyrusNajmabadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
AssertEx.SetEqual(attributes.Select(a => a.Priority), SuggestedActionsSourceProvider.Orderings); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "SetEqual" here means the orderings can be different -- is that expected here? I would have assumed "orderings" were intended to be ordered here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i have no idea if attributes are ordered when either emitting or reading back from metadata. So this is a setequals as we don't actually care if eitehr is true. All w care about is that the set we exported matches the items in the array in that field. |
||
} | ||
} | ||
} |
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.
should be viewed with whitespace off.