Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
c3253600
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,发现更多精彩内容 >>
提交
c3253600
编写于
3月 02, 2018
作者:
Š
Šimon Koníček
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Moving the test variations into their own methods
上级
248a85fb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
75 addition
and
15 deletion
+75
-15
src/EditorFeatures/CSharpTest2/Recommendations/WhenKeywordRecommenderTests.cs
...SharpTest2/Recommendations/WhenKeywordRecommenderTests.cs
+75
-15
未找到文件。
src/EditorFeatures/CSharpTest2/Recommendations/WhenKeywordRecommenderTests.cs
浏览文件 @
c3253600
...
...
@@ -69,7 +69,11 @@ public async Task TestForCatchClause_NotAfterFilter3()
public
async
Task
TestForSwitchCase_AfterDeclarationPattern
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case int i $$ }"
));
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case int i $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_AfterDeclarationPattern_BeforeBreak
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case int i $$ break; }"
));
}
...
...
@@ -84,7 +88,11 @@ public async Task TestForSwitchCase_AfterDeclarationPattern_BeforeWhen()
public
async
Task
TestForSwitchCase_AfterLiteral
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case 1 $$ }"
));
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case 1 $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_AfterLiteral_BeforeBreak
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case 1 $$ break; }"
));
}
...
...
@@ -98,7 +106,11 @@ public async Task TestForSwitchCase_AfterLiteral_BeforeWhen()
public
async
Task
TestForSwitchCase_AfterBinaryExpression
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case 1 + 1 $$ }"
));
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case 1 + 1 $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_AfterBinaryExpression_BeforeBreak
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case 1 + 1 $$ break; }"
));
}
...
...
@@ -112,7 +124,11 @@ public async Task TestForSwitchCase_AfterBinaryExpression_BeforeWhen()
public
async
Task
TestForSwitchCase_AfterTernaryExpression
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 : 1 $$ }"
));
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 : 1 $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_AfterTernaryExpression_BeforeBreak
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 : 1 $$ break; }"
));
}
...
...
@@ -126,7 +142,11 @@ public async Task TestForSwitchCase_AfterTernaryExpression_BeforeWhen()
public
async
Task
TestForSwitchCase_AfterParenthesesWithIncompleteExpressionInside
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + ) $$ }"
));
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + ) $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_AfterParenthesesWithIncompleteExpressionInside_BeforeBreak
()
{
await
VerifyKeywordAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + ) $$ break; }"
));
}
...
...
@@ -140,7 +160,11 @@ public async Task TestForSwitchCase_AfterParenthesesWithIncompleteExpressionInsi
public
async
Task
TestForSwitchCase_NotAfterIncompleteBinaryExpression
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case 1 + $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case 1 + $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterIncompleteBinaryExpression_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case 1 + $$ break; }"
));
}
...
...
@@ -154,7 +178,11 @@ public async Task TestForSwitchCase_NotAfterIncompleteBinaryExpression_BeforeWhe
public
async
Task
TestForSwitchCase_NotAfterIncompleteTernaryExpression1
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterIncompleteTernaryExpression1_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? $$ break; }"
));
}
...
...
@@ -168,7 +196,11 @@ public async Task TestForSwitchCase_NotAfterIncompleteTernaryExpression1_BeforeW
public
async
Task
TestForSwitchCase_NotAfterIncompleteTernaryExpression2
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterIncompleteTernaryExpression2_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 $$ break; }"
));
}
...
...
@@ -182,7 +214,11 @@ public async Task TestForSwitchCase_NotAfterIncompleteTernaryExpression2_BeforeW
public
async
Task
TestForSwitchCase_NotAfterIncompleteTernaryExpression3
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 : $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 : $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterIncompleteTernaryExpression3_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case true ? 1 : $$ break; }"
));
}
...
...
@@ -196,7 +232,11 @@ public async Task TestForSwitchCase_NotAfterIncompleteTernaryExpression3_BeforeW
public
async
Task
TestForSwitchCase_NotAfterMissingCloseParen
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + 1 $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + 1 $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterMissingCloseParen_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + 1 $$ break; }"
));
}
...
...
@@ -210,7 +250,11 @@ public async Task TestForSwitchCase_NotAfterMissingCloseParen_BeforeWhen()
public
async
Task
TestForSwitchCase_NotInsideParentheses
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + 1 $$) }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + 1 $$): }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotInsideParentheses_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case (1 + 1 $$) break; }"
));
}
...
...
@@ -224,7 +268,11 @@ public async Task TestForSwitchCase_NotInsideParentheses_BeforeWhen()
public
async
Task
TestForSwitchCase_NotAfterNew
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case new $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case new $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterNew_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case new $$ break; }"
));
}
...
...
@@ -238,7 +286,11 @@ public async Task TestForSwitchCase_NotAfterNew_BeforeWhen()
public
async
Task
TestForSwitchCase_NotAfterCase
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterCase_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case $$ break; }"
));
}
...
...
@@ -252,7 +304,11 @@ public async Task TestForSwitchCase_NotAfterCase_BeforeWhen()
public
async
Task
TestForSwitchCase_NotAfterDefault
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { default $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { default $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterDefault_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { default $$ break; }"
));
}
...
...
@@ -260,7 +316,11 @@ public async Task TestForSwitchCase_NotAfterDefault()
public
async
Task
TestForSwitchCase_NotAfterWhen
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case 1 when $$ }"
));
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case 1 when $$: }"
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
KeywordRecommending
)]
public
async
Task
TestForSwitchCase_NotAfterWhen_BeforeBreak
()
{
await
VerifyAbsenceAsync
(
AddInsideMethod
(
@"switch (1) { case 1 when $$ break; }"
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录