Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
2bed76f6
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,发现更多精彩内容 >>
提交
2bed76f6
编写于
2月 13, 2020
作者:
G
Gen Lu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add tests
上级
078ed21e
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
77 addition
and
76 deletion
+77
-76
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/AbstractCSharpCompletionProviderTests.cs
...pletionProviders/AbstractCSharpCompletionProviderTests.cs
+4
-4
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/CrefCompletionProviderTests.cs
...letion/CompletionProviders/CrefCompletionProviderTests.cs
+3
-3
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/LoadDirectiveCompletionProviderTests.cs
...mpletionProviders/LoadDirectiveCompletionProviderTests.cs
+2
-2
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ReferenceDirectiveCompletionProviderTests.cs
...ionProviders/ReferenceDirectiveCompletionProviderTests.cs
+2
-2
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/SymbolCompletionProviderTests_NoInteractive.cs
...nProviders/SymbolCompletionProviderTests_NoInteractive.cs
+2
-2
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/TypeImportCompletionProviderTests.cs
.../CompletionProviders/TypeImportCompletionProviderTests.cs
+10
-10
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/XmlDocumentationCommentCompletionProviderTests.cs
...oviders/XmlDocumentationCommentCompletionProviderTests.cs
+5
-5
src/EditorFeatures/TestUtilities/Completion/AbstractCompletionProviderTests.cs
...stUtilities/Completion/AbstractCompletionProviderTests.cs
+35
-34
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/AbstractVisualBasicCompletionProviderTests.vb
...onProviders/AbstractVisualBasicCompletionProviderTests.vb
+5
-5
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/ObjectInitializerCompletionProviderTests.vb
...tionProviders/ObjectInitializerCompletionProviderTests.vb
+2
-2
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/OverrideCompletionProviderTests.vb
...on/CompletionProviders/OverrideCompletionProviderTests.vb
+2
-2
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/SymbolCompletionProviderTests.vb
...tion/CompletionProviders/SymbolCompletionProviderTests.vb
+2
-2
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/XmlDocCommentCompletionProviderTests.vb
...mpletionProviders/XmlDocCommentCompletionProviderTests.vb
+3
-3
未找到文件。
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/AbstractCSharpCompletionProviderTests.cs
浏览文件 @
2bed76f6
...
...
@@ -37,13 +37,13 @@ protected override TestWorkspace CreateWorkspace(string fileContents)
string
expectedItemOrNull
,
string
expectedDescriptionOrNull
,
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
)
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
return
base
.
VerifyWorkerAsync
(
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
inlineDescription
,
matchingFilters
,
flags
);
}
private
protected
override
async
Task
VerifyWorkerAsync
(
...
...
@@ -52,7 +52,7 @@ protected override TestWorkspace CreateWorkspace(string fileContents)
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
)
List
<
CompletionFilter
>
matchingFilters
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
await
VerifyAtPositionAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
await
VerifyInFrontOfCommentAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
...
...
@@ -87,7 +87,7 @@ protected override string ItemPartiallyWritten(string expectedItemOrNull)
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
matchingFilters
,
flags
:
null
);
}
private
Task
VerifyInFrontOfCommentAsync
(
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/CrefCompletionProviderTests.cs
浏览文件 @
2bed76f6
...
...
@@ -35,17 +35,17 @@ internal override CompletionProvider CreateCompletionProvider()
string
expectedItemOrNull
,
string
expectedDescriptionOrNull
,
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
)
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
await
VerifyAtPositionAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
matchingFilters
,
flags
);
await
VerifyAtEndOfFileAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
matchingFilters
,
flags
);
// Items cannot be partially written if we're checking for their absence,
// or if we're verifying that the list will show up (without specifying an actual item)
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/LoadDirectiveCompletionProviderTests.cs
浏览文件 @
2bed76f6
...
...
@@ -35,13 +35,13 @@ protected override IEqualityComparer<string> GetStringComparer()
string
code
,
int
position
,
string
expectedItemOrNull
,
string
expectedDescriptionOrNull
,
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
)
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
return
BaseVerifyWorkerAsync
(
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
inlineDescription
,
matchingFilters
,
flags
);
}
[
Fact
]
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/ReferenceDirectiveCompletionProviderTests.cs
浏览文件 @
2bed76f6
...
...
@@ -40,13 +40,13 @@ protected override IEqualityComparer<string> GetStringComparer()
string
code
,
int
position
,
string
expectedItemOrNull
,
string
expectedDescriptionOrNull
,
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
)
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
return
BaseVerifyWorkerAsync
(
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
inlineDescription
,
matchingFilters
,
flags
);
}
[
Fact
]
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/SymbolCompletionProviderTests_NoInteractive.cs
浏览文件 @
2bed76f6
...
...
@@ -32,13 +32,13 @@ internal override CompletionProvider CreateCompletionProvider()
string
code
,
int
position
,
string
expectedItemOrNull
,
string
expectedDescriptionOrNull
,
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
,
List
<
CompletionFilter
>
matchingFilters
)
string
inlineDescription
,
List
<
CompletionFilter
>
matchingFilters
,
CompletionItemFlags
?
flags
=
null
)
{
return
base
.
VerifyWorkerAsync
(
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
SourceCodeKind
.
Regular
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
inlineDescription
,
matchingFilters
,
flags
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/TypeImportCompletionProviderTests.cs
浏览文件 @
2bed76f6
...
...
@@ -928,7 +928,7 @@ class Program { }
}"
;
var
markup
=
CreateMarkupForSingleProject
(
file2
,
file1
,
LanguageNames
.
CSharp
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"My"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyAttribute"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"My"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyAttribute"
,
flags
:
CompletionItemFlags
.
Expanded
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"MyAttributeWithoutSuffix"
,
inlineDescription
:
"Foo"
);
// We intentionally ignore attribute types without proper suffix for perf reason
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"MyAttribute"
,
inlineDescription
:
"Foo"
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"MyClass"
,
inlineDescription
:
"Foo"
);
...
...
@@ -988,10 +988,10 @@ class Program
}"
;
var
markup
=
CreateMarkupForSingleProject
(
file2
,
file1
,
LanguageNames
.
CSharp
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyAttribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyAttribute"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyAttributeWithoutSuffix"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyAttributeWithoutSuffix"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyAttribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyAttribute"
,
flags
:
CompletionItemFlags
.
CachedAndExpanded
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyAttributeWithoutSuffix"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyAttributeWithoutSuffix"
,
flags
:
CompletionItemFlags
.
CachedAndExpanded
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"My"
,
inlineDescription
:
"Foo"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyClass"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyClass"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyClass"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyClass"
,
flags
:
CompletionItemFlags
.
CachedAndExpanded
);
}
[
InlineData
(
SourceCodeKind
.
Regular
)]
...
...
@@ -1049,7 +1049,7 @@ class Program { }
}"
;
var
markup
=
CreateMarkupForSingleProject
(
file2
,
file1
,
LanguageNames
.
CSharp
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"Myattribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.Myattribute"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"Myattribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.Myattribute"
,
flags
:
CompletionItemFlags
.
CachedAndExpanded
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"My"
,
inlineDescription
:
"Foo"
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"MyClass"
,
inlineDescription
:
"Foo"
);
}
...
...
@@ -1109,9 +1109,9 @@ class Program
}"
;
var
markup
=
CreateMarkupForSingleProject
(
file2
,
file1
,
LanguageNames
.
CSharp
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"Myattribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.Myattribute"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"Myattribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.Myattribute"
,
flags
:
CompletionItemFlags
.
Expanded
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"My"
,
inlineDescription
:
"Foo"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyClass"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyClass"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"MyClass"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.MyClass"
,
flags
:
CompletionItemFlags
.
CachedAndExpanded
);
}
[
InlineData
(
SourceCodeKind
.
Regular
)]
...
...
@@ -1174,7 +1174,7 @@ class Program
var
markup
=
CreateMarkupForProjecWithProjectReference
(
file2
,
file1
,
LanguageNames
.
CSharp
,
LanguageNames
.
VisualBasic
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"Myattribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.Myattribute"
);
await
VerifyTypeImportItemExistsAsync
(
markup
,
"Myattribute"
,
glyph
:
(
int
)
Glyph
.
ClassPublic
,
inlineDescription
:
"Foo"
,
expectedDescriptionOrNull
:
"class Foo.Myattribute"
,
flags
:
CompletionItemFlags
.
Expanded
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"My"
,
inlineDescription
:
"Foo"
);
await
VerifyTypeImportItemIsAbsentAsync
(
markup
,
"MyVBClass"
,
inlineDescription
:
"Foo"
);
}
...
...
@@ -1307,9 +1307,9 @@ private static void AssertRelativeOrder(List<string> expectedTypesInRelativeOrde
}
}
private
Task
VerifyTypeImportItemExistsAsync
(
string
markup
,
string
expectedItem
,
int
glyph
,
string
inlineDescription
,
string
displayTextSuffix
=
null
,
string
expectedDescriptionOrNull
=
null
)
private
Task
VerifyTypeImportItemExistsAsync
(
string
markup
,
string
expectedItem
,
int
glyph
,
string
inlineDescription
,
string
displayTextSuffix
=
null
,
string
expectedDescriptionOrNull
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
return
VerifyItemExistsAsync
(
markup
,
expectedItem
,
displayTextSuffix
:
displayTextSuffix
,
glyph
:
glyph
,
inlineDescription
:
inlineDescription
,
expectedDescriptionOrNull
:
expectedDescriptionOrNull
);
return
VerifyItemExistsAsync
(
markup
,
expectedItem
,
displayTextSuffix
:
displayTextSuffix
,
glyph
:
glyph
,
inlineDescription
:
inlineDescription
,
expectedDescriptionOrNull
:
expectedDescriptionOrNull
,
flags
:
flags
);
}
...
...
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/XmlDocumentationCommentCompletionProviderTests.cs
浏览文件 @
2bed76f6
...
...
@@ -45,18 +45,18 @@ private async Task VerifyItemsAbsentAsync(string markup, params string[] items)
string
code
,
int
position
,
string
expectedItemOrNull
,
string
expectedDescriptionOrNull
,
SourceCodeKind
sourceCodeKind
,
bool
usePreviousCharAsTrigger
,
bool
checkForAbsence
,
int
?
glyph
,
int
?
matchPriority
,
bool
?
hasSuggestionItem
,
string
displayTextSuffix
,
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
)
string
inlineDescription
=
null
,
List
<
CompletionFilter
>
matchingFilters
=
null
,
CompletionItemFlags
?
flags
=
null
)
{
// We don't need to try writing comments in from of items in doc comments.
await
VerifyAtPositionAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
matchingFilters
,
flags
);
await
VerifyAtEndOfFileAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
matchingFilters
,
flags
);
// Items cannot be partially written if we're checking for their absence,
// or if we're verifying that the list will show up (without specifying an actual item)
...
...
@@ -65,12 +65,12 @@ private async Task VerifyItemsAbsentAsync(string markup, params string[] items)
await
VerifyAtPosition_ItemPartiallyWrittenAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
inlineDescription
,
matchingFilters
,
flags
);
await
VerifyAtEndOfFile_ItemPartiallyWrittenAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
);
inlineDescription
,
matchingFilters
,
flags
);
}
}
...
...
src/EditorFeatures/TestUtilities/Completion/AbstractCompletionProviderTests.cs
浏览文件 @
2bed76f6
此差异已折叠。
点击以展开。
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/AbstractVisualBasicCompletionProviderTests.vb
浏览文件 @
2bed76f6
...
...
@@ -34,12 +34,12 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion.Complet
sourceCodeKind
As
SourceCodeKind
,
usePreviousCharAsTrigger
As
Boolean
,
checkForAbsence
As
Boolean
,
glyph
As
Integer
?
,
matchPriority
As
Integer
?
,
hasSuggestionItem
As
Boolean
?
,
displayTextSuffix
As
String
,
inlineDescription
As
String
,
matchingFilters
As
List
(
Of
CompletionFilter
))
As
Task
matchingFilters
As
List
(
Of
CompletionFilter
)
,
flags
As
CompletionItemFlags
?
)
As
Task
Return
MyBase
.
VerifyWorkerAsync
(
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
)
matchingFilters
,
flags
)
End
Function
Private
Protected
Overrides
Async
Function
VerifyWorkerAsync
(
...
...
@@ -48,7 +48,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion.Complet
sourceCodeKind
As
SourceCodeKind
,
usePreviousCharAsTrigger
As
Boolean
,
checkForAbsence
As
Boolean
,
glyph
As
Integer
?
,
matchPriority
As
Integer
?
,
hasSuggestionItem
As
Boolean
?
,
displayTextSuffix
As
String
,
inlineDescription
As
String
,
matchingFilters
As
List
(
Of
CompletionFilter
))
As
Task
matchingFilters
As
List
(
Of
CompletionFilter
)
,
flags
As
CompletionItemFlags
?
)
As
Task
' Script/interactive support removed for now.
' TODO: Re-enable these when interactive is back in the product.
If
sourceCodeKind
<>
Microsoft
.
CodeAnalysis
.
SourceCodeKind
.
Regular
Then
...
...
@@ -58,12 +58,12 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion.Complet
Await
VerifyAtPositionAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
)
matchingFilters
,
flags
)
Await
VerifyAtEndOfFileAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
)
matchingFilters
,
flags
)
' Items cannot be partially written if we're checking for their absence,
' or if we're verifying that the list will show up (without specifying an actual item)
...
...
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/ObjectInitializerCompletionProviderTests.vb
浏览文件 @
2bed76f6
...
...
@@ -22,7 +22,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion.Complet
sourceCodeKind
As
SourceCodeKind
,
usePreviousCharAsTrigger
As
Boolean
,
checkForAbsence
As
Boolean
,
glyph
As
Integer
?
,
matchPriority
As
Integer
?
,
hasSuggestionItem
As
Boolean
?
,
displayTextSuffix
As
String
,
inlineDescription
As
String
,
matchingFilters
As
List
(
Of
CompletionFilter
))
As
Task
matchingFilters
As
List
(
Of
CompletionFilter
)
,
flags
As
CompletionItemFlags
?
)
As
Task
' Script/interactive support removed for now.
' TODO: Re-enable these when interactive is back in the product.
If
sourceCodeKind
<>
SourceCodeKind
.
Regular
Then
...
...
@@ -33,7 +33,7 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Completion.Complet
code
,
position
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
usePreviousCharAsTrigger
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
)
matchingFilters
,
flags
)
End
Function
<
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)
>
...
...
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/OverrideCompletionProviderTests.vb
浏览文件 @
2bed76f6
...
...
@@ -568,7 +568,7 @@ End Class</a>.Value
Dim
position
As
Integer
MarkupTestFile
.
GetPosition
(
markup
.
NormalizeLineEndings
(),
code
,
position
)
Await
BaseVerifyWorkerAsync
(
code
,
position
,
"[Class]()"
,
"Sub CBase.Class()"
,
SourceCodeKind
.
Regular
,
False
,
False
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
)
Await
BaseVerifyWorkerAsync
(
code
,
position
,
"[Class]()"
,
"Sub CBase.Class()"
,
SourceCodeKind
.
Regular
,
False
,
False
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)
>
...
...
@@ -589,7 +589,7 @@ End Class</a>.Value
Await
BaseVerifyWorkerAsync
(
code
,
position
,
"[Class]"
,
"Property CBase.Class As Integer"
,
SourceCodeKind
.
Regular
,
False
,
False
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
)
SourceCodeKind
.
Regular
,
False
,
False
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
,
Nothing
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)
>
...
...
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/SymbolCompletionProviderTests.vb
浏览文件 @
2bed76f6
...
...
@@ -7818,10 +7818,10 @@ End Namespace
Dim position = workspace.DocumentWithCursor.CursorPosition.Value
Await CheckResultsAsync(document, position, "
InstanceMethod
", expectedDescriptionOrNull:=Nothing, usePreviousCharAsTrigger:=False, checkForAbsence:=False,
glyph:=Nothing, matchPriority:=Nothing, hasSuggestionModeItem:=Nothing, displayTextSuffix:=Nothing, inlineDescription:=Nothing,
matchingFilters:=Nothing)
matchingFilters:=Nothing
, flags:=Nothing
)
Await CheckResultsAsync(document, position, "
SharedMethod
", expectedDescriptionOrNull:=Nothing, usePreviousCharAsTrigger:=False, checkForAbsence:=False,
glyph:=Nothing, matchPriority:=Nothing, hasSuggestionModeItem:=Nothing, displayTextSuffix:=Nothing, inlineDescription:=Nothing,
matchingFilters:=Nothing)
matchingFilters:=Nothing
, flags:=Nothing
)
End Using
End Function
...
...
src/EditorFeatures/VisualBasicTest/Completion/CompletionProviders/XmlDocCommentCompletionProviderTests.vb
浏览文件 @
2bed76f6
...
...
@@ -27,9 +27,9 @@ Namespace Tests
sourceCodeKind
As
SourceCodeKind
,
usePreviousCharAsTrigger
As
Boolean
,
checkForAbsence
As
Boolean
,
glyph
As
Integer
?
,
matchPriority
As
Integer
?
,
hasSuggestionItem
As
Boolean
?
,
displayTextSuffix
As
String
,
inlineDescription
As
String
,
matchingFilters
As
List
(
Of
CompletionFilter
))
As
Task
Await
VerifyAtPositionAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
)
Await
VerifyAtEndOfFileAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
)
matchingFilters
As
List
(
Of
CompletionFilter
)
,
flags
As
CompletionItemFlags
?
)
As
Task
Await
VerifyAtPositionAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
,
flags
)
Await
VerifyAtEndOfFileAsync
(
code
,
position
,
usePreviousCharAsTrigger
,
expectedItemOrNull
,
expectedDescriptionOrNull
,
sourceCodeKind
,
checkForAbsence
,
glyph
,
matchPriority
,
hasSuggestionItem
,
displayTextSuffix
,
inlineDescription
,
matchingFilters
,
flags
)
End
Function
Private
Async
Function
VerifyItemsExistAsync
(
markup
As
String
,
ParamArray
items
()
As
String
)
As
Task
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录