Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
81614bdc
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,发现更多精彩内容 >>
提交
81614bdc
编写于
9月 30, 2018
作者:
Š
Šimon Koníček
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adding more tests
上级
50e592c7
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
187 addition
and
3 deletion
+187
-3
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProviderTests.cs
...viders/EnumAndCompletionListTagCompletionProviderTests.cs
+22
-1
src/EditorFeatures/CSharpTest/TypeInferrer/TypeInferrerTests.cs
...itorFeatures/CSharpTest/TypeInferrer/TypeInferrerTests.cs
+165
-2
未找到文件。
src/EditorFeatures/CSharpTest/Completion/CompletionProviders/EnumAndCompletionListTagCompletionProviderTests.cs
浏览文件 @
81614bdc
...
...
@@ -166,7 +166,7 @@ enum Colors
[
WorkItem
(
827897
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/827897"
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
public
async
Task
InYieldReturn
()
public
async
Task
InYieldReturn
InMethod
()
{
var
markup
=
@"using System;
...
...
@@ -182,6 +182,27 @@ IEnumerable<DayOfWeek> M()
await
VerifyItemExistsAsync
(
markup
,
"DayOfWeek"
);
}
[
WorkItem
(
30235
,
"https://github.com/dotnet/roslyn/issues/30235"
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
public
async
Task
InYieldReturnInLocalFunction
()
{
var
markup
=
@"using System;
using System.Collections.Generic;
class Program
{
void M()
{
IEnumerable<DayOfWeek> F()
{
yield return $$
}
}
}"
;
await
VerifyItemExistsAsync
(
markup
,
"DayOfWeek"
);
}
[
WorkItem
(
827897
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/827897"
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
public
async
Task
InAsyncMethodReturnStatement
()
...
...
src/EditorFeatures/CSharpTest/TypeInferrer/TypeInferrerTests.cs
浏览文件 @
81614bdc
...
...
@@ -674,6 +674,26 @@ static void Main(string[] args)
await
TestAsync
(
text
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInConstructor
()
{
await
TestInClassAsync
(
@"C()
{
return [|Goo()|];
}"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInDestructor
()
{
await
TestInClassAsync
(
@"~C()
{
return [|Goo()|];
}"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInMethod
()
{
...
...
@@ -702,10 +722,30 @@ public async Task TestReturnInVoidMethod()
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInGetter
()
public
async
Task
TestReturnInOperator
()
{
await
TestInClassAsync
(
@"public static C operator ++(C c)
{
return [|Goo()|];
}"
,
"global::C"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInConversionOperator
()
{
await
TestInClassAsync
(
@"public static implicit operator int(C c)
{
return [|Goo()|];
}"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInPropertyGetter
()
{
await
TestInClassAsync
(
@"int P
roperty
@"int P
{
get
{
...
...
@@ -714,6 +754,73 @@ public async Task TestReturnInGetter()
}"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInPropertySetter
()
{
await
TestInClassAsync
(
@"int P
{
set
{
return [|Goo()|];
}
}"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInIndexerGetter
()
{
await
TestInClassAsync
(
@"int this[int i]
{
get
{
return [|Goo()|];
}
}"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInIndexerSetter
()
{
await
TestInClassAsync
(
@"int this[int i]
{
set
{
return [|Goo()|];
}
}"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInEventAdder
()
{
await
TestInClassAsync
(
@"event System.EventHandler E
{
add
{
return [|Goo()|];
}
remove { }
}"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInEventRemover
()
{
await
TestInClassAsync
(
@"event System.EventHandler E
{
add { }
remove
{
return [|Goo()|];
}
}"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestReturnInLocalFunction
()
{
...
...
@@ -747,6 +854,13 @@ public async Task TestExpressionBodiedConstructor()
@"C() => [|Goo()|];"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedDestructor
()
{
await
TestInClassAsync
(
@"~C() => [|Goo()|];"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedMethod
()
{
...
...
@@ -769,6 +883,20 @@ public async Task TestExpressionBodiedVoidMethod()
@"void M() => [|Goo()|];"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedOperator
()
{
await
TestInClassAsync
(
@"public static C operator ++(C c) => [|Goo()|];"
,
"global::C"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedConversionOperator
()
{
await
TestInClassAsync
(
@"public static implicit operator int(C c) => [|Goo()|];"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedProperty
()
{
...
...
@@ -776,6 +904,13 @@ public async Task TestExpressionBodiedProperty()
@"int P => [|Goo()|];"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedIndexer
()
{
await
TestInClassAsync
(
@"int this[int i] => [|Goo()|];"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedPropertyGetter
()
{
...
...
@@ -790,6 +925,34 @@ public async Task TestExpressionBodiedPropertySetter()
@"int P { set => [|Goo()|]; }"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedIndexerGetter
()
{
await
TestInClassAsync
(
@"int this[int i] { get => [|Goo()|]; }"
,
"global::System.Int32"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedIndexerSetter
()
{
await
TestInClassAsync
(
@"int this[int i] { set => [|Goo()|]; }"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedEventAdder
()
{
await
TestInClassAsync
(
@"event System.EventHandler E { add => [|Goo()|]; remove { } }"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedEventRemover
()
{
await
TestInClassAsync
(
@"event System.EventHandler E { add { } remove => [|Goo()|]; }"
,
"void"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
TypeInferenceService
)]
public
async
Task
TestExpressionBodiedLocalFunction
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录