Skip to content

Commit

Permalink
Naming consistency, fix test newline normalization.
Browse files Browse the repository at this point in the history
  • Loading branch information
333fred committed Oct 18, 2020
1 parent f8d603e commit c921afd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -115,7 +115,7 @@ internal static class CompletionHelpers
bool wasUnimported;
if (useAsyncCompletion && !s_forceEagerResolveProviders.Contains(providerName))
{
(finalCompletion, wasUnimported) = BuildCompletionListForAsync(
(finalCompletion, wasUnimported) = BuildCompletionForAsync(
completions,
completion,
i,
Expand Down Expand Up @@ -156,7 +156,7 @@ internal static class CompletionHelpers
return (finalCompletionList, sawUnimportedItems);
}

private static (CompletionItem, bool SawUnimportedItems) BuildCompletionListForAsync(
private static (CompletionItem, bool SawUnimportedItems) BuildCompletionForAsync(
CSharpCompletionList completions,
CSharpCompletionItem completion,
int index,
Expand All @@ -165,7 +165,7 @@ internal static class CompletionHelpers
ImmutableArray<string> filteredItems,
bool expectingImportedItems)
{
var (seenUnimportedCompletions, sortTextPrepend) = completion.GetProviderName() switch
var (sawUnimportedCompletions, sortTextPrepend) = completion.GetProviderName() switch
{
CompletionItemExtensions.ExtensionMethodImportCompletionProvider => (true, "1"),
CompletionItemExtensions.TypeImportCompletionProvider => (true, "1"),
Expand Down Expand Up @@ -198,7 +198,7 @@ internal static class CompletionHelpers
Data = index,
Preselect = completion.Rules.MatchPriority == MatchPriority.Preselect || filteredItems.Contains(completion.DisplayText),
CommitCharacters = commitCharacters,
}, seenUnimportedCompletions);
}, sawUnimportedCompletions);
}

private static async ValueTask<(CompletionItem, bool WasUnimported)> BuildCompletionForSync(
Expand Down
2 changes: 1 addition & 1 deletion tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs
Expand Up @@ -1390,7 +1390,7 @@ public partial class C
Assert.Equal("M", item.TextEdit.NewText);

var afterInsert = await AfterInsertResponse(item, "derived.cs", file2, SharedOmniSharpTestHost);
Assert.Equal("using System;\n\npublic partial class C\r\n{\r\n partial void M(Action a)\n {\n throw new NotImplementedException();\n }", afterInsert.Change.NewText);
Assert.Equal(NormalizeNewlines("using System;\n\npublic partial class C\r\n{\r\n partial void M(Action a)\n {\n throw new NotImplementedException();\n }"), afterInsert.Change.NewText);
Assert.Equal(1, afterInsert.Change.StartLine);
Assert.Equal(0, afterInsert.Change.StartColumn);
Assert.Equal(3, afterInsert.Change.EndLine);
Expand Down

0 comments on commit c921afd

Please sign in to comment.