Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
0a387174
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,发现更多精彩内容 >>
提交
0a387174
编写于
1月 27, 2017
作者:
V
Vladimir Sadov
提交者:
GitHub
1月 27, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16805 from VSadov/fix14600
Some more automated tests and test cleanup for the PR#16659
上级
ef5c0c84
6cb0bfc9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
170 addition
and
23 deletion
+170
-23
src/EditorFeatures/Test2/FindReferences/FindReferencesTests.Tuples.vb
...atures/Test2/FindReferences/FindReferencesTests.Tuples.vb
+127
-11
src/EditorFeatures/Test2/GoToDefinition/GoToDefinitionTests.vb
...ditorFeatures/Test2/GoToDefinition/GoToDefinitionTests.vb
+43
-12
未找到文件。
src/EditorFeatures/Test2/FindReferences/FindReferencesTests.Tuples.vb
浏览文件 @
0a387174
...
...
@@ -4,12 +4,13 @@ Imports System.Threading.Tasks
Namespace
Microsoft.CodeAnalysis.Editor.UnitTests.FindReferences
Partial
Public
Class
FindReferencesTests
Dim
tuple2Doc
As
XElement
=
<
Document
>
Dim
tuple2
As
XCData
=
<
!
[
CDATA
[
namespace
System
{
//
struct
with
two
values
public
struct
ValueTuple
&
lt
;
T1
,
T2
>
public
struct
ValueTuple
<
T1
,
T2
>
{
public
T1
Item1
;
public
T2
Item2
;
...
...
@@ -26,14 +27,13 @@ namespace System
}
}
}
</
Document
>
]]
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
Public
Async
Function
TestTupleFieldSameTuples01
()
As
Task
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program
...
...
@@ -48,6 +48,8 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -59,7 +61,6 @@ namespace System
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program
...
...
@@ -74,6 +75,7 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -85,7 +87,6 @@ namespace System
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program
...
...
@@ -100,6 +101,8 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -111,7 +114,6 @@ namespace System
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program1
...
...
@@ -130,6 +132,8 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
<
Document
><
!
[
CDATA
[
...
...
@@ -156,7 +160,6 @@ namespace System
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program
...
...
@@ -171,6 +174,8 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -182,7 +187,6 @@ namespace System
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program
...
...
@@ -197,6 +201,8 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -208,7 +214,6 @@ namespace System
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
class
Program
...
...
@@ -224,11 +229,122 @@ namespace System
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
Await
TestAPIAndFeature
(
input
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
Public
Async
Function
TestTupleFieldItem01
()
As
Task
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Document
><
!
[
CDATA
[
class
Program
{
static
void
Main
(
string
[]
args
)
{
var
x
=
({
|
Definition
:
Alice
|
}:
1
,
Bob
:
2
)
;
var
y
=
(
Alice
:
1
,
Bob
:
2
)
;
var
z
=
x
.
$$[|
Item1
|];
}
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
Await
TestAPIAndFeature
(
input
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
Public
Async
Function
TestTupleFieldItem02
()
As
Task
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Document
><
!
[
CDATA
[
class
Program
{
static
void
Main
(
string
[]
args
)
{
var
x
=
(
$$[|
{
|
Definition
:
Alice
|
}
|]
:
1
,
Bob
:
2
)
;
var
y
=
(
[|
Alice
|]
:
1
,
Bob
:
2
)
;
var
z
=
x
.
Item1
;
}
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
Await
TestAPIAndFeature
(
input
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
Public
Async
Function
TestTupleFieldItem03
()
As
Task
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Document
><
!
[
CDATA
[
class
Program
{
static
void
Main
(
string
[]
args
)
{
var
x
=
({
|
Definition
:
1
|
},
Bob
:
2
)
;
var
y
=
(
Alice
:
1
,
Bob
:
2
)
;
var
z
=
x
.
$$[|
Item1
|];
var
z1
=
x
.
[|
Item1
|];
}
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
Await
TestAPIAndFeature
(
input
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
Public
Async
Function
TestTupleFieldItem04
()
As
Task
Dim
input
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Document
><
!
[
CDATA
[
class
Program
{
static
void
Main
(
string
[]
args
)
{
System
.
ValueTuple
<
int
,
int
>
x
=
(
1
,
Bob
:
2
)
;
var
y
=
(
Alice
:
1
,
Bob
:
2
)
;
var
z
=
x
.
$$[|
Item1
|];
var
z1
=
x
.
[|
Item1
|];
}
}
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
Await
TestAPIAndFeature
(
input
)
End
Function
End
Class
End
Namespace
src/EditorFeatures/Test2/GoToDefinition/GoToDefinitionTests.vb
浏览文件 @
0a387174
...
...
@@ -768,12 +768,12 @@ class C
#End Region
#Region "CSharp TupleTests"
Dim
tuple2
Doc
As
XElement
=
<
Document
>
Dim
tuple2
As
XCData
=
<
!
[
CDATA
[
namespace
System
{
//
struct
with
two
values
public
struct
ValueTuple
&
lt
;
T1
,
T2
>
public
struct
ValueTuple
<
T1
,
T2
>
{
public
T1
Item1
;
public
T2
Item2
;
...
...
@@ -790,14 +790,13 @@ namespace System
}
}
}
</
Document
>
]]
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
GoToDefinition
)
>
Public
Async
Function
TestCSharpGotoDefinitionTupleFieldEqualTuples01
()
As
Task
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -811,6 +810,8 @@ namespace System
var
z2
=
y
.
Alice
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -849,7 +850,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -860,6 +860,8 @@ namespace System
var
z
=
x
.
$$
Program
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -872,7 +874,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -883,6 +884,8 @@ namespace System
var
z
=
x
.
Program
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -895,7 +898,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -906,6 +908,8 @@ namespace System
var
z
=
x
.
$$
Program
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -918,7 +922,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -929,6 +932,8 @@ namespace System
var
z1
=
x
.
$$
Alice
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -941,7 +946,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -952,6 +956,8 @@ namespace System
var
z1
=
x
.
Alice
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -964,7 +970,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -975,6 +980,8 @@ namespace System
var
z1
=
x
.
$$
Item1
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -987,7 +994,6 @@ namespace System
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
class
Program
{
...
...
@@ -998,6 +1004,8 @@ namespace System
var
z1
=
x
.
$$
Item1
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
...
...
@@ -1005,6 +1013,29 @@ namespace System
Await
TestAsync
(
workspace
)
End
Function
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
GoToDefinition
)
>
Public
Async
Function
TestCSharpGotoDefinitionTupleFieldItem03
()
As
Task
Dim
workspace
=
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Document
>
class
Program
{
static
void
Main
(
string
[]
args
)
{
System
.
ValueTuple
&
lt
;
short
,
short>
;
x
=
(
1
,
Bob
:
2
)
;
var
z1
=
x
.
$$
Item1
;
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Project
>
</
Workspace
>
Await
TestAsync
(
workspace
,
expectedResult
:
=
False
)
End
Function
#End Region
#Region "CSharp Venus Tests"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录