Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
30f54fb1
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,发现更多精彩内容 >>
提交
30f54fb1
编写于
2月 08, 2018
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Emit test wokr
上级
75463028
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
40 deletion
+38
-40
src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs
...t/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs
+8
-10
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenShortCircuitOperatorTests.cs
...arp/Test/Emit/CodeGen/CodeGenShortCircuitOperatorTests.cs
+17
-17
src/Compilers/CSharp/Test/Emit/CodeGen/ForLoopsTests.cs
src/Compilers/CSharp/Test/Emit/CodeGen/ForLoopsTests.cs
+5
-5
src/Compilers/CSharp/Test/Emit/CodeGen/UnsafeTests.cs
src/Compilers/CSharp/Test/Emit/CodeGen/UnsafeTests.cs
+7
-7
src/Compilers/CSharp/Test/Emit/Emit/DynamicAnalysis/DynamicInstrumentationTests.cs
.../Emit/Emit/DynamicAnalysis/DynamicInstrumentationTests.cs
+1
-1
未找到文件。
src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.cs
浏览文件 @
30f54fb1
...
...
@@ -63,7 +63,6 @@ public static void Main()
// Diagnostic(ErrorCode.WRN_UseSwitchInsteadOfAttribute).WithArguments(@"/keyfile", "AssemblyKeyFile"),
// Diagnostic(ErrorCode.WRN_UseSwitchInsteadOfAttribute).WithArguments(@"/keycontainer", "AssemblyKeyName")
var
c
=
CreateStandardCompilation
(
source
,
references
:
new
[]
{
SystemRef
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
new
DesktopStrongNameProvider
()));
c
.
VerifyDiagnostics
(
...
...
@@ -1735,15 +1734,15 @@ void TestET()
}
"
;
var
comp1
=
Create
StandardCompilation
(
source1
,
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm1"
);
var
comp1
=
Create
CompilationWithMscorlib45
(
source1
,
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm1"
);
comp1
.
VerifyDiagnostics
();
var
ref1
=
new
CSharpCompilationReference
(
comp1
);
var
comp2
=
Create
StandardCompilation
(
source2
,
new
[]
{
ref1
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm2"
);
var
comp2
=
Create
CompilationWithMscorlib45
(
source2
,
new
[]
{
ref1
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm2"
);
comp2
.
VerifyDiagnostics
();
var
ref2
=
new
CSharpCompilationReference
(
comp2
);
var
comp3
=
Create
StandardCompilation
(
source3
,
new
[]
{
SystemCoreRef
,
ref1
,
ref2
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm3"
);
var
comp3
=
Create
CompilationWithMscorlib45
(
source3
,
new
[]
{
SystemCoreRef
,
ref1
,
ref2
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm3"
);
comp3
.
VerifyDiagnostics
();
// Note: calls B.M, not A.M, since asm1 is not accessible.
...
...
@@ -1852,19 +1851,19 @@ void TestET()
}
"
;
var
comp1
=
Create
StandardCompilation
(
source1
,
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm1"
);
var
comp1
=
Create
CompilationWithMscorlib45
(
source1
,
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm1"
);
comp1
.
VerifyDiagnostics
();
var
ref1
=
new
CSharpCompilationReference
(
comp1
);
var
comp2
=
Create
StandardCompilation
(
source2
,
new
[]
{
ref1
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm2"
);
var
comp2
=
Create
CompilationWithMscorlib45
(
source2
,
new
[]
{
ref1
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm2"
);
comp2
.
VerifyDiagnostics
();
var
ref2
=
new
CSharpCompilationReference
(
comp2
);
var
comp3
=
Create
StandardCompilation
(
source3
,
new
[]
{
ref1
,
ref2
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm3"
);
var
comp3
=
Create
CompilationWithMscorlib45
(
source3
,
new
[]
{
ref1
,
ref2
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm3"
);
comp3
.
VerifyDiagnostics
();
var
ref3
=
new
CSharpCompilationReference
(
comp3
);
var
comp4
=
Create
StandardCompilation
(
source4
,
new
[]
{
SystemCoreRef
,
ref1
,
ref2
,
ref3
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm4"
);
var
comp4
=
Create
CompilationWithMscorlib45
(
source4
,
new
[]
{
SystemCoreRef
,
ref1
,
ref2
,
ref3
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm4"
);
comp4
.
VerifyDiagnostics
();
// Note: calls C.M, not A.M, since asm2 is not accessible (stops search).
...
...
@@ -2014,7 +2013,6 @@ void Test()
"
;
var
comp1
=
CreateStandardCompilation
(
source1
,
new
[]
{
SystemCoreRef
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm1"
);
...
...
@@ -2024,7 +2022,7 @@ void Test()
var
ref2
=
CompileIL
(
source2
,
prependDefaultHeader
:
false
);
var
comp3
=
CreateStandardCompilation
(
source3
,
new
[]
{
SystemCoreRef
,
ref1
,
ref2
},
new
[]
{
ref1
,
ref2
},
options
:
TestOptions
.
ReleaseDll
.
WithStrongNameProvider
(
s_defaultDesktopProvider
),
assemblyName
:
"asm3"
);
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenShortCircuitOperatorTests.cs
浏览文件 @
30f54fb1
...
...
@@ -1006,7 +1006,7 @@ static string ToStr(this object arg)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
},
expectedOutput
:
"NULL#System.Int32[]"
);
var
comp
=
CompileStandardAndVerify
(
source
,
expectedOutput
:
"NULL#System.Int32[]"
);
comp
.
VerifyIL
(
"C.Test"
,
@"
{
// Code size 37 (0x25)
...
...
@@ -1050,7 +1050,7 @@ static void Test(dynamic x)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
"NULL#System.Int32[]"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
"NULL#System.Int32[]"
);
comp
.
VerifyIL
(
"C.Test"
,
@"
{
// Code size 355 (0x163)
...
...
@@ -1196,7 +1196,7 @@ static void Test(dynamic x)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
"NULL#y"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
"NULL#y"
);
}
[
Fact
]
...
...
@@ -1219,7 +1219,7 @@ static void Test(string s, dynamic ds)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
"NULL#-1"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
"NULL#-1"
);
}
[
Fact
]
...
...
@@ -1243,7 +1243,7 @@ static void Test(int[] x, dynamic i)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
"NULL#y"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
"NULL#y"
);
}
[
Fact
]
...
...
@@ -1267,7 +1267,7 @@ static void Test(dynamic x)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
"NULL#3"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
"NULL#3"
);
}
[
Fact
]
...
...
@@ -1291,7 +1291,7 @@ static void Test(dynamic x)
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
"NULL#3"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
"NULL#3"
);
}
[
Fact
]
...
...
@@ -1509,7 +1509,7 @@ public static class C1
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
""
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
""
);
comp
.
VerifyIL
(
"C.Main"
,
@"
{
// Code size 82 (0x52)
...
...
@@ -1627,7 +1627,7 @@ public static class C1
}
}"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@"3
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
@"3
1"
);
comp
.
VerifyIL
(
"C.Main"
,
@"
{
...
...
@@ -2633,7 +2633,7 @@ static void Main(string[] args)
}
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
MetadataReference
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@"False
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
MetadataReference
[]
{
CSharpRef
},
expectedOutput
:
@"False
True
False
False"
);
...
...
@@ -2692,7 +2692,7 @@ static void Main(string[] args)
}
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
MetadataReference
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@"False
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
MetadataReference
[]
{
CSharpRef
},
expectedOutput
:
@"False
True
False
False"
);
...
...
@@ -3194,7 +3194,7 @@ public static void CheckT<T>(this T x)
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@"System.Nullable`1[System.Int64]"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
@"System.Nullable`1[System.Int64]"
);
comp
.
VerifyIL
(
"Test.Test0<T>(T)"
,
@"
{
// Code size 21 (0x15)
...
...
@@ -3240,7 +3240,7 @@ public static void CheckT<T>(this T x)
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@"System.Nullable`1[System.Int64]"
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
@"System.Nullable`1[System.Int64]"
);
comp
.
VerifyIL
(
"Test.Test0<T>(ref T)"
,
@"
{
// Code size 46 (0x2e)
...
...
@@ -3294,7 +3294,7 @@ static void Main()
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@""
);
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
@""
);
comp
.
VerifyIL
(
"Test.Test0<T>(T)"
,
@"
{
// Code size 27 (0x1b)
...
...
@@ -3365,7 +3365,7 @@ interface I1
"
;
var
comp
=
CreateCompilationWithMscorlib45
(
source
,
references
:
new
[]
{
SystemCoreRef
,
CSharpRef
});
var
comp
=
CreateCompilationWithMscorlib45
(
source
,
references
:
new
[]
{
CSharpRef
});
base
.
CompileAndVerify
(
comp
);
}
...
...
@@ -3414,7 +3414,7 @@ interface I1
int CallAsync(int x);
}
"
;
var
comp
=
CreateCompilationWithMscorlib45
(
source
,
references
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
options
:
TestOptions
.
ReleaseExe
);
var
comp
=
CreateCompilationWithMscorlib45
(
source
,
references
:
new
[]
{
CSharpRef
},
options
:
TestOptions
.
ReleaseExe
);
base
.
CompileAndVerify
(
comp
,
expectedOutput
:
"420"
);
}
...
...
@@ -4093,7 +4093,7 @@ static bool Test4(ref C1 c)
}
}
"
;
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
SystemCoreRef
,
CSharpRef
},
expectedOutput
:
@" >
var
comp
=
CompileStandardAndVerify
(
source
,
additionalRefs
:
new
[]
{
CSharpRef
},
expectedOutput
:
@" >
False
False
<
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/ForLoopsTests.cs
浏览文件 @
30f54fb1
...
...
@@ -1539,7 +1539,7 @@ public void Next()
}
}
"
;
CompileStandardAndVerify
(
text
,
additionalRefs
:
new
MetadataReference
[]
{
CSharpRef
,
SystemCoreRef
},
expectedOutput
:
@"Initialize
CompileStandardAndVerify
(
text
,
additionalRefs
:
new
MetadataReference
[]
{
CSharpRef
},
expectedOutput
:
@"Initialize
Done
Next
Done
...
...
@@ -1614,7 +1614,7 @@ static void Main(string[] args)
}
}
"
;
var
comp
=
CompileStandardAndVerify
(
text
,
additionalRefs
:
new
[]
{
LinqAssemblyRef
},
expectedOutput
:
@"1
var
comp
=
CompileStandardAndVerify
(
text
,
expectedOutput
:
@"1
2
3"
);
}
...
...
@@ -1650,7 +1650,7 @@ private static IEnumerable<string> fun()
}
}
"
;
var
comp
=
CompileStandardAndVerify
(
text
,
additionalRefs
:
new
[]
{
LinqAssemblyRef
},
expectedOutput
:
@"1
var
comp
=
CompileStandardAndVerify
(
text
,
expectedOutput
:
@"1
2
3"
);
}
...
...
@@ -1674,7 +1674,7 @@ static void Main(string[] args)
}
}
"
;
CompileStandardAndVerify
(
text
,
additionalRefs
:
new
[]
{
SystemCoreRef
},
expectedOutput
:
@"1
CompileStandardAndVerify
(
text
,
expectedOutput
:
@"1
4
9
16"
);
...
...
@@ -1699,7 +1699,7 @@ static void Main(string[] args)
}
"
;
var
comp
=
CompileStandardAndVerify
(
text
,
additionalRefs
:
new
[]
{
SystemCoreRef
},
expectedOutput
:
@"1
var
comp
=
CompileStandardAndVerify
(
text
,
expectedOutput
:
@"1
4
9
16"
);
...
...
src/Compilers/CSharp/Test/Emit/CodeGen/UnsafeTests.cs
浏览文件 @
30f54fb1
...
...
@@ -690,7 +690,7 @@ static class Extensions
public static void M(this S s, int x, int y) { Console.Write(3); }
}
"
;
var
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
additionalRefs
:
new
[]
{
LinqAssemblyRef
},
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
var
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
compVerifier
.
VerifyIL
(
"S.Main"
,
@"
{
...
...
@@ -712,7 +712,7 @@ .maxstack 3
}
"
);
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
additionalRefs
:
new
[]
{
LinqAssemblyRef
},
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
compVerifier
.
VerifyIL
(
"S.Main"
,
@"
{
...
...
@@ -766,7 +766,7 @@ static class Extensions
public static void M(this S s, int x, int y) { Console.Write(3); }
}
"
;
var
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
additionalRefs
:
new
[]
{
LinqAssemblyRef
},
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
var
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
compVerifier
.
VerifyIL
(
"S.Test(ref S*)"
,
@"
{
...
...
@@ -789,7 +789,7 @@ .maxstack 3
}
"
);
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
additionalRefs
:
new
[]
{
LinqAssemblyRef
},
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
compVerifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
expectedOutput
:
@"123"
,
verify
:
Verification
.
Fails
);
compVerifier
.
VerifyIL
(
"S.Test(ref S*)"
,
@"
{
...
...
@@ -9154,7 +9154,7 @@ static void Main()
}
"
;
var
verifier
=
CompileStandardAndVerify
(
text
,
new
[]
{
SystemCoreRef
},
options
:
TestOptions
.
UnsafeReleaseExe
,
verify
:
Verification
.
Fails
,
expectedOutput
:
@"
var
verifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseExe
,
verify
:
Verification
.
Fails
,
expectedOutput
:
@"
2
2"
);
...
...
@@ -9206,7 +9206,7 @@ public struct S2
}
"
;
var
verifier
=
CompileStandardAndVerify
(
text
,
new
[]
{
SystemCoreRef
},
options
:
TestOptions
.
UnsafeReleaseDll
.
WithConcurrentBuild
(
false
),
verify
:
Verification
.
Passes
);
var
verifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseDll
.
WithConcurrentBuild
(
false
),
verify
:
Verification
.
Passes
);
}
[
Fact
,
WorkItem
(
531327
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/531327"
)]
...
...
@@ -9230,7 +9230,7 @@ unsafe struct S1
"
;
var
verifier
=
CompileStandardAndVerify
(
text
,
new
[]
{
SystemCoreRef
},
options
:
TestOptions
.
UnsafeReleaseDll
.
WithConcurrentBuild
(
false
),
verify
:
Verification
.
Fails
);
var
verifier
=
CompileStandardAndVerify
(
text
,
options
:
TestOptions
.
UnsafeReleaseDll
.
WithConcurrentBuild
(
false
),
verify
:
Verification
.
Fails
);
}
[
Fact
,
WorkItem
(
748530
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/748530"
)]
...
...
src/Compilers/CSharp/Test/Emit/Emit/DynamicAnalysis/DynamicInstrumentationTests.cs
浏览文件 @
30f54fb1
...
...
@@ -3211,7 +3211,7 @@ private static void AssertInstrumented(CompilationVerifier verifier, string qual
Assert
.
True
(
expected
==
instrumented
,
$"Method '
{
qualifiedMethodName
}
' should
{(
expected
?
"be"
:
"not be"
)}
instrumented. Actual IL:
{
Environment
.
NewLine
}{
il
}
"
);
}
private
CompilationVerifier
CompileAndVerify
(
string
source
,
string
expectedOutput
=
null
,
CompilationOptions
options
=
null
,
Verification
verify
=
Verification
.
Passes
)
private
CompilationVerifier
CompileAndVerify
(
string
source
,
string
expectedOutput
=
null
,
C
SharpC
ompilationOptions
options
=
null
,
Verification
verify
=
Verification
.
Passes
)
{
return
base
.
CompileStandardAndVerify
(
source
,
expectedOutput
:
expectedOutput
,
additionalRefs
:
s_refs
,
options
:
(
options
??
TestOptions
.
ReleaseExe
).
WithDeterministic
(
true
),
emitOptions
:
EmitOptions
.
Default
.
WithInstrumentationKinds
(
ImmutableArray
.
Create
(
InstrumentationKind
.
TestCoverage
)),
verify
:
verify
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录