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
...
@@ -4,12 +4,13 @@ Imports System.Threading.Tasks
Namespace
Microsoft.CodeAnalysis.Editor.UnitTests.FindReferences
Namespace
Microsoft.CodeAnalysis.Editor.UnitTests.FindReferences
Partial
Public
Class
FindReferencesTests
Partial
Public
Class
FindReferencesTests
Dim
tuple2Doc
As
XElement
=
<
Document
>
Dim
tuple2
As
XCData
=
<
!
[
CDATA
[
namespace
System
namespace
System
{
{
//
struct
with
two
values
//
struct
with
two
values
public
struct
ValueTuple
&
lt
;
T1
,
T2
>
public
struct
ValueTuple
<
T1
,
T2
>
{
{
public
T1
Item1
;
public
T1
Item1
;
public
T2
Item2
;
public
T2
Item2
;
...
@@ -26,14 +27,13 @@ namespace System
...
@@ -26,14 +27,13 @@ namespace System
}
}
}
}
}
}
</
Document
>
]]
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
FindReferences
)
>
Public
Async
Function
TestTupleFieldSameTuples01
()
As
Task
Public
Async
Function
TestTupleFieldSameTuples01
()
As
Task
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program
class
Program
...
@@ -48,6 +48,8 @@ namespace System
...
@@ -48,6 +48,8 @@ namespace System
}
}
]]
>
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -59,7 +61,6 @@ namespace System
...
@@ -59,7 +61,6 @@ namespace System
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program
class
Program
...
@@ -74,6 +75,7 @@ namespace System
...
@@ -74,6 +75,7 @@ namespace System
}
}
]]
>
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -85,7 +87,6 @@ namespace System
...
@@ -85,7 +87,6 @@ namespace System
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program
class
Program
...
@@ -100,6 +101,8 @@ namespace System
...
@@ -100,6 +101,8 @@ namespace System
}
}
]]
>
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -111,7 +114,6 @@ namespace System
...
@@ -111,7 +114,6 @@ namespace System
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program1
class
Program1
...
@@ -130,6 +132,8 @@ namespace System
...
@@ -130,6 +132,8 @@ namespace System
}
}
]]
>
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
...
@@ -156,7 +160,6 @@ namespace System
...
@@ -156,7 +160,6 @@ namespace System
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program
class
Program
...
@@ -171,6 +174,8 @@ namespace System
...
@@ -171,6 +174,8 @@ namespace System
}
}
]]
>
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -182,7 +187,6 @@ namespace System
...
@@ -182,7 +187,6 @@ namespace System
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program
class
Program
...
@@ -197,6 +201,8 @@ namespace System
...
@@ -197,6 +201,8 @@ namespace System
}
}
]]
>
]]
>
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -208,7 +214,6 @@ namespace System
...
@@ -208,7 +214,6 @@ namespace System
Dim
input
=
Dim
input
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
><
!
[
CDATA
[
<
Document
><
!
[
CDATA
[
class
Program
class
Program
...
@@ -224,11 +229,122 @@ namespace System
...
@@ -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
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
Await
TestAPIAndFeature
(
input
)
Await
TestAPIAndFeature
(
input
)
End
Function
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
Class
End
Namespace
End
Namespace
src/EditorFeatures/Test2/GoToDefinition/GoToDefinitionTests.vb
浏览文件 @
0a387174
...
@@ -768,12 +768,12 @@ class C
...
@@ -768,12 +768,12 @@ class C
#End Region
#End Region
#Region "CSharp TupleTests"
#Region "CSharp TupleTests"
Dim
tuple2
Doc
As
XElement
=
Dim
tuple2
As
XCData
=
<
Document
>
<
!
[
CDATA
[
namespace
System
namespace
System
{
{
//
struct
with
two
values
//
struct
with
two
values
public
struct
ValueTuple
&
lt
;
T1
,
T2
>
public
struct
ValueTuple
<
T1
,
T2
>
{
{
public
T1
Item1
;
public
T1
Item1
;
public
T2
Item2
;
public
T2
Item2
;
...
@@ -790,14 +790,13 @@ namespace System
...
@@ -790,14 +790,13 @@ namespace System
}
}
}
}
}
}
</
Document
>
]]
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
GoToDefinition
)
>
<
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
GoToDefinition
)
>
Public
Async
Function
TestCSharpGotoDefinitionTupleFieldEqualTuples01
()
As
Task
Public
Async
Function
TestCSharpGotoDefinitionTupleFieldEqualTuples01
()
As
Task
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -811,6 +810,8 @@ namespace System
...
@@ -811,6 +810,8 @@ namespace System
var
z2
=
y
.
Alice
;
var
z2
=
y
.
Alice
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -849,7 +850,6 @@ namespace System
...
@@ -849,7 +850,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -860,6 +860,8 @@ namespace System
...
@@ -860,6 +860,8 @@ namespace System
var
z
=
x
.
$$
Program
;
var
z
=
x
.
$$
Program
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -872,7 +874,6 @@ namespace System
...
@@ -872,7 +874,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -883,6 +884,8 @@ namespace System
...
@@ -883,6 +884,8 @@ namespace System
var
z
=
x
.
Program
;
var
z
=
x
.
Program
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -895,7 +898,6 @@ namespace System
...
@@ -895,7 +898,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -906,6 +908,8 @@ namespace System
...
@@ -906,6 +908,8 @@ namespace System
var
z
=
x
.
$$
Program
;
var
z
=
x
.
$$
Program
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -918,7 +922,6 @@ namespace System
...
@@ -918,7 +922,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -929,6 +932,8 @@ namespace System
...
@@ -929,6 +932,8 @@ namespace System
var
z1
=
x
.
$$
Alice
;
var
z1
=
x
.
$$
Alice
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -941,7 +946,6 @@ namespace System
...
@@ -941,7 +946,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -952,6 +956,8 @@ namespace System
...
@@ -952,6 +956,8 @@ namespace System
var
z1
=
x
.
Alice
;
var
z1
=
x
.
Alice
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -964,7 +970,6 @@ namespace System
...
@@ -964,7 +970,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -975,6 +980,8 @@ namespace System
...
@@ -975,6 +980,8 @@ namespace System
var
z1
=
x
.
$$
Item1
;
var
z1
=
x
.
$$
Item1
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -987,7 +994,6 @@ namespace System
...
@@ -987,7 +994,6 @@ namespace System
Dim
workspace
=
Dim
workspace
=
<
Workspace
>
<
Workspace
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
Project
Language
=
"C#"
CommonReferences
=
"true"
>
<
%
=
tuple2Doc
%
>
<
Document
>
<
Document
>
class
Program
class
Program
{
{
...
@@ -998,6 +1004,8 @@ namespace System
...
@@ -998,6 +1004,8 @@ namespace System
var
z1
=
x
.
$$
Item1
;
var
z1
=
x
.
$$
Item1
;
}
}
}
}
<
%
=
tuple2
%
>
</
Document
>
</
Document
>
</
Project
>
</
Project
>
</
Workspace
>
</
Workspace
>
...
@@ -1005,6 +1013,29 @@ namespace System
...
@@ -1005,6 +1013,29 @@ namespace System
Await
TestAsync
(
workspace
)
Await
TestAsync
(
workspace
)
End
Function
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
#End Region
#Region "CSharp Venus Tests"
#Region "CSharp Venus Tests"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录