Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e10385f4
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,发现更多精彩内容 >>
未验证
提交
e10385f4
编写于
3月 08, 2020
作者:
M
msftbot[bot]
提交者:
GitHub
3月 08, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #42253 from CyrusNajmabadi/addTest12
Add test validating behavior.
上级
62b0d83c
93b9693f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
73 addition
and
0 deletion
+73
-0
src/EditorFeatures/Test/MetadataAsSource/MetadataAsSourceTests.CSharp.cs
...res/Test/MetadataAsSource/MetadataAsSourceTests.CSharp.cs
+38
-0
src/EditorFeatures/Test/MetadataAsSource/MetadataAsSourceTests.VisualBasic.cs
...est/MetadataAsSource/MetadataAsSourceTests.VisualBasic.cs
+35
-0
未找到文件。
src/EditorFeatures/Test/MetadataAsSource/MetadataAsSourceTests.CSharp.cs
浏览文件 @
e10385f4
...
...
@@ -2,14 +2,17 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.MetadataAsSource
;
using
Microsoft.CodeAnalysis.Test.Utilities
;
using
Roslyn.Test.Utilities
;
using
Xunit
;
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.MetadataAsSource
{
public
partial
class
MetadataAsSourceTests
{
[
UseExportProvider
]
public
class
CSharp
{
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
MetadataAsSource
)]
...
...
@@ -27,6 +30,41 @@ public void ExtractXMLFromDocComment()
Assert
.
Equal
(
expectedXMLFragment
,
extractedXMLFragment
);
}
[
Fact
,
WorkItem
(
26605
,
"https://github.com/dotnet/roslyn/issues/26605"
)]
public
async
Task
TestValueTuple
()
{
using
var
context
=
TestContext
.
Create
(
LanguageNames
.
CSharp
);
await
context
.
GenerateAndVerifySourceAsync
(
"System.ValueTuple"
,
@
$"#region
{
FeaturesResources
.
Assembly
}
System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
// System.ValueTuple.dll
#endregion
using
System
;
using
System
;
using
System.Collections
;
namespace
System
{{
public
struct
[|
ValueTuple
|]
:
IEquatable
<
ValueTuple
>,
IStructuralEquatable
,
IStructuralComparable
,
IComparable
,
IComparable
<
ValueTuple
>,
ITupleInternal
{{
public
static
ValueTuple
Create
();
public
static
ValueTuple
<
T1
>
Create
<
T1
>(
T1
item1
);
public
static
(
T1
,
T2
)
Create
<
T1
,
T2
>(
T1
item1
,
T2
item2
);
public
static
(
T1
,
T2
,
T3
)
Create
<
T1
,
T2
,
T3
>(
T1
item1
,
T2
item2
,
T3
item3
);
public
static
(
T1
,
T2
,
T3
,
T4
)
Create
<
T1
,
T2
,
T3
,
T4
>(
T1
item1
,
T2
item2
,
T3
item3
,
T4
item4
);
public
static
(
T1
,
T2
,
T3
,
T4
,
T5
)
Create
<
T1
,
T2
,
T3
,
T4
,
T5
>(
T1
item1
,
T2
item2
,
T3
item3
,
T4
item4
,
T5
item5
);
public
static
(
T1
,
T2
,
T3
,
T4
,
T5
,
T6
)
Create
<
T1
,
T2
,
T3
,
T4
,
T5
,
T6
>(
T1
item1
,
T2
item2
,
T3
item3
,
T4
item4
,
T5
item5
,
T6
item6
);
public
static
(
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
)
Create
<
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
>(
T1
item1
,
T2
item2
,
T3
item3
,
T4
item4
,
T5
item5
,
T6
item6
,
T7
item7
);
public
static
(
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
,
T8
)
Create
<
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
,
T8
>(
T1
item1
,
T2
item2
,
T3
item3
,
T4
item4
,
T5
item5
,
T6
item6
,
T7
item7
,
T8
item8
);
public
int
CompareTo
(
ValueTuple
other
);
public
override
bool
Equals
(
object
obj
);
public
bool
Equals
(
ValueTuple
other
);
public
override
int
GetHashCode
();
public
override
string
ToString
();
}}
}}
");
}
}
}
}
src/EditorFeatures/Test/MetadataAsSource/MetadataAsSourceTests.VisualBasic.cs
浏览文件 @
e10385f4
...
...
@@ -85,6 +85,41 @@ public void ExtractXMLFromDocComment()
Assert
.
Equal
(
expectedXMLFragment
,
extractedXMLFragment
);
}
[
Fact
,
WorkItem
(
26605
,
"https://github.com/dotnet/roslyn/issues/26605"
)]
public
async
Task
TestValueTuple
()
{
using
var
context
=
TestContext
.
Create
(
LanguageNames
.
VisualBasic
);
await
context
.
GenerateAndVerifySourceAsync
(
"System.ValueTuple"
,
@
$"#Region ""{FeaturesResources.Assembly} System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51""
'
System
.
ValueTuple
.
dll
#
End
Region
Imports
System
Imports
System
Imports
System
.
Collections
Namespace
System
Public
Structure
[|
ValueTuple
|]
Implements
IEquatable
(
Of
ValueTuple
),
IStructuralEquatable
,
IStructuralComparable
,
IComparable
,
IComparable
(
Of
ValueTuple
),
ITupleInternal
Public
Shared
Function
Create
()
As
ValueTuple
Public
Shared
Function
Create
(
Of
T1
)(
item1
As
T1
)
As
ValueTuple
(
Of
T1
)
Public
Shared
Function
Create
(
Of
T1
,
T2
)(
item1
As
T1
,
item2
As
T2
)
As
(
T1
,
T2
)
Public
Shared
Function
Create
(
Of
T1
,
T2
,
T3
)(
item1
As
T1
,
item2
As
T2
,
item3
As
T3
)
As
(
T1
,
T2
,
T3
)
Public
Shared
Function
Create
(
Of
T1
,
T2
,
T3
,
T4
)(
item1
As
T1
,
item2
As
T2
,
item3
As
T3
,
item4
As
T4
)
As
(
T1
,
T2
,
T3
,
T4
)
Public
Shared
Function
Create
(
Of
T1
,
T2
,
T3
,
T4
,
T5
)(
item1
As
T1
,
item2
As
T2
,
item3
As
T3
,
item4
As
T4
,
item5
As
T5
)
As
(
T1
,
T2
,
T3
,
T4
,
T5
)
Public
Shared
Function
Create
(
Of
T1
,
T2
,
T3
,
T4
,
T5
,
T6
)(
item1
As
T1
,
item2
As
T2
,
item3
As
T3
,
item4
As
T4
,
item5
As
T5
,
item6
As
T6
)
As
(
T1
,
T2
,
T3
,
T4
,
T5
,
T6
)
Public
Shared
Function
Create
(
Of
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
)(
item1
As
T1
,
item2
As
T2
,
item3
As
T3
,
item4
As
T4
,
item5
As
T5
,
item6
As
T6
,
item7
As
T7
)
As
(
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
)
Public
Shared
Function
Create
(
Of
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
,
T8
)(
item1
As
T1
,
item2
As
T2
,
item3
As
T3
,
item4
As
T4
,
item5
As
T5
,
item6
As
T6
,
item7
As
T7
,
item8
As
T8
)
As
(
T1
,
T2
,
T3
,
T4
,
T5
,
T6
,
T7
,
T8
)
Public
Overrides
Function
Equals
(
obj
As
Object
)
As
Boolean
Public
Function
Equals
(
other
As
ValueTuple
)
As
Boolean
Public
Function
CompareTo
(
other
As
ValueTuple
)
As
Integer
Public
Overrides
Function
GetHashCode
()
As
Integer
Public
Overrides
Function
ToString
()
As
String
End
Structure
End
Namespace
");
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录