Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
2706dc0d
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,发现更多精彩内容 >>
提交
2706dc0d
编写于
2月 28, 2017
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make methods synchronous
上级
d1a0ebbc
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
399 addition
and
399 deletion
+399
-399
src/EditorFeatures/CSharpTest/SplitStringLiteral/SplitStringLiteralCommandHandlerTests.cs
...litStringLiteral/SplitStringLiteralCommandHandlerTests.cs
+31
-31
src/EditorFeatures/CSharpTest/TextStructureNavigation/TextStructureNavigatorTests.cs
...st/TextStructureNavigation/TextStructureNavigatorTests.cs
+16
-16
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticLineEnderTests.vb
...lBasicTest/AutomaticCompletion/AutomaticLineEnderTests.vb
+18
-18
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticParenthesesCompletion.vb
...est/AutomaticCompletion/AutomaticParenthesesCompletion.vb
+10
-10
src/EditorFeatures/VisualBasicTest/AutomaticEndConstructCorrection/AutomaticEndConstructCorrectorTests.vb
...onstructCorrection/AutomaticEndConstructCorrectorTests.vb
+66
-66
src/EditorFeatures/VisualBasicTest/DocumentationComments/DocumentationCommentTests.vb
...icTest/DocumentationComments/DocumentationCommentTests.vb
+70
-70
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/IfBlockTests.vb
...es/VisualBasicTest/EndConstructGeneration/IfBlockTests.vb
+22
-22
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/MultiLineLambdaTests.vb
...lBasicTest/EndConstructGeneration/MultiLineLambdaTests.vb
+34
-34
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/PropertyBlockTests.vb
...ualBasicTest/EndConstructGeneration/PropertyBlockTests.vb
+32
-32
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/XmlLiteralTests.vb
...VisualBasicTest/EndConstructGeneration/XmlLiteralTests.vb
+38
-38
src/EditorFeatures/VisualBasicTest/Formatting/Indentation/SmartIndenterTests.vb
...ualBasicTest/Formatting/Indentation/SmartIndenterTests.vb
+62
-62
未找到文件。
src/EditorFeatures/CSharpTest/SplitStringLiteral/SplitStringLiteralCommandHandlerTests.cs
浏览文件 @
2706dc0d
...
...
@@ -63,7 +63,7 @@ private void TestNotHandled(string inputMarkup)
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingBeforeString
()
public
void
TestMissingBeforeString
()
{
TestNotHandled
(
@"class C
...
...
@@ -76,7 +76,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingBeforeInterpolatedString
()
public
void
TestMissingBeforeInterpolatedString
()
{
TestNotHandled
(
@"class C
...
...
@@ -89,9 +89,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterString_1
()
public
void
TestMissingAfterString_1
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -102,9 +102,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterString_2
()
public
void
TestMissingAfterString_2
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -115,9 +115,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterString_3
()
public
void
TestMissingAfterString_3
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -128,9 +128,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterString_4
()
public
void
TestMissingAfterString_4
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -141,9 +141,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterInterpolatedString_1
()
public
void
TestMissingAfterInterpolatedString_1
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -154,9 +154,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterInterpolatedString_2
()
public
void
TestMissingAfterInterpolatedString_2
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -167,9 +167,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterInterpolatedString_3
()
public
void
TestMissingAfterInterpolatedString_3
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -180,9 +180,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingAfterInterpolatedString_4
()
public
void
TestMissingAfterInterpolatedString_4
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -193,9 +193,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingInVerbatimString
()
public
void
TestMissingInVerbatimString
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -206,9 +206,9 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingInInterpolatedVerbatimString
()
public
void
TestMissingInInterpolatedVerbatimString
()
{
await
TestNotHandledAsync
(
TestNotHandled
(
@"class C
{
void M()
...
...
@@ -219,7 +219,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestInEmptyString
()
public
void
TestInEmptyString
()
{
TestHandled
(
@"class C
...
...
@@ -240,7 +240,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestInEmptyInterpolatedString
()
public
void
TestInEmptyInterpolatedString
()
{
TestHandled
(
@"class C
...
...
@@ -261,7 +261,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestSimpleString1
()
public
void
TestSimpleString1
()
{
TestHandled
(
@"class C
...
...
@@ -282,7 +282,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestInterpolatedString1
()
public
void
TestInterpolatedString1
()
{
TestHandled
(
@"class C
...
...
@@ -303,7 +303,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestInterpolatedString2
()
public
void
TestInterpolatedString2
()
{
TestHandled
(
@"class C
...
...
@@ -324,7 +324,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestInterpolatedString3
()
public
void
TestInterpolatedString3
()
{
TestHandled
(
@"class C
...
...
@@ -345,7 +345,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingInInterpolation1
()
public
void
TestMissingInInterpolation1
()
{
TestNotHandled
(
@"class C
...
...
@@ -358,7 +358,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestMissingInInterpolation2
()
public
void
TestMissingInInterpolation2
()
{
TestNotHandled
(
@"class C
...
...
@@ -371,7 +371,7 @@ void M()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SplitStringLiteral
)]
public
async
Task
TestSelection
()
public
void
TestSelection
()
{
TestNotHandled
(
@"class C
...
...
src/EditorFeatures/CSharpTest/TextStructureNavigation/TextStructureNavigatorTests.cs
浏览文件 @
2706dc0d
...
...
@@ -18,7 +18,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.TextStructureNavigation
public
class
TextStructureNavigatorTests
{
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
Empty
()
public
void
Empty
()
{
AssertExtent
(
string
.
Empty
,
...
...
@@ -28,7 +28,7 @@ public async Task Empty()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
Whitespace
()
public
void
Whitespace
()
{
AssertExtent
(
" "
,
...
...
@@ -50,7 +50,7 @@ public async Task Whitespace()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
EndOfFile
()
public
void
EndOfFile
()
{
AssertExtent
(
"using System;"
,
...
...
@@ -60,7 +60,7 @@ public async Task EndOfFile()
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
NewLine
()
public
void
NewLine
()
{
AssertExtent
(
"class Class1 {\r\n\r\n}"
,
...
...
@@ -88,7 +88,7 @@ public async Task NewLine()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
SingleLineComment
()
public
void
SingleLineComment
()
{
AssertExtent
(
"// Comment "
,
...
...
@@ -118,7 +118,7 @@ public async Task SingleLineComment()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
MultiLineComment
()
public
void
MultiLineComment
()
{
AssertExtent
(
"/* Comment */"
,
...
...
@@ -168,7 +168,7 @@ public async Task MultiLineComment()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
Keyword
()
public
void
Keyword
()
{
for
(
int
i
=
7
;
i
<=
7
+
4
;
i
++)
{
...
...
@@ -181,7 +181,7 @@ public async Task Keyword()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
Identifier
()
public
void
Identifier
()
{
for
(
int
i
=
13
;
i
<=
13
+
8
;
i
++)
{
...
...
@@ -194,7 +194,7 @@ public async Task Identifier()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
EscapedIdentifier
()
public
void
EscapedIdentifier
()
{
for
(
int
i
=
12
;
i
<=
12
+
9
;
i
++)
{
...
...
@@ -207,7 +207,7 @@ public async Task EscapedIdentifier()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
Number
()
public
void
Number
()
{
for
(
int
i
=
37
;
i
<=
37
+
10
;
i
++)
{
...
...
@@ -220,7 +220,7 @@ public async Task Number()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
String
()
public
void
String
()
{
const
string
TestString
=
"class Test { private string s1 = \" () test \"; }"
;
int
startOfString
=
TestString
.
IndexOf
(
'"'
);
...
...
@@ -265,7 +265,7 @@ public async Task String()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
InterpolatedString1
()
public
void
InterpolatedString1
()
{
const
string
TestString
=
"class Test { string x = \"hello\"; string s = $\" { x } hello\"; }"
;
...
...
@@ -411,7 +411,7 @@ private static void AssertExtent(string code, int pos, bool isSignificant, int s
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
GetSpanOfEnclosingTest
()
public
void
GetSpanOfEnclosingTest
()
{
// First operation returns span of 'Class1'
TestNavigator
(
...
...
@@ -427,7 +427,7 @@ public async Task GetSpanOfEnclosingTest()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
GetSpanOfFirstChildTest
()
public
void
GetSpanOfFirstChildTest
()
{
// Go from 'class Class1 { }' to 'class'
TestNavigator
(
...
...
@@ -443,7 +443,7 @@ public async Task GetSpanOfFirstChildTest()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
GetSpanOfNextSiblingTest
()
public
void
GetSpanOfNextSiblingTest
()
{
// Go from 'class' to 'Class1'
TestNavigator
(
...
...
@@ -453,7 +453,7 @@ public async Task GetSpanOfNextSiblingTest()
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TextStructureNavigator
)]
public
async
Task
GetSpanOfPreviousSiblingTest
()
public
void
GetSpanOfPreviousSiblingTest
()
{
// Go from '{' to 'Class1'
TestNavigator
(
...
...
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticLineEnderTests.vb
浏览文件 @
2706dc0d
...
...
@@ -69,7 +69,7 @@ End Class</code>)
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestDim1
()
As
Task
Public
Sub
TestDim1
()
Test
(
<
code
>
Class
C
Sub
Method
()
Dim
i
=
...
...
@@ -80,10 +80,10 @@ End Class</code>, <code>Class C
Dim
i
=
$$
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestDim2
()
As
Task
Public
Sub
TestDim2
()
Test
(
<
code
>
Class
C
Sub
Method
()
Dim
i
...
...
@@ -94,11 +94,11 @@ End Class</code>, <code>Class C
Dim
i
$$
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WorkItem
(
712977
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/712977"
)
>
<
WpfFact
(),
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestDim3
()
As
Task
Public
Sub
TestDim3
()
Test
(
<
code
>
Class
C
Sub
Method
()
Dim
_
...
...
@@ -111,11 +111,11 @@ End Class</code>, <code>Class C
$$
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WorkItem
(
530591
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530591"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestDim_After_MalformedStatement
()
As
Task
Public
Sub
TestDim_After_MalformedStatement
()
Test
(
<
code
>
Class
C
Sub
Method
()
Dim
_
' test
...
...
@@ -128,10 +128,10 @@ End Class</code>, <code>Class C
$$
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestIf
()
As
Task
Public
Sub
TestIf
()
Test
(
<
code
>
Class
C
...
...
@@ -149,11 +149,11 @@ Class C
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WorkItem
(
530591
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530591"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestIf_Trivia
()
As
Task
Public
Sub
TestIf_Trivia
()
Test
(
<
code
>
Class
C
...
...
@@ -171,11 +171,11 @@ Class C
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WorkItem
(
530591
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530591"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestIf_Trivia2
()
As
Task
Public
Sub
TestIf_Trivia2
()
Test
(
<
code
>
Class
C
...
...
@@ -193,11 +193,11 @@ Class C
End
Sub
End
Class
</
code
>
)
End
Function
End
Sub
<
WorkItem
(
577920
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/577920"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestEndOfFile_SkippedToken
()
As
Task
Public
Sub
TestEndOfFile_SkippedToken
()
Test
(
<
code
>
Module
M
...
...
@@ -214,10 +214,10 @@ Module M
End Module
"
$$
</
code
>
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticCompletion
)
>
Public
Async
Function
TestWithLineContinuation
()
As
Task
Public
Sub
TestWithLineContinuation
()
Test
(
<
code
>
Module
M
...
...
@@ -234,7 +234,7 @@ Module M
End
Sub
End
Module
</
code
>
)
End
Function
End
Sub
Private
Overloads
Sub
Test
(
expected
As
XElement
,
code
As
XElement
)
Test
(
expected
.
NormalizedValue
(),
code
.
NormalizedValue
())
...
...
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticParenthesesCompletion.vb
浏览文件 @
2706dc0d
...
...
@@ -216,7 +216,7 @@ End Class</code>
End Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
Public
Async Function TestBinaryConditionalExpressionSyntax() As Task
Public
Sub TestBinaryConditionalExpressionSyntax()
Dim code = <code>Class C
Sub Method()
Dim a = If$$
...
...
@@ -227,10 +227,10 @@ End Class</code>
Assert.NotNull(session)
CheckStart(session.Session)
End Using
End
Function
End
Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
Public
Async Function TestArgumentListSyntax() As Task
Public
Sub TestArgumentListSyntax()
Dim code = <code>Class C
Sub Method()
Method$$
...
...
@@ -241,10 +241,10 @@ End Class</code>
Assert.NotNull(session)
CheckStart(session.Session)
End Using
End
Function
End
Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
Public
Async Function TestFunctionAggregationSyntax() As Task
Public
Sub TestFunctionAggregationSyntax()
Dim code = <code>Class C
Sub Method()
Dim max = Aggregate o In metaData.Order Into m = Max$$
...
...
@@ -255,10 +255,10 @@ End Class</code>
Assert.NotNull(session)
CheckStart(session.Session)
End Using
End
Function
End
Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
Public
Async Function TestTypeArgumentListSyntax() As Task
Public
Sub TestTypeArgumentListSyntax()
Dim code = <code>Class C
Sub Method()
Dim d = new List$$
...
...
@@ -269,10 +269,10 @@ End Class</code>
Assert.NotNull(session)
CheckStart(session.Session)
End Using
End
Function
End
Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
Public
Async Function TestExternalSourceDirectiveSyntax() As Task
Public
Sub TestExternalSourceDirectiveSyntax()
Dim code = <code>Imports System
Public Class ExternalSourceClass
...
...
@@ -286,7 +286,7 @@ End Class</code>
Assert.NotNull(session)
CheckStart(session.Session)
End Using
End
Function
End
Sub
<WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
Public Sub TestExternalChecksumDirectiveSyntax()
...
...
src/EditorFeatures/VisualBasicTest/AutomaticEndConstructCorrection/AutomaticEndConstructCorrectorTests.vb
浏览文件 @
2706dc0d
...
...
@@ -12,111 +12,111 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.AutomaticEndConstr
Public
Class
AutomaticEndConstructCorrectorTests
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestStructureToInterface
()
As
Task
Public
Sub
TestStructureToInterface
()
Dim
code
=
<
code
>
[|
Structure
|]
A
End
[|
Structure
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestEnumToInterface
()
As
Task
Public
Sub
TestEnumToInterface
()
Dim
code
=
<
code
>
[|
Enum
|]
A
End
[|
Enum
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestInterfaceToEnum
()
As
Task
Public
Sub
TestInterfaceToEnum
()
Dim
code
=
<
code
>
[|
Interface
|]
A
End
[|
Interface
|]
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Enum"
)
End
Function
Verify
(
code
,
"Enum"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestClassToInterface
()
As
Task
Public
Sub
TestClassToInterface
()
Dim
code
=
<
code
>
[|
Class
|]
A
End
[|
Class
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestModuleToInterface
()
As
Task
Public
Sub
TestModuleToInterface
()
Dim
code
=
<
code
>
[|
Module
|]
A
End
[|
Module
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestNamespaceToInterface
()
As
Task
Public
Sub
TestNamespaceToInterface
()
Dim
code
=
<
code
>
[|
Namespace
|]
A
End
[|
Namespace
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestSubToFunction
()
As
Task
Public
Sub
TestSubToFunction
()
Dim
code
=
<
code
>
Class
A
[|
Sub
|]
Test
()
End
[|
Sub
|]
End
Class
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Function"
)
End
Function
Verify
(
code
,
"Function"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestFunctionToSub
()
As
Task
Public
Sub
TestFunctionToSub
()
Dim
code
=
<
code
>
Class
A
[|
Function
|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Sub"
)
End
Function
Verify
(
code
,
"Sub"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestModuleToInterface1
()
As
Task
Public
Sub
TestModuleToInterface1
()
Dim
code
=
<
code
>
[|
Module
|]
A
:
End
[|
Module
|]
:
Module
B
:
End
Module
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestModuleToInterface2
()
As
Task
Public
Sub
TestModuleToInterface2
()
Dim
code
=
<
code
>
Module
A
:
End
Module
:
[|
Module
|]
B
:
End
[|
Module
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestModuleToInterface3
()
As
Task
Public
Sub
TestModuleToInterface3
()
Dim
code
=
<
code
>
Module
A
:
End
Module
:
[|
Module
|]
B
:
End
[|
Module
|]</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestModuleToInterface4
()
As
Task
Public
Sub
TestModuleToInterface4
()
Dim
code
=
<
code
>
[|
Module
|]
A
:
End
[|
Module
|]:
Module
B
:
End
Module
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Interface"
)
End
Function
Verify
(
code
,
"Interface"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
...
...
@@ -187,51 +187,51 @@ End Class</code>.Value
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestAddSharedModifierToFunction1
()
As
Task
Public
Sub
TestAddSharedModifierToFunction1
()
Dim
code
=
<
code
>
Class
A
[|
Function
$$|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
"Shared "
,
Function
(
s
)
"Function"
,
removeOriginalContent
:
=
False
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestAddTrailingSpaceToFunction
()
As
Task
Public
Sub
TestAddTrailingSpaceToFunction
()
Dim
code
=
<
code
>
Class
A
[|
Function
$$|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
" "
,
Function
(
s
)
"Function"
,
removeOriginalContent
:
=
False
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestAddLeadingSpaceToFunction
()
As
Task
Public
Sub
TestAddLeadingSpaceToFunction
()
Dim
code
=
<
code
>
Class
A
[|$$
Function
|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
" "
,
Function
(
s
)
"Function"
,
removeOriginalContent
:
=
False
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestAddSharedModifierToFunction2
()
As
Task
Public
Sub
TestAddSharedModifierToFunction2
()
Dim
code
=
<
code
>
Class
A
[|
Function
$$|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
"Shared"
,
Function
(
s
)
"Function"
,
removeOriginalContent
:
=
False
,
split
:
=
"Function"
)
End
Function
End
Sub
<
WorkItem
(
539362
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539362"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestMultiLineLambdaSubToFunction
()
As
Task
Public
Sub
TestMultiLineLambdaSubToFunction
()
Dim
code
=
<
code
>
Class
A
Public
Sub
F
()
Dim
nums
()
As
Integer
=
{
1
,
2
,
3
,
4
,
5
}
...
...
@@ -242,12 +242,12 @@ End Class</code>.Value
End
Sub
End
Class
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Function"
)
End
Function
Verify
(
code
,
"Function"
)
End
Sub
<
WorkItem
(
539362
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539362"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestMultiLineLambdaFunctionToSub
()
As
Task
Public
Sub
TestMultiLineLambdaFunctionToSub
()
Dim
code
=
<
code
>
Class
A
Public
Sub
F
()
Dim
nums
()
As
Integer
=
{
1
,
2
,
3
,
4
,
5
}
...
...
@@ -257,12 +257,12 @@ End Class</code>.Value
End
Sub
End
Class
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Sub"
)
End
Function
Verify
(
code
,
"Sub"
)
End
Sub
<
WorkItem
(
539365
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539365"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
BugFix5290
()
As
Task
Public
Sub
BugFix5290
()
Dim
code
=
<
code
>
Public
Class
Class1
Sub
M
()
[|
Class
|]
...
...
@@ -271,46 +271,46 @@ End [|Class|]</code>.Value
VerifyBegin
(
code
,
"Structure"
,
"Class"
)
VerifyEnd
(
code
,
"Structure"
,
"Class"
)
End
Function
End
Sub
<
WorkItem
(
539357
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539357"
)
>
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestBugFix5276
()
As
Task
Public
Sub
TestBugFix5276
()
Dim
code
=
<
code
>
Class
A
[|
Func
$$
tion
|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
" "
,
Function
(
s
)
"Function"
,
removeOriginalContent
:
=
False
)
End
Function
End
Sub
<
WorkItem
(
539360
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539360"
)
>
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestBugFix5283
()
As
Task
Public
Sub
TestBugFix5283
()
Dim
code
=
<
code
>
Class
A
[|$$
Function
|]
Test
()
As
Integer
End
[|
Function
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
"Shared Sub"
,
Function
(
s
)
If
(
s
.
Trim
()
=
"Shared Sub"
,
"Sub"
,
"Function"
),
removeOriginalContent
:
=
True
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
<
WorkItem
(
539498
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539498"
)
>
Public
Async
Function
TestDontThrowDueToSingleLineDeletion
()
As
Task
Public
Sub
TestDontThrowDueToSingleLineDeletion
()
Dim
code
=
<
code
>
Class
A
[|$$
Sub
M
()
:
End
Sub
|]
End
Class
</
code
>
.
Value
VerifyContinuousEdits
(
code
,
""
,
Function
()
"",
removeOriginalContent
:
=
True
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestPropertySet
()
As
Task
Public
Sub
TestPropertySet
()
Dim
code
=
<
code
>
Class
A
Property
Test
[|
Get
|]
...
...
@@ -320,12 +320,12 @@ End Class</code>.Value
End
Property
End
Class
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Set"
)
End
Function
Verify
(
code
,
"Set"
)
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
AutomaticEndConstructCorrection
)
>
Public
Async
Function
TestPropertyGet
()
As
Task
Public
Sub
TestPropertyGet
()
Dim
code
=
<
code
>
Class
A
Property
Test
Get
...
...
@@ -335,8 +335,8 @@ End Class</code>.Value
End
Property
End
Class
</
code
>
.
Value
Await
VerifyAsync
(
code
,
"Get"
)
End
Function
Verify
(
code
,
"Get"
)
End
Sub
Private
Sub
VerifyContinuousEdits
(
codeWithMarker
As
String
,
type
As
String
,
...
...
@@ -388,13 +388,13 @@ End Class</code>.Value
End
Using
End
Sub
Private
Async
Function
VerifyAsync
(
codeWithMarker
As
String
,
keyword
As
String
)
As
Task
Private
Sub
Verify
(
codeWithMarker
As
String
,
keyword
As
String
)
' do this since xml value put only vbLf
codeWithMarker
=
codeWithMarker
.
Replace
(
vbLf
,
vbCrLf
)
VerifyBegin
(
codeWithMarker
,
keyword
)
VerifyEnd
(
codeWithMarker
,
keyword
)
End
Function
End
Sub
Private
Sub
VerifyBegin
(
code
As
String
,
keyword
As
String
,
Optional
expected
As
String
=
Nothing
)
Using
workspace
=
TestWorkspace
.
CreateVisualBasic
(
code
)
...
...
src/EditorFeatures/VisualBasicTest/DocumentationComments/DocumentationCommentTests.vb
浏览文件 @
2706dc0d
...
...
@@ -245,7 +245,7 @@ End Class
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Class1
()
As
Task
Public
Sub
TestPressingEnter_Class1
()
Const
code
=
"
'''$$
Class C
...
...
@@ -259,10 +259,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Class1_AutoGenerateXmlDocCommentsOff
()
As
Task
Public
Sub
TestPressingEnter_Class1_AutoGenerateXmlDocCommentsOff
()
Const
code
=
"
'''$$
Class C
...
...
@@ -275,10 +275,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
,
autoGenerateXmlDocComments
:
=
False
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Class2
()
As
Task
Public
Sub
TestPressingEnter_Class2
()
Const
code
=
"
'''$$Class C
End Class
...
...
@@ -291,10 +291,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Class3
()
As
Task
Public
Sub
TestPressingEnter_Class3
()
Const
code
=
"
'''$$<Foo()> Class C
End Class
...
...
@@ -307,11 +307,11 @@ End Class
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
538717
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538717"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Module
()
As
Task
Public
Sub
TestPressingEnter_Module
()
Const
code
=
"
'''$$Module M
Dim x As Integer
...
...
@@ -326,10 +326,10 @@ Module M
End Module
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Method1
()
As
Task
Public
Sub
TestPressingEnter_Method1
()
Const
code
=
"
Class C
'''$$
...
...
@@ -352,10 +352,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Method2
()
As
Task
Public
Sub
TestPressingEnter_Method2
()
Const
code
=
"
Class C
'''$$Function M(Of T)(foo As Integer) As Integer
...
...
@@ -377,10 +377,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes1
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes1
()
Const
code
=
"
'''$$
''' <summary></summary>
...
...
@@ -395,10 +395,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes2
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes2
()
Const
code
=
"
''' <summary>
''' $$
...
...
@@ -415,10 +415,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes3
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes3
()
Const
code
=
"
''' <summary>$$</summary>
Class C
...
...
@@ -431,10 +431,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes4
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes4
()
Const
code
=
"
'''$$
''' <summary></summary>
...
...
@@ -449,10 +449,10 @@ End Class
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes5
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes5
()
Const
code
=
"
''' <summary>
''' $$
...
...
@@ -469,10 +469,10 @@ End Class
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes6
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes6
()
Const
code
=
"
''' <summary>$$</summary>
Class C
...
...
@@ -485,10 +485,10 @@ End Class
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes7
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes7
()
Const
code
=
"
Class C
'''$$
...
...
@@ -509,11 +509,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
540017
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540017"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes8
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes8
()
Const
code
=
"
''' <summary></summary>$$
Class C
...
...
@@ -526,11 +526,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
4817
,
"https://github.com/dotnet/roslyn/issues/4817"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InsertApostrophes9_AutoGenerateXmlDocCommentsOff
()
As
Task
Public
Sub
TestPressingEnter_InsertApostrophes9_AutoGenerateXmlDocCommentsOff
()
Const
code
=
"
''' <summary></summary>$$
Class C
...
...
@@ -543,11 +543,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
,
autoGenerateXmlDocComments
:
=
False
)
End
Function
End
Sub
<
WorkItem
(
540017
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540017"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_DontInsertApostrophes1
()
As
Task
Public
Sub
TestPressingEnter_DontInsertApostrophes1
()
Const
code
=
"
''' <summary></summary>
''' $$
...
...
@@ -562,10 +562,10 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_NotInsideConstructor
()
As
Task
Public
Sub
TestPressingEnter_NotInsideConstructor
()
Const
code
=
"
Class C
Sub New()
...
...
@@ -582,11 +582,11 @@ $$
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
537534
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/537534"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_NotInsideMethodBody
()
As
Task
Public
Sub
TestPressingEnter_NotInsideMethodBody
()
Const
code
=
"
Class C
Sub Foo()
...
...
@@ -603,11 +603,11 @@ $$
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
537550
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/537550"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_NotBeforeDocComment
()
As
Task
Public
Sub
TestPressingEnter_NotBeforeDocComment
()
Const
code
=
"
Class c1
$$''' <summary>
...
...
@@ -632,11 +632,11 @@ Public Async Function TestFoo() As Task
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2091
,
"https://github.com/dotnet/roslyn/issues/2091"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_InTextBeforeSpace
()
As
Task
Public
Sub
TestPressingEnter_InTextBeforeSpace
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -657,11 +657,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2108
,
"https://github.com/dotnet/roslyn/issues/2108"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Indentation1
()
As
Task
Public
Sub
TestPressingEnter_Indentation1
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -682,11 +682,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2108
,
"https://github.com/dotnet/roslyn/issues/2108"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Indentation2
()
As
Task
Public
Sub
TestPressingEnter_Indentation2
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -707,11 +707,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2108
,
"https://github.com/dotnet/roslyn/issues/2108"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Indentation3
()
As
Task
Public
Sub
TestPressingEnter_Indentation3
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -732,11 +732,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2108
,
"https://github.com/dotnet/roslyn/issues/2108"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Indentation4
()
As
Task
Public
Sub
TestPressingEnter_Indentation4
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -757,11 +757,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2108
,
"https://github.com/dotnet/roslyn/issues/2108"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Indentation5_UseTabs
()
As
Task
Public
Sub
TestPressingEnter_Indentation5_UseTabs
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -782,11 +782,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
,
useTabs
:
=
True
)
End
Function
End
Sub
<
WorkItem
(
5486
,
"https://github.com/dotnet/roslyn/issues/5486"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Selection1
()
As
Task
Public
Sub
TestPressingEnter_Selection1
()
Const
code
=
"
''' <summary>
''' Hello [|World|]$$!
...
...
@@ -803,11 +803,11 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
5486
,
"https://github.com/dotnet/roslyn/issues/5486"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestPressingEnter_Selection2
()
As
Task
Public
Sub
TestPressingEnter_Selection2
()
Const
code
=
"
''' <summary>
''' Hello $$[|World|]!
...
...
@@ -824,7 +824,7 @@ Class C
End Class
"
VerifyPressingEnter
(
code
,
expected
)
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestCommand_Class
()
As
Task
...
...
@@ -1020,7 +1020,7 @@ End Class
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineAbove2
()
As
Task
Public
Sub
TestOpenLineAbove2
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -1041,7 +1041,7 @@ Class C
End Class
"
VerifyOpenLineAbove
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
538482
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/538482"
)
>
<
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
...
...
@@ -1054,7 +1054,7 @@ End Class
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineAbove3
()
As
Task
Public
Sub
TestOpenLineAbove3
()
Const
code
=
"
Class C
''' $$<summary>
...
...
@@ -1077,11 +1077,11 @@ $$
End Class
"
VerifyOpenLineAbove
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineAbove4_Tabs
()
As
Task
Public
Sub
TestOpenLineAbove4_Tabs
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -1102,11 +1102,11 @@ Class C
End Class
"
VerifyOpenLineAbove
(
code
,
expected
,
useTabs
:
=
True
)
End
Function
End
Sub
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineBelow1
()
As
Task
Public
Sub
TestOpenLineBelow1
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -1127,11 +1127,11 @@ Class C
End Class
"
VerifyOpenLineBelow
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineBelow2
()
As
Task
Public
Sub
TestOpenLineBelow2
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -1152,11 +1152,11 @@ Class C
End Class
"
VerifyOpenLineBelow
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineBelow3
()
As
Task
Public
Sub
TestOpenLineBelow3
()
Const
code
=
"
''' <summary>
''' stuff
...
...
@@ -1167,11 +1167,11 @@ End Class
''' </summary>
''' $$"
VerifyOpenLineBelow
(
code
,
expected
)
End
Function
End
Sub
<
WorkItem
(
2090
,
"https://github.com/dotnet/roslyn/issues/2090"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DocumentationComments
)
>
Public
Async
Function
TestOpenLineBelow4_Tabs
()
As
Task
Public
Sub
TestOpenLineBelow4_Tabs
()
Const
code
=
"
Class C
''' <summary>
...
...
@@ -1192,7 +1192,7 @@ Class C
End Class
"
VerifyOpenLineBelow
(
code
,
expected
,
useTabs
:
=
True
)
End
Function
End
Sub
Friend
Overrides
Function
CreateCommandHandler
(
waitIndicator
As
IWaitIndicator
,
...
...
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/IfBlockTests.vb
浏览文件 @
2706dc0d
...
...
@@ -190,7 +190,7 @@ End Class",
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyIfWithImplicitLC
()
As
Task
Public
Sub
TestVerifyIfWithImplicitLC
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub S
...
...
@@ -208,10 +208,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
4
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyReCommitWithCode
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyReCommitWithCode
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub S
...
...
@@ -222,10 +222,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyReCommitWithoutCode
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyReCommitWithoutCode
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub S
...
...
@@ -234,10 +234,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyWithMultiLineChar
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyWithMultiLineChar
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub S
...
...
@@ -245,10 +245,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
WorkItem
(
539576
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/539576"
),
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyWithSkippedTokens
()
As
Task
Public
Sub
TestVerifyWithSkippedTokens
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub S
...
...
@@ -264,10 +264,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
12
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyInvalidMissingEndIf
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyInvalidMissingEndIf
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub S
...
...
@@ -276,19 +276,19 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyIfInInvalidCode
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyIfInInvalidCode
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"If True Then
if True then
End If"
,
caret
:
=
{
1
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyInternationalCharacter
()
As
Task
Public
Sub
TestVerifyInternationalCharacter
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Sub foo()
...
...
@@ -304,11 +304,11 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
12
})
End
Function
End
Sub
<
WorkItem
(
540204
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/540204"
)
>
<
WpfFact
(
Skip
:
=
"528838"
),
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestBugFix6380
()
As
Task
Public
Sub
TestBugFix6380
()
VerifyStatementEndConstructApplied
(
before
:
=
"Imports System
Imports System.Collections.Generic
...
...
@@ -335,10 +335,10 @@ Module Program
End Sub
End Module"
,
afterCaret
:
=
{
8
,
12
})
End
Function
End
Sub
<
WpfFact
(
Skip
:
=
"890307"
),
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
),
WorkItem
(
544523
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544523"
)
>
Public
Async
Function
TestVerifyRewriteOfIfWithColons
()
As
Task
Public
Sub
TestVerifyRewriteOfIfWithColons
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub Foo()
...
...
@@ -354,10 +354,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
12
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
),
WorkItem
(
530648
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530648"
)
>
Public
Async
Function
TestVerifyRewriteOfIfWithEmptyStatement
()
As
Task
Public
Sub
TestVerifyRewriteOfIfWithEmptyStatement
()
' Verify the caret is at the beginning of line 3 here. In VS, it will be moved to the
' correct virtual offset as part of the edit. This is an edge case that we really just
' need to avoid crashing.
...
...
@@ -378,6 +378,6 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
0
})
End
Function
End
Sub
End
Class
End
Namespace
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/MultiLineLambdaTests.vb
浏览文件 @
2706dc0d
...
...
@@ -135,7 +135,7 @@ End Class",
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyAnonymousType
()
As
Task
Public
Sub
TestVerifyAnonymousType
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -151,10 +151,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifySingleLineLambdaFunc
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifySingleLineLambdaFunc
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub s()
...
...
@@ -162,10 +162,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifySingleLineLambdaSub
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifySingleLineLambdaSub
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub s()
...
...
@@ -173,10 +173,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyAsDefaultParameterValue
()
As
Task
Public
Sub
TestVerifyAsDefaultParameterValue
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s(Optional ByVal f As Func(Of String, String) = Function(x As String)
...
...
@@ -188,10 +188,10 @@ End Class",
End Function
End Class"
,
afterCaret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyNestedLambda
()
As
Task
Public
Sub
TestVerifyNestedLambda
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
sub s
...
...
@@ -211,10 +211,10 @@ End Class",
End sub
End Class"
,
afterCaret
:
=
{
4
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyInField
()
As
Task
Public
Sub
TestVerifyInField
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Dim x = Sub()
...
...
@@ -226,10 +226,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyInvalidLambdaSyntax
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyInvalidLambdaSyntax
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub s()
...
...
@@ -237,10 +237,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyNotAppliedIfSubLambdaContainsEndSub
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyNotAppliedIfSubLambdaContainsEndSub
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub s()
...
...
@@ -248,10 +248,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
21
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyNotAppliedIfSyntaxIsFunctionLambdaContainsEndFunction
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyNotAppliedIfSyntaxIsFunctionLambdaContainsEndFunction
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub s()
...
...
@@ -259,10 +259,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
26
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyLambdaWithImplicitLC
()
As
Threading
.
Tasks
.
Task
Public
Sub
VerifyLambdaWithImplicitLC
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class C
Sub s()
...
...
@@ -270,10 +270,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifyLambdaWithMissingParenthesis
()
As
Task
Public
Sub
TestVerifyLambdaWithMissingParenthesis
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -289,10 +289,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifySingleLineSubLambdaToMultiLine
()
As
Task
Public
Sub
TestVerifySingleLineSubLambdaToMultiLine
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -308,10 +308,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
20
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
),
WorkItem
(
530683
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530683"
)
>
Public
Async
Function
TestVerifySingleLineSubLambdaToMultiLineWithTrailingTrivia
()
As
Task
Public
Sub
TestVerifySingleLineSubLambdaToMultiLineWithTrailingTrivia
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -327,10 +327,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
20
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestVerifySingleLineFunctionLambdaToMultiLine
()
As
Task
Public
Sub
TestVerifySingleLineFunctionLambdaToMultiLine
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -346,10 +346,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
27
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
),
WorkItem
(
530683
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530683"
)
>
Public
Async
Function
TestVerifySingleLineFunctionLambdaToMultiLineWithTrailingTrivia
()
As
Task
Public
Sub
TestVerifySingleLineFunctionLambdaToMultiLineWithTrailingTrivia
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -365,11 +365,11 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
27
})
End
Function
End
Sub
<
WorkItem
(
1922
,
"https://github.com/dotnet/roslyn/issues/1922"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
),
WorkItem
(
530683
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530683"
)
>
Public
Async
Function
TestVerifySingleLineFunctionLambdaToMultiLineInsideXMLTag
()
As
Task
Public
Sub
TestVerifySingleLineFunctionLambdaToMultiLineInsideXMLTag
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -385,11 +385,11 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WorkItem
(
1922
,
"https://github.com/dotnet/roslyn/issues/1922"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
),
WorkItem
(
530683
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530683"
)
>
Public
Async
Function
TestVerifySingleLineSubLambdaToMultiLineInsideXMLTag
()
As
Task
Public
Sub
TestVerifySingleLineSubLambdaToMultiLineInsideXMLTag
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C
Sub s()
...
...
@@ -405,6 +405,6 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
End
Class
End
Namespace
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/PropertyBlockTests.vb
浏览文件 @
2706dc0d
...
...
@@ -74,7 +74,7 @@ End Class",
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyForReadOnlyWithSecondGetPropertyAfterExistingGet
()
As
Task
Public
Sub
DontApplyForReadOnlyWithSecondGetPropertyAfterExistingGet
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
ReadOnly Property foo As Integer
...
...
@@ -86,19 +86,19 @@ End Class",
End Property
End Class"
,
caret
:
=
{
6
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyForWriteOnlyProperty
()
As
Task
Public
Sub
DontApplyForWriteOnlyProperty
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
WriteOnly Property foo As Integer
End Class"
,
caret
:
=
{
1
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyOnGetForRegularProperty
()
As
Task
Public
Sub
TestApplyOnGetForRegularProperty
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Property foo As Integer
...
...
@@ -116,10 +116,10 @@ End Class",
End Property
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyOnSetForRegularProperty
()
As
Task
Public
Sub
TestApplyOnSetForRegularProperty
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Property foo As Integer
...
...
@@ -137,20 +137,20 @@ End Class",
End Property
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyForReadOnlyPropertyIfEndPropertyMissingWhenInvokedAfterProperty
()
As
Task
Public
Sub
DontApplyForReadOnlyPropertyIfEndPropertyMissingWhenInvokedAfterProperty
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
ReadOnly Property foo As Integer
Get
End Class"
,
caret
:
=
{
1
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyOnGetForRegularPropertyWithSetPresent
()
As
Task
Public
Sub
TestApplyOnGetForRegularPropertyWithSetPresent
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Property foo As Integer
...
...
@@ -174,20 +174,20 @@ End Class",
End Property
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyForWriteOnlyPropertyWithTypeCharacter
()
As
Task
Public
Sub
DontApplyForWriteOnlyPropertyWithTypeCharacter
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
WriteOnly Property foo$
End Class"
,
caret
:
=
{
1
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
<
WorkItem
(
536376
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/536376"
)
>
Public
Async
Function
TestApplyForPropertyWithIndexer
()
As
Task
Public
Sub
TestApplyForPropertyWithIndexer
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Property foo(arg as Integer) As Integer
...
...
@@ -204,11 +204,11 @@ End Class",
End Property
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
<
WorkItem
(
536391
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/536391"
)
>
Public
Async
Function
DontApplyForDuplicateGet
()
As
Task
Public
Sub
DontApplyForDuplicateGet
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
ReadOnly Property foo As Integer
...
...
@@ -219,11 +219,11 @@ End Class",
End Property
End Class"
,
caret
:
=
{
5
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
<
WorkItem
(
536391
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/536391"
)
>
Public
Async
Function
DontApplyForDuplicateSet
()
As
Task
Public
Sub
DontApplyForDuplicateSet
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
WriteOnly Property foo As Integer
...
...
@@ -234,11 +234,11 @@ End Class",
End Property
End Class"
,
caret
:
=
{
5
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
<
WorkItem
(
536391
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/536391"
)
>
Public
Async
Function
DontApplyForSetInReadOnly
()
As
Task
Public
Sub
DontApplyForSetInReadOnly
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
ReadOnly Property foo As Integer
...
...
@@ -246,11 +246,11 @@ End Class",
End Property
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WorkItem
(
536391
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/536391"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyForGetInReadOnly
()
As
Task
Public
Sub
DontApplyForGetInReadOnly
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
WriteOnly Property foo As Integer
...
...
@@ -258,30 +258,30 @@ End Class",
End Property
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
VerifyInternationalCharacter
()
As
Task
Public
Sub
VerifyInternationalCharacter
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Class c1
WriteOnly Property fooæ
End Class"
,
caret
:
=
{
1
,
-
1
})
End
Function
End
Sub
<
WorkItem
(
544197
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544197"
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyInsideAnInterface
()
As
Task
Public
Sub
DontApplyInsideAnInterface
()
VerifyStatementEndConstructNotApplied
(
text
:
=
"Interface IFoo
Property Foo(x As Integer) As String
End Interface"
,
caret
:
=
{
1
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
<
WorkItem
(
2096
,
"https://github.com/dotnet/roslyn/issues/2096"
)
>
Public
Async
Function
TestDontGenerateSetForReadonlyProperty
()
As
Task
Public
Sub
TestDontGenerateSetForReadonlyProperty
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Readonly Property foo(arg as Integer) As Integer
...
...
@@ -295,11 +295,11 @@ End Class",
End Property
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
<
WorkItem
(
2096
,
"https://github.com/dotnet/roslyn/issues/2096"
)
>
Public
Async
Function
TestDontGenerateGetForWriteonlyProperty
()
As
Task
Public
Sub
TestDontGenerateGetForWriteonlyProperty
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class c1
Writeonly Property foo(arg as Integer) As Integer
...
...
@@ -313,6 +313,6 @@ End Class",
End Property
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
End
Class
End
Namespace
\ No newline at end of file
src/EditorFeatures/VisualBasicTest/EndConstructGeneration/XmlLiteralTests.vb
浏览文件 @
2706dc0d
...
...
@@ -67,7 +67,7 @@ End Class",
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyInParameterDeclaration2
()
As
Threading
.
Tasks
.
Task
Public
Sub
DontApplyInParameterDeclaration2
()
VerifyXmlElementEndConstructNotApplied
(
text
:
=
"Class C1
Sub M1(i As Integer,
...
...
@@ -75,10 +75,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
16
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyAfterXmlStartElementWithEndElement
()
As
Threading
.
Tasks
.
Task
Public
Sub
DontApplyAfterXmlStartElementWithEndElement
()
VerifyXmlElementEndConstructNotApplied
(
text
:
=
"Class C1
Sub M1()
...
...
@@ -86,10 +86,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
23
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyAfterXmlEndElement
()
As
Threading
.
Tasks
.
Task
Public
Sub
DontApplyAfterXmlEndElement
()
VerifyXmlElementEndConstructNotApplied
(
text
:
=
"Class C1
Sub M1()
...
...
@@ -97,10 +97,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyAfterSingleXmlTag
()
As
Threading
.
Tasks
.
Task
Public
Sub
DontApplyAfterSingleXmlTag
()
VerifyXmlElementEndConstructNotApplied
(
text
:
=
"Class C1
Sub M1()
...
...
@@ -108,10 +108,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
DontApplyAfterProcessingInstruction
()
As
Threading
.
Tasks
.
Task
Public
Sub
DontApplyAfterProcessingInstruction
()
VerifyXmlElementEndConstructNotApplied
(
text
:
=
"Class C1
Sub M1()
...
...
@@ -119,10 +119,10 @@ End Class",
End Sub
End Class"
,
caret
:
=
{
2
,
-
1
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlStartElementWhenPassedAsParameter1
()
As
Task
Public
Sub
TestApplyAfterXmlStartElementWhenPassedAsParameter1
()
VerifyXmlElementEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -136,10 +136,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
16
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlStartElementWhenPassedAsParameter2
()
As
Task
Public
Sub
TestApplyAfterXmlStartElementWhenPassedAsParameter2
()
VerifyXmlElementEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -153,10 +153,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
16
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlComment
()
As
Task
Public
Sub
TestApplyAfterXmlComment
()
VerifyXmlCommentEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -170,10 +170,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
20
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlCommentWhenPassedAsParameter1
()
As
Task
Public
Sub
TestApplyAfterXmlCommentWhenPassedAsParameter1
()
VerifyXmlCommentEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -187,10 +187,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
15
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlCommentWhenPassedAsParameter2
()
As
Task
Public
Sub
TestApplyAfterXmlCommentWhenPassedAsParameter2
()
VerifyXmlCommentEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -204,10 +204,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
15
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlCData
()
As
Task
Public
Sub
TestApplyAfterXmlCData
()
VerifyXmlCDataEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -221,10 +221,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
25
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlCData2
()
As
Task
Public
Sub
TestApplyAfterXmlCData2
()
VerifyXmlCDataEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -238,10 +238,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
31
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlEmbeddedExpression1
()
As
Task
Public
Sub
TestApplyAfterXmlEmbeddedExpression1
()
VerifyXmlEmbeddedExpressionEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -255,10 +255,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
20
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlEmbeddedExpression2
()
As
Task
Public
Sub
TestApplyAfterXmlEmbeddedExpression2
()
VerifyXmlEmbeddedExpressionEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -272,10 +272,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
23
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlEmbeddedExpression3
()
As
Task
Public
Sub
TestApplyAfterXmlEmbeddedExpression3
()
VerifyXmlEmbeddedExpressionEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -289,10 +289,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
23
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlProcessingInstruction
()
As
Task
Public
Sub
TestApplyAfterXmlProcessingInstruction
()
VerifyXmlProcessingInstructionEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -306,10 +306,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
18
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlProcessingInstructionWhenPassedAsParameter1
()
As
Task
Public
Sub
TestApplyAfterXmlProcessingInstructionWhenPassedAsParameter1
()
VerifyXmlProcessingInstructionEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -323,10 +323,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
13
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestApplyAfterXmlProcessingInstructionWhenPassedAsParameter2
()
As
Task
Public
Sub
TestApplyAfterXmlProcessingInstructionWhenPassedAsParameter2
()
VerifyXmlProcessingInstructionEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -340,10 +340,10 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
2
,
13
})
End
Function
End
Sub
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EndConstructGeneration
)
>
Public
Async
Function
TestInsertBlankLineWhenPressingEnterInEmptyXmlTag
()
As
Task
Public
Sub
TestInsertBlankLineWhenPressingEnterInEmptyXmlTag
()
VerifyStatementEndConstructApplied
(
before
:
=
"Class C1
Sub M1()
...
...
@@ -359,6 +359,6 @@ End Class",
End Sub
End Class"
,
afterCaret
:
=
{
3
,
-
1
})
End
Function
End
Sub
End
Class
End
Namespace
src/EditorFeatures/VisualBasicTest/Formatting/Indentation/SmartIndenterTests.vb
浏览文件 @
2706dc0d
...
...
@@ -165,7 +165,7 @@ End Module
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestComments
()
As
Task
Public
Sub
TestComments
()
Dim
code
=
<
Code
>
' comments
</
Code
>
.
Value
...
...
@@ -173,11 +173,11 @@ End Module
code
,
indentationLine
:
=
1
,
expectedIndentation
:
=
12
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestXmlComments
()
As
Task
Public
Sub
TestXmlComments
()
Dim
code
=
<
Code
>
''' Xml comments
</
Code
>
.
Value
...
...
@@ -185,11 +185,11 @@ End Module
code
,
indentationLine
:
=
1
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestClassStatement
()
As
Task
Public
Sub
TestClassStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
</
Code
>
.
Value
...
...
@@ -198,11 +198,11 @@ End Module
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestClassStatementWithInherits
()
As
Task
Public
Sub
TestClassStatementWithInherits
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Inherits
BC
...
...
@@ -212,11 +212,11 @@ End Module
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndClassStatement
()
As
Task
Public
Sub
TestEndClassStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Dim
i
As
Integer
...
...
@@ -227,11 +227,11 @@ End Module
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
4
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestClassStatementWithInheritsImplementsAndStatementSeparators
()
As
Task
Public
Sub
TestClassStatementWithInheritsImplementsAndStatementSeparators
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Inherits
IFoo
:
Implements
Foo
...
...
@@ -241,11 +241,11 @@ End Module
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestClassStatementWithInheritsImplementsAndStatementSeparators2
()
As
Task
Public
Sub
TestClassStatementWithInheritsImplementsAndStatementSeparators2
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
:
Inherits
IFoo
:
Implements
Foo
</
Code
>
.
Value
...
...
@@ -254,11 +254,11 @@ End Module
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestInterfaceStatement
()
As
Task
Public
Sub
TestInterfaceStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Interface
IF
</
Code
>
.
Value
...
...
@@ -267,11 +267,11 @@ End Module
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndInterfaceStatement
()
As
Task
Public
Sub
TestEndInterfaceStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Interface
IF
Sub
Foo
()
...
...
@@ -282,11 +282,11 @@ End Module
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
4
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestInterfaceStatementWithInherits
()
As
Task
Public
Sub
TestInterfaceStatementWithInherits
()
Dim
code
=
<
Code
>
Namespace
NS
Interface
IF
Inherits
IFoo
...
...
@@ -296,11 +296,11 @@ End Module
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestInterfaceStatementWithInheritsOnTheSameLine
()
As
Task
Public
Sub
TestInterfaceStatementWithInheritsOnTheSameLine
()
Dim
code
=
<
Code
>
Namespace
NS
Interface
IF
:
Inherits
IFoo
</
Code
>
.
Value
...
...
@@ -309,11 +309,11 @@ End Module
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEnumStatement
()
As
Task
Public
Sub
TestEnumStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Enum
Foo
</
Code
>
.
Value
...
...
@@ -322,11 +322,11 @@ End Module
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndEnumStatement
()
As
Task
Public
Sub
TestEndEnumStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Enum
Foo
Member1
...
...
@@ -337,11 +337,11 @@ End Module
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
4
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEnumMembers
()
As
Task
Public
Sub
TestEnumMembers
()
Dim
code
=
<
Code
>
Namespace
NS
Enum
Foo
Member1
...
...
@@ -351,11 +351,11 @@ End Module
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestStructureStatement
()
As
Task
Public
Sub
TestStructureStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Structure
SomeStructure
</
Code
>
.
Value
...
...
@@ -364,11 +364,11 @@ End Module
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndStructureStatement
()
As
Task
Public
Sub
TestEndStructureStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Structure
SomeStructure
Dim
i
As
Integer
...
...
@@ -379,11 +379,11 @@ End Module
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
4
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestNamespaceStatement
()
As
Task
Public
Sub
TestNamespaceStatement
()
Dim
code
=
<
Code
>
Namespace
NS
</
Code
>
.
Value
...
...
@@ -391,11 +391,11 @@ End Module
code
,
indentationLine
:
=
1
,
expectedIndentation
:
=
4
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndNamespaceStatement
()
As
Task
Public
Sub
TestEndNamespaceStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
C
Dim
i
As
Integer
...
...
@@ -407,11 +407,11 @@ End Namespace
code
,
indentationLine
:
=
5
,
expectedIndentation
:
=
0
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestModuleStatement
()
As
Task
Public
Sub
TestModuleStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Module
Module1
</
Code
>
.
Value
...
...
@@ -420,11 +420,11 @@ End Namespace
code
,
indentationLine
:
=
2
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndModuleStatement
()
As
Task
Public
Sub
TestEndModuleStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Module
Module1
Sub
Foo
()
...
...
@@ -436,11 +436,11 @@ End Namespace
code
,
indentationLine
:
=
5
,
expectedIndentation
:
=
4
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestSubStatement
()
As
Task
Public
Sub
TestSubStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Sub
Method
...
...
@@ -450,11 +450,11 @@ End Namespace
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
12
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestSubStatementWithParametersOnDifferentLines
()
As
Task
Public
Sub
TestSubStatementWithParametersOnDifferentLines
()
Dim
code
=
<
Code
>
Class
C
Sub
Method
(
ByVal
p1
As
Boolean
,
ByVal
p2
As
Boolean
,
...
...
@@ -467,11 +467,11 @@ End Class</Code>.Value
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
8
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestSingleLineIfStatement
()
As
Task
Public
Sub
TestSingleLineIfStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Sub
Method
...
...
@@ -482,11 +482,11 @@ End Class</Code>.Value
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
12
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestIfStatement
()
As
Task
Public
Sub
TestIfStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Sub
Method
...
...
@@ -497,11 +497,11 @@ End Class</Code>.Value
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
16
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestElseStatement
()
As
Task
Public
Sub
TestElseStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Sub
Method
...
...
@@ -514,11 +514,11 @@ End Class</Code>.Value
code
,
indentationLine
:
=
6
,
expectedIndentation
:
=
16
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestEndIfStatement
()
As
Task
Public
Sub
TestEndIfStatement
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Sub
Method
...
...
@@ -533,7 +533,7 @@ End Class</Code>.Value
code
,
indentationLine
:
=
8
,
expectedIndentation
:
=
12
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
...
...
@@ -1013,7 +1013,7 @@ End Class</Code>.Value
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
<
WorkItem
(
536545
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/536545"
)
>
Public
Async
Function
TestXmlComments3
()
As
Task
Public
Sub
TestXmlComments3
()
Dim
code
=
<
Code
>
Class
C
Sub
Bar
()
If
True
Then
'c
...
...
@@ -1023,7 +1023,7 @@ End Class</Code>.Value
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
12
)
End
Function
End
Sub
#End Region
...
...
@@ -1120,7 +1120,7 @@ End Class</Code>.Value
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestMultiLineSubLambdaWithComment
()
As
Task
Public
Sub
TestMultiLineSubLambdaWithComment
()
Dim
code
=
<
Code
>
Namespace
NS
Class
CL
Sub
Method
()
...
...
@@ -1131,7 +1131,7 @@ End Class</Code>.Value
code
,
indentationLine
:
=
4
,
expectedIndentation
:
=
22
)
End
Function
End
Sub
#End Region
...
...
@@ -2111,7 +2111,7 @@ End Class</code>.Value
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
Public
Async
Function
TestTypeArgument
()
As
Task
Public
Sub
TestTypeArgument
()
Dim
code
=
<
code
>
Class
CL
Sub
Method
(
Of
T
,
T2
)()
Method
(
Of
...
...
@@ -2123,7 +2123,7 @@ End Class</code>.Value
code
,
indentationLine
:
=
3
,
expectedIndentation
:
=
12
)
End
Function
End
Sub
<
WpfFact
>
<
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
SmartIndent
)
>
...
...
@@ -2451,7 +2451,7 @@ End Namespace
<WpfFact>
<Trait(Traits.Feature, Traits.Features.SmartIndent)>
Public
Async Function TestBlockIndentation1() As Task
Public
Sub TestBlockIndentation1()
Dim code = <code>Class C
Sub Main()
</code>.Value
...
...
@@ -2461,7 +2461,7 @@ End Namespace
indentationLine:=2,
expectedIndentation:=4,
indentStyle:=FormattingOptions.IndentStyle.Block)
End
Function
End
Sub
<WpfFact>
<Trait(Traits.Feature, Traits.Features.SmartIndent)>
...
...
@@ -2594,7 +2594,7 @@ End Class
<WpfFact>
<WorkItem(1082028, "
http
:
//
vstfdevdiv
:
8080
/
DevDiv2
/
DevDiv
/
_workitems
/
edit
/
1082028
")>
<Trait(Traits.Feature, Traits.Features.SmartIndent)>
Public
Async Function TestNotLineContinuationIndentation_ObjectCollection() As Task
Public
Sub TestNotLineContinuationIndentation_ObjectCollection()
Dim code = <code>Module Module1
Sub Main()
Dim l2 = New List(Of String) From {
...
...
@@ -2608,7 +2608,7 @@ End Module
code,
indentationLine:=4,
expectedIndentation:=8)
End
Function
End
Sub
<WpfFact>
<WorkItem(1082028, "
http
:
//
vstfdevdiv
:
8080
/
DevDiv2
/
DevDiv
/
_workitems
/
edit
/
1082028
")>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录