Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
731f4b76
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
731f4b76
编写于
6月 09, 2020
作者:
S
Sam Harwell
提交者:
GitHub
6月 09, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #44640 from sharwell/completion-tests
Update completion tests for top-level statements
上级
e7305ab4
597c5fdf
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
51 addition
and
14 deletion
+51
-14
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExternAliasCompletionProviderTests.cs
...CompletionProviders/ExternAliasCompletionProviderTests.cs
+1
-1
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/SymbolCompletionProviderTests.cs
...tion/CompletionProviders/SymbolCompletionProviderTests.cs
+3
-2
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/SymbolCompletionProviderTests_NoInteractive.cs
...nProviders/SymbolCompletionProviderTests_NoInteractive.cs
+6
-6
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/XmlDocumentationCommentCompletionProviderTests.cs
...oviders/XmlDocumentationCommentCompletionProviderTests.cs
+33
-4
src/Features/CSharp/Portable/Completion/CompletionProviders/ExternAliasCompletionProvider.cs
...tion/CompletionProviders/ExternAliasCompletionProvider.cs
+8
-1
未找到文件。
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ExternAliasCompletionProviderTests.cs
浏览文件 @
731f4b76
...
@@ -31,7 +31,7 @@ class C
...
@@ -31,7 +31,7 @@ class C
}"
);
}"
);
}
}
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/44423"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
public
async
Task
ExternAlias
()
public
async
Task
ExternAlias
()
{
{
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/SymbolCompletionProviderTests.cs
浏览文件 @
731f4b76
...
@@ -7461,7 +7461,7 @@ class N
...
@@ -7461,7 +7461,7 @@ class N
}
}
[
WorkItem
(
635957
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/635957"
)]
[
WorkItem
(
635957
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/635957"
)]
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/44423"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
public
async
Task
TildeOutsideClass
()
public
async
Task
TildeOutsideClass
()
{
{
...
@@ -7473,7 +7473,8 @@ class N
...
@@ -7473,7 +7473,8 @@ class N
}
}
}
}
~$$"
;
~$$"
;
await
VerifyNoItemsExistAsync
(
markup
,
SourceCodeKind
.
Regular
);
await
VerifyItemExistsAsync
(
markup
,
"C"
);
await
VerifyItemIsAbsentAsync
(
markup
,
"N"
);
}
}
[
WorkItem
(
635957
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/635957"
)]
[
WorkItem
(
635957
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/635957"
)]
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/SymbolCompletionProviderTests_NoInteractive.cs
浏览文件 @
731f4b76
...
@@ -64,16 +64,16 @@ public async Task SendEnterThroughToEditorTest()
...
@@ -64,16 +64,16 @@ public async Task SendEnterThroughToEditorTest()
await
VerifySendEnterThroughToEnterAsync
(
"class C { void M() { System.Console.$$"
,
"Beep"
,
sendThroughEnterOption
:
EnterKeyRule
.
Always
,
expected
:
true
);
await
VerifySendEnterThroughToEnterAsync
(
"class C { void M() { System.Console.$$"
,
"Beep"
,
sendThroughEnterOption
:
EnterKeyRule
.
Always
,
expected
:
true
);
}
}
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/44423"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
public
async
Task
InvalidLocation
1
()
public
async
Task
GlobalStatement
1
()
=>
await
VerifyItem
IsAbsent
Async
(
@"System.Console.$$"
,
@"Beep"
);
=>
await
VerifyItem
Exists
Async
(
@"System.Console.$$"
,
@"Beep"
);
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/44423"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
public
async
Task
InvalidLocation
2
()
public
async
Task
GlobalStatement
2
()
{
{
await
VerifyItem
IsAbsent
Async
(
@"using System;
await
VerifyItem
Exists
Async
(
@"using System;
Console.$$"
,
@"Beep"
);
Console.$$"
,
@"Beep"
);
}
}
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/XmlDocumentationCommentCompletionProviderTests.cs
浏览文件 @
731f4b76
...
@@ -460,8 +460,24 @@ public class goo
...
@@ -460,8 +460,24 @@ public class goo
[
WorkItem
(
775091
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/775091"
)]
[
WorkItem
(
775091
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/775091"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/44423"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
public
async
Task
ParamRefNames
()
public
async
Task
ParamRefNames
()
{
// Local functions do not support documentation comments
await
VerifyItemIsAbsentAsync
(
@"
/// <summary>
/// <paramref name=""$$""/>
/// </summary>
static void Main(string[] args)
{
}
"
,
"args"
,
sourceCodeKind
:
SourceCodeKind
.
Regular
);
}
[
WorkItem
(
775091
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/775091"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
public
async
Task
ParamRefNames_Interactive
()
{
{
await
VerifyItemExistsAsync
(
@"
await
VerifyItemExistsAsync
(
@"
/// <summary>
/// <summary>
...
@@ -470,19 +486,32 @@ public async Task ParamRefNames()
...
@@ -470,19 +486,32 @@ public async Task ParamRefNames()
static void Main(string[] args)
static void Main(string[] args)
{
{
}
}
"
,
"args"
);
"
,
"args"
,
sourceCodeKind
:
SourceCodeKind
.
Script
);
}
}
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/44423"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
public
async
Task
ParamNamesInEmptyAttribute
()
public
async
Task
ParamNamesInEmptyAttribute
()
{
// Local functions do not support documentation comments
await
VerifyItemIsAbsentAsync
(
@"
/// <param name=""$$""/>
static void Goo(string str)
{
}
"
,
"str"
,
sourceCodeKind
:
SourceCodeKind
.
Regular
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
44423
,
"https://github.com/dotnet/roslyn/issues/44423"
)]
public
async
Task
ParamNamesInEmptyAttribute_Interactive
()
{
{
await
VerifyItemExistsAsync
(
@"
await
VerifyItemExistsAsync
(
@"
/// <param name=""$$""/>
/// <param name=""$$""/>
static void Goo(string str)
static void Goo(string str)
{
{
}
}
"
,
"str"
);
"
,
"str"
,
sourceCodeKind
:
SourceCodeKind
.
Script
);
}
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
...
...
src/Features/CSharp/Portable/Completion/CompletionProviders/ExternAliasCompletionProvider.cs
浏览文件 @
731f4b76
...
@@ -54,7 +54,14 @@ public override async Task ProvideCompletionsAsync(CompletionContext context)
...
@@ -54,7 +54,14 @@ public override async Task ProvideCompletionsAsync(CompletionContext context)
.
FindTokenOnLeftOfPosition
(
position
,
cancellationToken
)
.
FindTokenOnLeftOfPosition
(
position
,
cancellationToken
)
.
GetPreviousTokenIfTouchingWord
(
position
);
.
GetPreviousTokenIfTouchingWord
(
position
);
if
(
targetToken
.
IsKind
(
SyntaxKind
.
AliasKeyword
)
&&
targetToken
.
Parent
.
IsKind
(
SyntaxKind
.
ExternAliasDirective
))
if
(!
targetToken
.
IsKind
(
SyntaxKind
.
AliasKeyword
)
&&
!(
targetToken
.
IsKind
(
SyntaxKind
.
IdentifierToken
)
&&
targetToken
.
HasMatchingText
(
SyntaxKind
.
AliasKeyword
)))
{
return
;
}
if
(
targetToken
.
Parent
.
IsKind
(
SyntaxKind
.
ExternAliasDirective
)
||
(
targetToken
.
Parent
.
IsKind
(
SyntaxKind
.
IdentifierName
)
&&
targetToken
.
Parent
.
IsParentKind
(
SyntaxKind
.
IncompleteMember
)))
{
{
var
compilation
=
await
document
.
Project
.
GetCompilationAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
var
compilation
=
await
document
.
Project
.
GetCompilationAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
var
aliases
=
compilation
.
ExternalReferences
.
SelectMany
(
r
=>
r
.
Properties
.
Aliases
).
ToSet
();
var
aliases
=
compilation
.
ExternalReferences
.
SelectMany
(
r
=>
r
.
Properties
.
Aliases
).
ToSet
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录