提交 04838e47 编写于 作者: J Jared Parsons

Tests passing

上级 3d719468
...@@ -1504,7 +1504,7 @@ .maxstack 8 ...@@ -1504,7 +1504,7 @@ .maxstack 8
} // end of class MyAttribute } // end of class MyAttribute
"; ";
var c = CreateStandardCompilationWithCustomILSource(@" var c = CreateCompilationWithCustomILSource(@"
[MyAttribute(typeof(MyAttribute))] [MyAttribute(typeof(MyAttribute))]
public class Test public class Test
{ {
......
...@@ -473,7 +473,7 @@ public void NoPiaIllegalGenericInstantiationSymbolForAssemblyRefsWithClassThatIn ...@@ -473,7 +473,7 @@ public void NoPiaIllegalGenericInstantiationSymbolForAssemblyRefsWithClassThatIn
{ {
//Test class that inherits Generic(Of NoPIAType) //Test class that inherits Generic(Of NoPIAType)
var localConsumer = CreateStandardCompilation(assemblyName: "Dummy", source: (string)null, var localConsumer = CreateCompilationWithMscorlib40(assemblyName: "Dummy", source: (string[])null,
references: new[] references: new[]
{ {
TestReferences.SymbolsTests.NoPia.NoPIAGenericsAsm1, TestReferences.SymbolsTests.NoPia.NoPIAGenericsAsm1,
...@@ -552,7 +552,7 @@ public List<FooStruct> Method4() ...@@ -552,7 +552,7 @@ public List<FooStruct> Method4()
var localType = CreateStandardCompilation(assemblyName: "Dummy", source: localTypeSource, var localType = CreateStandardCompilation(assemblyName: "Dummy", source: localTypeSource,
references: new[] { TestReferences.SymbolsTests.NoPia.GeneralPia.WithEmbedInteropTypes(true) }); references: new[] { TestReferences.SymbolsTests.NoPia.GeneralPia.WithEmbedInteropTypes(true) });
var localConsumer = CreateStandardCompilation(assemblyName: "Dummy", source: (string)null, var localConsumer = CreateStandardCompilation(assemblyName: "Dummy", source: (string[])null,
references: new MetadataReference[] references: new MetadataReference[]
{ {
TestReferences.SymbolsTests.NoPia.GeneralPiaCopy, TestReferences.SymbolsTests.NoPia.GeneralPiaCopy,
......
...@@ -344,10 +344,10 @@ public void HideLocalTypeDefinitions() ...@@ -344,10 +344,10 @@ public void HideLocalTypeDefinitions()
[ConditionalFact(typeof(ClrOnly), typeof(DesktopOnly))] [ConditionalFact(typeof(ClrOnly), typeof(DesktopOnly))]
public void LocalTypeSubstitution1_1() public void LocalTypeSubstitution1_1()
{ {
var LocalTypes1 = CreateStandardCompilation(s_sourceLocalTypes1_IL, options: TestOptions.ReleaseDll, assemblyName: "LocalTypes1"); var LocalTypes1 = CreateCompilationWithMscorlib40(s_sourceLocalTypes1_IL, options: TestOptions.ReleaseDll, assemblyName: "LocalTypes1");
CompileAndVerify(LocalTypes1); CompileAndVerify(LocalTypes1);
var LocalTypes2 = CreateStandardCompilation(s_sourceLocalTypes2_IL, options: TestOptions.ReleaseDll, assemblyName: "LocalTypes2"); var LocalTypes2 = CreateCompilationWithMscorlib40(s_sourceLocalTypes2_IL, options: TestOptions.ReleaseDll, assemblyName: "LocalTypes2");
CompileAndVerify(LocalTypes2); CompileAndVerify(LocalTypes2);
var assemblies1 = MetadataTestHelpers.GetSymbolsForReferences(new CSharpCompilation[] { LocalTypes1, LocalTypes2 }, var assemblies1 = MetadataTestHelpers.GetSymbolsForReferences(new CSharpCompilation[] { LocalTypes1, LocalTypes2 },
......
...@@ -730,7 +730,7 @@ static void Main() ...@@ -730,7 +730,7 @@ static void Main()
} }
} }
"; ";
var comp = CreateStandardCompilationWithCustomILSource(source, il, var comp = CreateCompilationWithCustomILSource(source, il,
options: TestOptions.ReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), options: TestOptions.ReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All),
references: new[] { CSharpRef }); references: new[] { CSharpRef });
......
...@@ -329,7 +329,7 @@ public static SyntaxTree ParseWithRoundTripCheck(string text, CSharpParseOptions ...@@ -329,7 +329,7 @@ public static SyntaxTree ParseWithRoundTripCheck(string text, CSharpParseOptions
string ilSource, string ilSource,
IEnumerable<MetadataReference> references = null, IEnumerable<MetadataReference> references = null,
CSharpCompilationOptions options = null, CSharpCompilationOptions options = null,
bool appendDefaultHeader = true) => CreateCompilationWithCustomILSource(source, ilSource, TargetFramework.NetStandard20, references, options, appendDefaultHeader); bool appendDefaultHeader = true) => CreateCompilationWithCustomILSource(source, ilSource, TargetFramework.Standard, references, options, appendDefaultHeader);
public static CSharpCompilation CreateCompilationWithCustomILSource( public static CSharpCompilation CreateCompilationWithCustomILSource(
string source, string source,
...@@ -359,11 +359,11 @@ public static SyntaxTree ParseWithRoundTripCheck(string text, CSharpParseOptions ...@@ -359,11 +359,11 @@ public static SyntaxTree ParseWithRoundTripCheck(string text, CSharpParseOptions
string assemblyName = "") => CreateCompilation(Parse(source, sourceFileName, parseOptions), TargetFramework.Net40, references, options, assemblyName); string assemblyName = "") => CreateCompilation(Parse(source, sourceFileName, parseOptions), TargetFramework.Net40, references, options, assemblyName);
public static CSharpCompilation CreateCompilationWithMscorlib40( public static CSharpCompilation CreateCompilationWithMscorlib40(
string[] sources, string[] source,
IEnumerable<MetadataReference> references = null, IEnumerable<MetadataReference> references = null,
CSharpCompilationOptions options = null, CSharpCompilationOptions options = null,
CSharpParseOptions parseOptions = null, CSharpParseOptions parseOptions = null,
string assemblyName = "") => CreateCompilation(sources, TargetFramework.Net40, references, options, parseOptions, assemblyName); string assemblyName = "") => CreateCompilation(source, TargetFramework.Net40, references, options, parseOptions, assemblyName);
public static CSharpCompilation CreateCompilationWithMscorlib45( public static CSharpCompilation CreateCompilationWithMscorlib45(
IEnumerable<SyntaxTree> source, IEnumerable<SyntaxTree> source,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册