Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
b248e82d
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,发现更多精彩内容 >>
提交
b248e82d
编写于
3月 18, 2016
作者:
V
VSadov
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9869 from VSadov/unskip02
Unskipping remaining skipped tests in CSharp.UnitTests
上级
4e2e5a28
3370ff16
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
157 addition
and
35 deletion
+157
-35
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
+1
-1
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests_WellKnownAttributes.cs
...est/Emit/Attributes/AttributeTests_WellKnownAttributes.cs
+6
-14
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs
...Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs
+99
-2
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenMscorlib.cs
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenMscorlib.cs
+7
-2
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenOverridingAndHiding.cs
...rs/CSharp/Test/Emit/CodeGen/CodeGenOverridingAndHiding.cs
+34
-2
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
...rp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
+6
-3
src/Compilers/CSharp/Test/Emit/Emit/EmitMetadata.cs
src/Compilers/CSharp/Test/Emit/Emit/EmitMetadata.cs
+4
-11
未找到文件。
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests.cs
浏览文件 @
b248e82d
...
...
@@ -3428,7 +3428,7 @@ class C
}
[
WorkItem
(
121
,
"https://github.com/dotnet/roslyn/issues/121"
)]
[
Fact
(
Skip
=
"121"
)
]
[
Fact
]
public
void
Bug_AttributeOnWrongGenericParameter
()
{
var
source
=
@"
...
...
src/Compilers/CSharp/Test/Emit/Attributes/AttributeTests_WellKnownAttributes.cs
浏览文件 @
b248e82d
...
...
@@ -3125,7 +3125,7 @@ public class C2 { }
#
region
ComImportAttribute
,
CoClassAttribute
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/6190"
)
]
[
Fact
]
public
void
TestComImportAttribute
()
{
string
source
=
@"
...
...
@@ -3168,22 +3168,15 @@ public static int Main ()
Assert
.
Equal
(
1
,
typeA
.
GetAttributes
().
Length
);
var
ctorA
=
typeA
.
InstanceConstructors
.
First
();
Assert
.
Tru
e
(
ctorA
.
IsExtern
);
Assert
.
Fals
e
(
ctorA
.
IsExtern
);
var
methodFoo
=
(
MethodSymbol
)
typeA
.
GetMember
(
"Foo"
);
Assert
.
Tru
e
(
methodFoo
.
IsExtern
);
Assert
.
Fals
e
(
methodFoo
.
IsExtern
);
};
//
Verify that PEVerify will fail despite the fact that compiler produces no errors
//
the resulting code does not need to verify
// This is consistent with Dev10 behavior
//
// Dev10 PEVerify failure:
// [token 0x02000002] Type load failed.
//
// Dev10 Runtime Exception:
// Unhandled Exception: System.TypeLoadException: Could not load type 'A' from assembly 'XXX' because the method 'Foo' has no implementation (no RVA).
Assert
.
Throws
(
typeof
(
PeVerifyException
),
()
=>
CompileAndVerify
(
source
,
options
:
TestOptions
.
ReleaseDll
,
sourceSymbolValidator
:
sourceValidator
,
symbolValidator
:
metadataValidator
));
CompileAndVerify
(
source
,
options
:
TestOptions
.
ReleaseDll
,
verify
:
false
,
sourceSymbolValidator
:
sourceValidator
,
symbolValidator
:
metadataValidator
);
}
[
Fact
,
WorkItem
(
544507
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/544507"
)]
...
...
@@ -4937,7 +4930,7 @@ public void TestComCompatibleVersionAttribute_Invalid_02()
#
region
WindowsRuntimeImportAttribute
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/6190"
)
]
[
Fact
]
public
void
TestWindowsRuntimeImportAttribute
()
{
var
source
=
@"
...
...
@@ -4986,7 +4979,6 @@ class A
// Unhandled Exception: System.TypeLoadException: Windows Runtime types can only be declared in Windows Runtime assemblies.
var
verifier
=
CompileAndVerify
(
source
,
sourceSymbolValidator
:
sourceValidator
,
symbolValidator
:
metadataValidator
,
verify
:
false
);
verifier
.
EmitAndVerify
(
"Type load failed."
);
}
#
endregion
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs
浏览文件 @
b248e82d
...
...
@@ -303,7 +303,7 @@ dynamic F(dynamic d)
Assert.Equal(1, ((CSharpCompilation)c.Compilation).GlobalNamespace.GetMember<NamespaceSymbol>("System").GetMember<NamedTypeSymbol>("Func`13").Arity);
}
[Fact
(Skip = "https://github.com/dotnet/roslyn/issues/6190")
, WorkItem(530436, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530436")]
[Fact, WorkItem(530436, "http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530436")]
public void InvalidFunc_Constraints()
{
var systemCoreRef = CreateCompilationWithMscorlib(SystemCoreSource, assemblyName: GetUniqueName()).EmitToImageReference();
...
...
@@ -326,7 +326,104 @@ dynamic F(dynamic d)
";
// Desired: the delegate is generated, no error is reported.
// Actual: use the malformed Func`13 time and failed to PEVerify. Not presently worthwhile to fix.
Assert.Throws<PeVerifyException>(() => CompileAndVerify(source, new[] { systemCoreRef, csrtRef }));
CompileAndVerify(source, new[] { systemCoreRef, csrtRef }, verify: false).VerifyIL("C.F", @"
{
// Code size 189 (0xbd)
.maxstack 13
IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>> C.<>o__0.<>p__0""
IL_0005: brtrue IL_009b
IL_000a: ldc.i4.0
IL_000b: ldtoken ""C""
IL_0010: call ""System.Type System.Type.GetTypeFromHandle(System.RuntimeTypeHandle)""
IL_0015: ldc.i4.s 11
IL_0017: newarr ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo""
IL_001c: dup
IL_001d: ldc.i4.0
IL_001e: ldc.i4.0
IL_001f: ldnull
IL_0020: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0025: stelem.ref
IL_0026: dup
IL_0027: ldc.i4.1
IL_0028: ldc.i4.3
IL_0029: ldnull
IL_002a: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_002f: stelem.ref
IL_0030: dup
IL_0031: ldc.i4.2
IL_0032: ldc.i4.3
IL_0033: ldnull
IL_0034: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0039: stelem.ref
IL_003a: dup
IL_003b: ldc.i4.3
IL_003c: ldc.i4.3
IL_003d: ldnull
IL_003e: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0043: stelem.ref
IL_0044: dup
IL_0045: ldc.i4.4
IL_0046: ldc.i4.3
IL_0047: ldnull
IL_0048: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_004d: stelem.ref
IL_004e: dup
IL_004f: ldc.i4.5
IL_0050: ldc.i4.3
IL_0051: ldnull
IL_0052: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0057: stelem.ref
IL_0058: dup
IL_0059: ldc.i4.6
IL_005a: ldc.i4.3
IL_005b: ldnull
IL_005c: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0061: stelem.ref
IL_0062: dup
IL_0063: ldc.i4.7
IL_0064: ldc.i4.3
IL_0065: ldnull
IL_0066: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_006b: stelem.ref
IL_006c: dup
IL_006d: ldc.i4.8
IL_006e: ldc.i4.3
IL_006f: ldnull
IL_0070: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0075: stelem.ref
IL_0076: dup
IL_0077: ldc.i4.s 9
IL_0079: ldc.i4.3
IL_007a: ldnull
IL_007b: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0080: stelem.ref
IL_0081: dup
IL_0082: ldc.i4.s 10
IL_0084: ldc.i4.3
IL_0085: ldnull
IL_0086: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_008b: stelem.ref
IL_008c: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.Invoke(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable<Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo>)""
IL_0091: call ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>> System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>>.Create(System.Runtime.CompilerServices.CallSiteBinder)""
IL_0096: stsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>> C.<>o__0.<>p__0""
IL_009b: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>> C.<>o__0.<>p__0""
IL_00a0: ldfld ""System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic> System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>>.Target""
IL_00a5: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>> C.<>o__0.<>p__0""
IL_00aa: ldarg.1
IL_00ab: ldc.i4.1
IL_00ac: ldc.i4.2
IL_00ad: ldc.i4.3
IL_00ae: ldc.i4.4
IL_00af: ldc.i4.5
IL_00b0: ldc.i4.6
IL_00b1: ldc.i4.7
IL_00b2: ldc.i4.8
IL_00b3: ldc.i4.s 9
IL_00b5: ldc.i4.s 10
IL_00b7: callvirt ""dynamic System.Func<System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int, dynamic>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, int, int, int, int, int, int, int, int, int, int)""
IL_00bc: ret
}
");
}
[Fact]
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenMscorlib.cs
浏览文件 @
b248e82d
...
...
@@ -223,7 +223,7 @@ public class Object { }
/// Report CS0656 for missing Decimal to int conversion.
/// </summary>
[
WorkItem
(
530860
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/530860"
)]
[
Fact
(
Skip
=
"530860"
)
]
[
Fact
]
public
void
NoDecimalConversion
()
{
var
source1
=
...
...
@@ -248,8 +248,13 @@ static int M(decimal d)
var
compilation2
=
CreateCompilation
(
source2
,
new
[]
{
reference1
});
// Should report "CS0656: Missing compiler required member 'System.Decimal.op_Explicit_ToInt32'".
// Instead, we report no errors and assert during emit.
// no errors for compat reasons.
compilation2
.
VerifyDiagnostics
();
var
verifier
=
CompileAndVerify
(
compilation2
);
// The bug has been resolved as Won't Fix for being extremely niche scenario and being a compat concern.
// uncomment the following code if we are fixing this
//var verifier = CompileAndVerify(compilation2);
}
[
Fact
,
WorkItem
(
3593
,
"https://github.com/dotnet/roslyn/issues/3593"
)]
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenOverridingAndHiding.cs
浏览文件 @
b248e82d
...
...
@@ -2358,7 +2358,7 @@ public static void Main()
}
[
WorkItem
(
528172
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/528172"
)]
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/6190"
)
]
[
Fact
]
public
void
TestHideWithInaccessibleVirtualMember
()
{
// Tests:
...
...
@@ -2450,7 +2450,39 @@ public static void Main()
// from assembly 'Dev10, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
// is overriding a method that is not visible from that assembly.
Assert
.
Throws
(
typeof
(
PeVerifyException
),
()
=>
CompileAndVerify
(
outerCompilation
));
CompileAndVerify
(
outerCompilation
,
verify
:
false
).
VerifyIL
(
"Test.Main"
,
@"
{
// Code size 65 (0x41)
.maxstack 4
.locals init (Base2<int> V_0, //b2
System.Collections.Generic.List<int> V_1) //x
IL_0000: newobj ""Derived..ctor()""
IL_0005: newobj ""Derived..ctor()""
IL_000a: stloc.0
IL_000b: dup
IL_000c: ldc.i4.1
IL_000d: callvirt ""void Base<int>.Method<long>(int)""
IL_0012: dup
IL_0013: newobj ""System.Collections.Generic.List<int>..ctor()""
IL_0018: ldc.i4.1
IL_0019: callvirt ""void Base<int>.Method(System.Collections.Generic.List<int>, int)""
IL_001e: ldnull
IL_001f: stloc.1
IL_0020: ldloc.1
IL_0021: callvirt ""void Base<int>.Property.set""
IL_0026: ldloc.0
IL_0027: ldc.i4.1
IL_0028: callvirt ""void Base<int>.Method<long>(int)""
IL_002d: ldloc.0
IL_002e: newobj ""System.Collections.Generic.List<int>..ctor()""
IL_0033: ldc.i4.1
IL_0034: callvirt ""void Base<int>.Method(System.Collections.Generic.List<int>, int)""
IL_0039: ldloc.0
IL_003a: ldloc.1
IL_003b: callvirt ""void Base<int>.Property.set""
IL_0040: ret
}
"
);
}
[
Fact
]
...
...
src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs
浏览文件 @
b248e82d
...
...
@@ -2952,7 +2952,8 @@ static int F(string s)
/// Unique ids should not conflict with ids
/// from previous generation.
/// </summary>
[
Fact
(
Skip
=
"TODO"
)]
[
WorkItem
(
9847
,
"https://github.com/dotnet/roslyn/issues/9847"
)]
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/9847"
)]
public
void
UniqueIds
()
{
var
source0
=
...
...
@@ -5334,7 +5335,8 @@ .maxstack 2
/// Should not re-use locals if the method metadata
/// signature is unsupported.
/// </summary>
[
Fact
(
Skip
=
"TODO"
)]
[
WorkItem
(
9849
,
"https://github.com/dotnet/roslyn/issues/9849"
)]
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/9849"
)]
public
void
LocalType_UnsupportedSignatureContent
()
{
// Equivalent to C#, but with extra local and required modifier on
...
...
@@ -5418,7 +5420,8 @@ .maxstack 1
/// <summary>
/// Should not re-use locals with custom modifiers.
/// </summary>
[
Fact
(
Skip
=
"TODO"
)]
[
WorkItem
(
9848
,
"https://github.com/dotnet/roslyn/issues/9848"
)]
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/9848"
)]
public
void
LocalType_CustomModifiers
()
{
// Equivalent method signature to C#, but
...
...
src/Compilers/CSharp/Test/Emit/Emit/EmitMetadata.cs
浏览文件 @
b248e82d
...
...
@@ -2149,7 +2149,8 @@ private void CheckInternalMembers(NamedTypeSymbol type, bool isFromSource)
Assert
.
Null
(
member
);
}
[
Fact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/6190"
),
WorkItem
(
90
,
"https://github.com/dotnet/roslyn/issues/90"
)]
[
WorkItem
(
90
,
"https://github.com/dotnet/roslyn/issues/90"
)]
[
Fact
]
public
void
EmitWithNoResourcesAllPlatforms
()
{
var
comp
=
CreateCompilationWithMscorlib
(
"class Test { static void Main() { } }"
);
...
...
@@ -2162,18 +2163,10 @@ public void EmitWithNoResourcesAllPlatforms()
VerifyEmitWithNoResources
(
comp
,
Platform
.
X86
);
}
private
static
void
VerifyEmitWithNoResources
(
CSharpCompilation
comp
,
Platform
platform
)
private
void
VerifyEmitWithNoResources
(
CSharpCompilation
comp
,
Platform
platform
)
{
var
options
=
TestOptions
.
ReleaseExe
.
WithPlatform
(
platform
);
using
(
var
outputStream
=
new
MemoryStream
())
{
var
success
=
comp
.
WithOptions
(
options
).
Emit
(
outputStream
).
Success
;
Assert
.
True
(
success
);
var
peVerifyOutput
=
CLRHelpers
.
PeVerify
(
outputStream
.
ToImmutable
()).
Join
(
Environment
.
NewLine
);
Assert
.
Equal
(
string
.
Empty
,
peVerifyOutput
);
}
CompileAndVerify
(
comp
.
WithAssemblyName
(
"EmitWithNoResourcesAllPlatforms_"
+
platform
.
ToString
()).
WithOptions
(
options
));
}
[
Fact
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录