Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
c70c6d4c
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,发现更多精彩内容 >>
提交
c70c6d4c
编写于
11月 04, 2016
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a test
上级
6616f6f5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
82 addition
and
117 deletion
+82
-117
src/VisualStudio/CSharp/Test/Debugging/DataTipInfoGetterTests.cs
...ualStudio/CSharp/Test/Debugging/DataTipInfoGetterTests.cs
+82
-117
未找到文件。
src/VisualStudio/CSharp/Test/Debugging/DataTipInfoGetterTests.cs
浏览文件 @
c70c6d4c
...
...
@@ -56,24 +56,11 @@ private async Task TestSpanGetterAsync(string markup, Func<Document, int, TextSp
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingDataTips
)]
public
async
Task
TestCSharpLanguageDebugInfoGetDataTipSpanAndText
()
{
await
TestAsync
(
@"class [|C$$|]
{
}"
);
await
TestAsync
(
@"struct [|C$$|]
{
}"
);
await
TestAsync
(
@"interface [|C$$|]
{
}"
);
await
TestAsync
(
@"enum [|C$$|]
{
}"
);
await
TestAsync
(
@"delegate void [|C$$|]();"
);
// Without the space, that position is actually on the open paren.
await
TestAsync
(
"class [|C$$|] { }"
);
await
TestAsync
(
"struct [|C$$|] { }"
);
await
TestAsync
(
"interface [|C$$|] { }"
);
await
TestAsync
(
"enum [|C$$|] { }"
);
await
TestAsync
(
"delegate void [|C$$|] ();"
);
// Without the space, that position is actually on the open paren.
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingDataTips
)]
...
...
@@ -82,10 +69,10 @@ public async Task Test1()
await
TestAsync
(
@"class C
{
void Foo()
{
[|Sys$$tem|].Console.WriteLine(args);
}
void Foo()
{
[|Sys$$tem|].Console.WriteLine(args);
}
}"
);
}
...
...
@@ -95,10 +82,10 @@ public async Task Test2()
await
TestAsync
(
@"class C
{
void Foo()
{
[|System$$.Console|].WriteLine(args);
}
void Foo()
{
[|System$$.Console|].WriteLine(args);
}
}"
);
}
...
...
@@ -108,10 +95,10 @@ public async Task Test3()
await
TestAsync
(
@"class C
{
void Foo()
{
[|System.$$Console|].WriteLine(args);
}
void Foo()
{
[|System.$$Console|].WriteLine(args);
}
}"
);
}
...
...
@@ -121,10 +108,10 @@ public async Task Test4()
await
TestAsync
(
@"class C
{
void Foo()
{
[|System.Con$$sole|].WriteLine(args);
}
void Foo()
{
[|System.Con$$sole|].WriteLine(args);
}
}"
);
}
...
...
@@ -134,10 +121,10 @@ public async Task Test5()
await
TestAsync
(
@"class C
{
void Foo()
{
[|System.Console.Wri$$teLine|](args);
}
void Foo()
{
[|System.Console.Wri$$teLine|](args);
}
}"
);
}
...
...
@@ -147,10 +134,10 @@ public async Task Test6()
await
TestNoDataTipAsync
(
@"class C
{
void Foo()
{
[|System.Console.WriteLine$$|]
(args);
}
void Foo()
{
[|System.Console.WriteLine|]$$
(args);
}
}"
);
}
...
...
@@ -160,10 +147,10 @@ public async Task Test7()
await
TestAsync
(
@"class C
{
void Foo()
{
System.Console.WriteLine($$[|args|]);
}
void Foo()
{
System.Console.WriteLine($$[|args|]);
}
}"
);
}
...
...
@@ -173,10 +160,10 @@ public async Task Test8()
await
TestNoDataTipAsync
(
@"class C
{
void Foo()
{
[|System.Console.WriteLine|](args$$);
}
void Foo()
{
[|System.Console.WriteLine|](args$$);
}
}"
);
}
...
...
@@ -186,10 +173,10 @@ public async Task TestVar()
await
TestAsync
(
@"class C
{
void Foo()
{
[|va$$r|] v = 0;
}
void Foo()
{
[|va$$r|] v = 0;
}
}"
,
"int"
);
}
...
...
@@ -199,10 +186,10 @@ public async Task TestVariableType()
await
TestAsync
(
@"class C
{
void Foo()
{
[|in$$t|] i = 0;
}
void Foo()
{
[|in$$t|] i = 0;
}
}"
);
}
...
...
@@ -212,10 +199,10 @@ public async Task TestVariableIdentifier()
await
TestAsync
(
@"class C
{
void Foo()
{
int $$[|
i|] = 0;
}
void Foo()
{
int [|$$
i|] = 0;
}
}"
);
}
...
...
@@ -226,10 +213,10 @@ public async Task TestLiterals()
await
TestAsync
(
@"class C
{
void Foo()
{
int i = [|4$$2|];
}
void Foo()
{
int i = [|4$$2|];
}
}"
,
"int"
);
}
...
...
@@ -239,10 +226,10 @@ public async Task TestNonExpressions()
await
TestNoDataTipAsync
(
@"class C
{
void Foo()
{
int i = 42;
}$$
void Foo()
{
int i = 42;
}$$
}"
);
}
...
...
@@ -252,9 +239,9 @@ public async Task TestParameterIdentifier()
await
TestAsync
(
@"class C
{
void Foo(int $$[|
i|])
{
}
void Foo(int [|$$
i|])
{
}
}"
);
}
...
...
@@ -270,7 +257,7 @@ void Foo()
try
{
}
catch (System.Exception
$$[|
e|])
catch (System.Exception
[|$$
e|])
{
}
}
...
...
@@ -283,21 +270,16 @@ public async Task TestEvent()
await
TestAsync
(
@"class C
{
event System.Action
$$[|
E|];
event System.Action
[|$$
E|];
}"
);
await
TestAsync
(
@"class C
{
event System.Action
$$[|
E|]
event System.Action
[|$$
E|]
{
add
{
}
remove
{
}
add { }
remove { }
}
}"
);
}
...
...
@@ -308,25 +290,18 @@ public async Task TestMethod()
await
TestAsync
(
@"class C
{
int $$[|M|]()
{
}
int [|$$M|]() { }
}"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingDataTips
)]
public
async
Task
TestTypeParameter
()
{
await
TestAsync
(
@"class C<T, $$[|U|], V>
{
}"
);
await
TestAsync
(
"class C<T, [|$$U|], V> { }"
);
await
TestAsync
(
@"class C
{
void M<T, $$[|U|]>()
{
}
void M<T, [|$$U|]>() { }
}"
);
}
...
...
@@ -334,7 +309,7 @@ public async Task TestTypeParameter()
public
async
Task
UsingAlias
()
{
await
TestAsync
(
@"using
$$[|
S|] = Static;
@"using
[|$$
S|] = Static;
static class Static
{
...
...
@@ -348,12 +323,12 @@ public async Task TestForEachIdentifier()
await
TestAsync
(
@"class C
{
void Foo(string[] args)
void Foo(string[] args)
{
foreach (string [|$$s|] in args)
{
foreach (string $$[|s|] in args)
{
}
}
}
}"
);
}
...
...
@@ -366,19 +341,16 @@ public async Task TestProperty()
{
class C
{
public int $$[|foo|] { get; private set; } // hover over me
public int [|$$foo|] { get; private set; } // hover over me
public C()
{
this.foo = 1;
}
public int Foo()
{
return 2; // breakpoint here
}
}
class Program
{
static void Main(string[] args)
...
...
@@ -386,7 +358,8 @@ static void Main(string[] args)
new C().Foo();
}
}
}"
);
}
"
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingDataTips
)]
...
...
@@ -397,8 +370,7 @@ public async Task TestQueryIdentifier()
{
object Foo(string[] args)
{
return from $$[|a|] in args
select a;
return from [|$$a|] in args select a;
}
}"
);
await
TestAsync
(
// Let
...
...
@@ -406,9 +378,7 @@ object Foo(string[] args)
{
object Foo(string[] args)
{
return from a in args
let $$[|b|] = ""END""
select a + b;
return from a in args let [|$$b|] = ""END"" select a + b;
}
}"
);
await
TestAsync
(
// Join
...
...
@@ -416,8 +386,7 @@ object Foo(string[] args)
{
object Foo(string[] args)
{
return from a in args
join $$[|b|] in args on a equals b;
return from a in args join [|$$b|] in args on a equals b;
}
}"
);
await
TestAsync
(
// Join Into
...
...
@@ -425,8 +394,7 @@ object Foo(string[] args)
{
object Foo(string[] args)
{
return from a in args
join b in args on a equals b into $$[|c|];
return from a in args join b in args on a equals b into [|$$c|];
}
}"
);
await
TestAsync
(
// Continuation
...
...
@@ -434,10 +402,7 @@ object Foo(string[] args)
{
object Foo(string[] args)
{
return from a in args
select a into $$[|b|]
from c in b
select c;
return from a in args select a into [|$$b|] from c in b select c;
}
}"
);
}
...
...
@@ -543,4 +508,4 @@ class C
await
TestAsync
(
string
.
Format
(
sourceTemplate
,
"/*1*/[|Me/*2*/?./*3*/B/*4*/?./*5*/$$C|]/*6*/"
));
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录