Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
6616f6f5
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,发现更多精彩内容 >>
提交
6616f6f5
编写于
11月 04, 2016
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix a few tests
上级
df992774
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
193 addition
and
301 deletion
+193
-301
src/VisualStudio/CSharp/Test/Debugging/LocationInfoGetterTests.cs
...alStudio/CSharp/Test/Debugging/LocationInfoGetterTests.cs
+60
-59
src/VisualStudio/CSharp/Test/Debugging/ProximityExpressionsGetterTests.cs
.../CSharp/Test/Debugging/ProximityExpressionsGetterTests.cs
+133
-242
未找到文件。
src/VisualStudio/CSharp/Test/Debugging/LocationInfoGetterTests.cs
浏览文件 @
6616f6f5
...
...
@@ -33,10 +33,7 @@ private async Task TestAsync(string markup, string expectedName, int expectedLin
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
public
async
Task
TestClass
()
{
await
TestAsync
(
@"class F$$oo
{
}"
,
"Foo"
,
0
);
await
TestAsync
(
"class F$$oo { }"
,
"Foo"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -49,7 +46,8 @@ public async Task TestMethod()
public static void Meth$$od()
{
}
}"
,
"Class.Method()"
,
0
);
}
"
,
"Class.Method()"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -175,9 +173,7 @@ public async Task TestLambdaInFieldInitializer()
await
TestAsync
(
@"class Class
{
Action<int> a = b => {
in$$t c;
};
Action<int> a = b => { in$$t c; };
}"
,
"Class.a"
,
0
);
}
...
...
@@ -200,8 +196,10 @@ public async Task TestConstructor()
{
C1()
{
$$}
}"
,
"C1.C1()"
,
3
);
}
"
,
"C1.C1()"
,
3
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -213,7 +211,8 @@ public async Task TestDestructor()
~C1()
{
$$}
}"
,
"C1.~C1()"
,
2
);
}
"
,
"C1.~C1()"
,
2
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -229,7 +228,8 @@ class C1
$$return 42;
}
}
}"
,
"N1.C1.+(C1 x, C1 y)"
,
2
);
// Old implementation reports "operator +" (rather than "+")...
}
"
,
"N1.C1.+(C1 x, C1 y)"
,
2
);
// Old implementation reports "operator +" (rather than "+")...
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -245,11 +245,11 @@ class C1
$$return null;
}
}
class C2
{
}
}"
,
"N1.C1.N1.C2(N1.C1 x)"
,
2
);
// Old implementation reports "explicit operator N1.C2" (rather than "N1.C2")...
}
"
,
"N1.C1.N1.C2(N1.C1 x)"
,
2
);
// Old implementation reports "explicit operator N1.C2" (rather than "N1.C2")...
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -259,9 +259,9 @@ public async Task TestEvent()
@"class C1
{
delegate void D1();
event D1 e1$$;
}"
,
"C1.e1"
,
0
);
}
"
,
"C1.e1"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -272,13 +272,13 @@ public async Task TextExplicitInterfaceImplementation()
{
void M1();
}
class C1
{
void I1.M1()
{
$$}
}"
,
"C1.M1()"
,
2
);
}
"
,
"C1.M1()"
,
2
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -294,7 +294,8 @@ public async Task TextIndexer()
$$return null;
}
}
}"
,
"C1.this[int x]"
,
4
);
}
"
,
"C1.this[int x]"
,
4
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -303,11 +304,9 @@ public async Task TestParamsParameter()
await
TestAsync
(
@"class C1
{
void M1(params int[] x)
{
$$
}
}"
,
"C1.M1(params int[] x)"
,
0
);
void M1(params int[] x) { $$ }
}
"
,
"C1.M1(params int[] x)"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -316,11 +315,9 @@ public async Task TestArglistParameter()
await
TestAsync
(
@"class C1
{
void M1(__arglist)
{
$$
}
}"
,
"C1.M1(__arglist)"
,
0
);
// Old implementation does not show "__arglist"...
void M1(__arglist) { $$ }
}
"
,
"C1.M1(__arglist)"
,
0
);
// Old implementation does not show "__arglist"...
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -329,11 +326,12 @@ public async Task TestRefAndOutParameters()
await
TestAsync
(
@"class C1
{
void M1(
ref int x, out int y
)
void M1(
ref int x, out int y
)
{
$$y = x;
}
}"
,
"C1.M1( ref int x, out int y )"
,
2
);
// Old implementation did not show extra spaces around the parameters...
}
"
,
"C1.M1( ref int x, out int y )"
,
2
);
// Old implementation did not show extra spaces around the parameters...
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -342,11 +340,12 @@ public async Task TestOptionalParameters()
await
TestAsync
(
@"class C1
{
void M1(int x =
1)
void M1(int x =1)
{
$$y = x;
}
}"
,
"C1.M1(int x =1)"
,
2
);
}
"
,
"C1.M1(int x =1)"
,
2
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -358,7 +357,8 @@ public async Task TestExtensionMethod()
static void M1(this int x)
{
}$$
}"
,
"C1.M1(this int x)"
,
2
);
}
"
,
"C1.M1(this int x)"
,
2
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -367,11 +367,9 @@ public async Task TestGenericType()
await
TestAsync
(
@"class C1<T, U>
{
static void M1()
{
$$
}
}"
,
"C1.M1()"
,
0
);
static void M1() { $$ }
}
"
,
"C1.M1()"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -380,11 +378,9 @@ public async Task TestGenericMethod()
await
TestAsync
(
@"class C1<T, U>
{
static void M1<V>()
{
$$
}
}"
,
"C1.M1()"
,
0
);
static void M1<V>() { $$ }
}
"
,
"C1.M1()"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -393,11 +389,9 @@ public async Task TestGenericParameters()
await
TestAsync
(
@"class C1<T, U>
{
static void M1<V>(C1<int, V> x, V y)
{
$$
}
}"
,
"C1.M1(C1<int, V> x, V y)"
,
0
);
static void M1<V>(C1<int, V> x, V y) { $$ }
}
"
,
"C1.M1(C1<int, V> x, V y)"
,
0
);
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -406,9 +400,9 @@ public async Task TestMissingNamespace()
await
TestAsync
(
@"{
class Class
{
int a1, a$$2;
}
{
int a1, a$$2;
}
}"
,
"Class.a2"
,
0
);
}
...
...
@@ -432,12 +426,12 @@ public async Task TestMissingClassName()
{
await
TestAsync
(
@"namespace N1
class
class
{
int M1()
$${
}
}
$${
}
}
}"
,
"N1.M1()"
,
1
);
// Old implementation displayed "N1.?.M1", but we don't see a class declaration in the syntax tree...
}
...
...
@@ -464,7 +458,9 @@ public async Task TestMissingParameterList()
{
class C1
{
static void M1 { $$}
static void M1
{
$$}
}
}"
,
"N1.C1.M1"
,
2
);
}
...
...
@@ -473,7 +469,8 @@ class C1
public
async
Task
TopLevelField
()
{
await
TestAsync
(
@"$$int f1;"
,
"f1"
,
0
,
new
CSharpParseOptions
(
kind
:
SourceCodeKind
.
Script
));
@"$$int f1;
"
,
"f1"
,
0
,
new
CSharpParseOptions
(
kind
:
SourceCodeKind
.
Script
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
...
...
@@ -482,14 +479,18 @@ public async Task TopLevelMethod()
await
TestAsync
(
@"int M1(int x)
{
$$}"
,
"M1(int x)"
,
2
,
new
CSharpParseOptions
(
kind
:
SourceCodeKind
.
Script
));
$$}
"
,
"M1(int x)"
,
2
,
new
CSharpParseOptions
(
kind
:
SourceCodeKind
.
Script
));
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
public
async
Task
TopLevelStatement
()
{
await
TestAsync
(
@"$$System.Console.WriteLine(""Hello"")"
,
null
,
0
,
new
CSharpParseOptions
(
kind
:
SourceCodeKind
.
Script
));
@"
$$System.Console.WriteLine(""Hello"")
"
,
null
,
0
,
new
CSharpParseOptions
(
kind
:
SourceCodeKind
.
Script
));
}
}
}
\ No newline at end of file
src/VisualStudio/CSharp/Test/Debugging/ProximityExpressionsGetterTests.cs
浏览文件 @
6616f6f5
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录