333 references to CreateCompilationWithMscorlib40
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (155)
CodeGen\CodeGenAsyncMainTests.cs (13)
40var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.WithMainTypeName("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 65var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 93var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.WithMainTypeName("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 118var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 159var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 202var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 233var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 270var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 306var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 337var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 1411var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 1465var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 1520var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1));
CodeGen\CodeGenDeconstructTests.cs (3)
1460var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular7, options: TestOptions.DebugExe); 1503var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular7, options: TestOptions.DebugExe); 1585var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular7);
CodeGen\CodeGenDynamicTests.cs (11)
144return CreateCompilationWithMscorlib40(source, new[] { systemCore ?? SystemCoreRef }, assemblyName: GetUniqueName()).EmitToImageReference(); 246CreateCompilationWithMscorlib40(source, new[] { SystemCoreRef, csrtRef }).VerifyEmitDiagnostics( 271CreateCompilationWithMscorlib40(source, new[] { SystemCoreRef, csrtRef }).VerifyEmitDiagnostics(); 277var systemCoreRef = CreateCompilationWithMscorlib40(SystemCoreSource, assemblyName: GetUniqueName()).EmitToImageReference(); 290CreateCompilationWithMscorlib40(source, new[] { systemCoreRef, csrtRef }); 296var systemCoreRef = CreateCompilationWithMscorlib40(SystemCoreSource, assemblyName: GetUniqueName()).EmitToImageReference(); 317var systemCoreRef = CreateCompilationWithMscorlib40(SystemCoreSource, assemblyName: GetUniqueName()).EmitToImageReference(); 456var systemCoreRef = CreateCompilationWithMscorlib40(systemCoreSource, assemblyName: GetUniqueName()).EmitToImageReference(); 468CreateCompilationWithMscorlib40(source, new[] { systemCoreRef, csrtRef }).VerifyEmitDiagnostics( 485var systemCoreRef = CreateCompilationWithMscorlib40(systemCoreSource, assemblyName: GetUniqueName()).EmitToImageReference(); 497CreateCompilationWithMscorlib40(source, new[] { systemCoreRef, csrtRef }).VerifyEmitDiagnostics(
CodeGen\CodeGenMscorlib.cs (1)
178CreateCompilationWithMscorlib40(text).VerifyDiagnostics();
CodeGen\CodeGenScriptTests.cs (1)
603var compilation = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Script, options: TestOptions.DebugExe);
CodeGen\CodeGenTupleEqualityTests.cs (5)
143var comp = CreateCompilationWithMscorlib40(source); 2058var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe); 2098var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe); 2154var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe); 4978var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe);
CodeGen\CodeGenTupleTest.cs (118)
404var comp1 = CreateCompilationWithMscorlib40(src1, references: s_valueTupleRefs); 407var comp2 = CreateCompilationWithMscorlib40(src2, 411var comp3 = CreateCompilationWithMscorlib40(src2, 1577CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }).VerifyDiagnostics( 1682var comp1 = CreateCompilationWithMscorlib40(source2 + source1, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, 1687var compLib = CreateCompilationWithMscorlib40(source1, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, 1691var comp2 = CreateCompilationWithMscorlib40(source2, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, compLibCompilationRef }, 1696var comp3 = CreateCompilationWithMscorlib40(source2, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, compLib.EmitToImageReference() }, 2940var comp = CreateCompilationWithMscorlib40(source); 2968var comp = CreateCompilationWithMscorlib40(source, assemblyName: "comp"); 3335var comp = CreateCompilationWithMscorlib40(source); 3414var comp = CreateCompilationWithMscorlib40(source); 3732var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular7); 3768var libComp = CreateCompilationWithMscorlib40(lib_cs, 3772var comp7 = CreateCompilationWithMscorlib40(source_cs, 3784var comp7_1 = CreateCompilationWithMscorlib40(source_cs, assemblyName: "UseSiteDiagnosticOnTupleField_comp7_1", 3884var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.DebugDll, parseOptions: TestOptions.Regular7_1); 4316var comp1 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp1"); 4317var comp2 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp2"); 4339var comp1 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp1"); 4340var comp2 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp2"); 4362var comp1 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp1"); 4363var comp2 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp2"); 4422var comp1 = CreateCompilationWithMscorlib40(source1); 4424var comp2 = CreateCompilationWithMscorlib40(source2); 4568var comp = CreateCompilationWithMscorlib40(source, assemblyName: "comp"); 5438var comp = CreateCompilationWithMscorlib40(source); 5523var comp = CreateCompilationWithMscorlib40(source, references: new[] { comp1.ToMetadataReference(), comp2.ToMetadataReference() }); 5531comp = CreateCompilationWithMscorlib40(source, 5807var tupleComp = CreateCompilationWithMscorlib40(@" 5838var tupleComp = CreateCompilationWithMscorlib40(@" 5867var tupleComp = CreateCompilationWithMscorlib40(trivial2uple); 7157CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 10093var comp = CreateCompilationWithMscorlib40(source, references: s_valueTupleRefs); 10698var comp = CreateCompilationWithMscorlib40(source); 10737var comp = CreateCompilationWithMscorlib40(source); 12919var comp = CreateCompilationWithMscorlib40(source); 12998var libComp = CreateCompilationWithMscorlib40(lib_cs); 13001var comp = CreateCompilationWithMscorlib40(source, references: new[] { libComp.EmitToImageReference() }); 13295var comp = CreateCompilationWithMscorlib40(source); 13402var comp = CreateCompilationWithMscorlib40(source); 13420var comp = CreateCompilationWithMscorlib40(source, assemblyName: "test"); 13441var comp = CreateCompilationWithMscorlib40(source, assemblyName: "test"); 13907var comp1 = CreateCompilationWithMscorlib40(source2 + source1, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, 13912var comp2 = CreateCompilationWithMscorlib40(source2, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, 13922var comp4 = CreateCompilationWithMscorlib40(source1, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, comp2.EmitToImageReference() }, 14072var comp1 = CreateCompilationWithMscorlib40(source2 + source1, references: s_valueTupleRefs, 14077var comp2 = CreateCompilationWithMscorlib40(source2, references: s_valueTupleRefs, 14087var comp4 = CreateCompilationWithMscorlib40(source1, references: (new[] { comp2.EmitToImageReference() }).Concat(s_valueTupleRefs), 14499var comp1 = CreateCompilationWithMscorlib40(source1, 14504var comp2 = CreateCompilationWithMscorlib40(source2, references: new[] { comp1.ToMetadataReference() }, 14769var lib = CreateCompilationWithMscorlib40(tuple, options: TestOptions.ReleaseDll); 14772var consumer1 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.ToMetadataReference() }); 14775var consumer2 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.EmitToImageReference() }); 15030var lib = CreateCompilationWithMscorlib40(tuple, options: TestOptions.ReleaseDll); 15033var consumer1 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.ToMetadataReference() }); 15036var consumer2 = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseExe, references: new[] { lib.EmitToImageReference() }); 16563var comp = CreateCompilationWithMscorlib40(new[] { tree }); 16600var comp = CreateCompilationWithMscorlib40(new[] { tree }); 16788var comp1 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp1"); 16789var comp2 = CreateCompilationWithMscorlib40(trivial2uple, assemblyName: "comp2"); 16791var comp = CreateCompilationWithMscorlib40(source, 16802comp = CreateCompilationWithMscorlib40(source, 16813comp = CreateCompilationWithMscorlib40(source, 16853var comp = CreateCompilationWithMscorlib40(source3, 16864comp = CreateCompilationWithMscorlib40(source3, 16885comp = CreateCompilationWithMscorlib40(source4, 16925var comp = CreateCompilationWithMscorlib40(source3, 16939comp = CreateCompilationWithMscorlib40(source3, 16960comp = CreateCompilationWithMscorlib40(source4, 17022var comp = CreateCompilationWithMscorlib40(source3, 17045comp = CreateCompilationWithMscorlib40(source4, 17067comp = CreateCompilationWithMscorlib40(source5, 17465var tupleComp = CreateCompilationWithMscorlib40( 19056var tupleComp1 = CreateCompilationWithMscorlib40(trivial2uple + trivial3uple + trivialRemainingTuples); 19095var tupleComp1 = CreateCompilationWithMscorlib40(trivial2uple + trivial3uple + trivialRemainingTuples); 19803var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef, SystemCoreRef }); 22271var lib = CreateCompilationWithMscorlib40(lib_cs, references: s_valueTupleRefs); 22274var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.ToMetadataReference() }); 22311var lib = CreateCompilationWithMscorlib40(lib_cs, references: s_valueTupleRefs); 22314var comp = CreateCompilationWithMscorlib40(source, references: new[] { lib.ToMetadataReference() }); 22346var comp = CreateCompilationWithMscorlib40(source); 22393var comp = CreateCompilationWithMscorlib40(source, 22479var compLib = CreateCompilationWithMscorlib40(lib_cs, options: TestOptions.ReleaseDll); 22481var comp = CreateCompilationWithMscorlib40(source, references: new[] { compLib.ToMetadataReference() }); 22807var libComp = CreateCompilationWithMscorlib40(libSource, assemblyName: "lib"); 22810var comp = CreateCompilationWithMscorlib40(source, assemblyName: "comp", references: new[] { libComp.EmitToImageReference() }, options: TestOptions.DebugExe); 23172var comp0 = CreateCompilationWithMscorlib40(source0, assemblyName: "92872377-08d1-4723-8906-a43b03e56ed3"); 23190var comp1 = CreateCompilationWithMscorlib40(source1, references: new[] { ref0 }); 23198var comp = CreateCompilationWithMscorlib40(source, references: new[] { ref1 }); 23220var comp0v1 = CreateCompilationWithMscorlib40(source0v1, assemblyName: "A", options: signedDllOptions); 23228var comp0v2 = CreateCompilationWithMscorlib40(source0v2, assemblyName: "A", options: signedDllOptions); 23235var comp1 = CreateCompilationWithMscorlib40(source1, references: new[] { ref0v1 }); 23246var comp2 = CreateCompilationWithMscorlib40(source2, references: new[] { ref1, ref0v1 }); 23254var comp = CreateCompilationWithMscorlib40(source, references: new[] { ref0v2, ref1, ref2 }); 23981var compilation = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleLegacyRef }); 24174var compilation = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }); 25274var comp = CreateCompilationWithMscorlib40(new[] { source, tuplelib_cs }, 25364var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }); 25393var comp = CreateCompilationWithMscorlib40( 25424var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.DebugExe); 25443var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }); 25464var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular8); 25494var comp = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }); 25545var comp = CreateCompilationWithMscorlib40( 26420var lib = CreateCompilationWithMscorlib40(lib_cs, references: s_valueTupleRefs); 26433var comp = CreateCompilationWithMscorlib40(source_cs, references: new[] { libRef }); 26445var executeComp = CreateCompilationWithMscorlib40(executable_cs, 26464var missingContainer = CreateCompilationWithMscorlib40(missingContainer_cs, references: s_valueTupleRefs); 26482var lib = CreateCompilationWithMscorlib40(lib_cs, references: new[] { missingContainerRef, SystemRuntimeFacadeRef, ValueTupleRef }); 26497var comp = CreateCompilationWithMscorlib40(source_cs, references: references); 26510var executeComp = CreateCompilationWithMscorlib40(executable_cs, 26527var missingContainer = CreateCompilationWithMscorlib40(missingContainer_cs, references: s_valueTupleRefs); 26541var lib = CreateCompilationWithMscorlib40(lib_cs, references: new[] { SystemRuntimeFacadeRef, ValueTupleRef, missingContainerRef }); 26564var comp = CreateCompilationWithMscorlib40(source_cs, references: new[] { libRef }); // missing System.ValueTuple and MissingContainer 26567var executeComp = CreateCompilationWithMscorlib40(executable_cs, 26572var comp2 = CreateCompilationWithMscorlib40(source_cs, references: new[] { libRef, missingContainerRef }); // missing System.ValueTuple 26575var executeComp2 = CreateCompilationWithMscorlib40(executable_cs,
Emit\EmitMetadataTests.cs (3)
2232var peStream = CreateCompilationWithMscorlib40( 2421var peStream = CreateCompilationWithMscorlib40( 2680var comAssembly = CreateCompilationWithMscorlib40(@"
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
PDB\PDBUsingTests.cs (2)
2973var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), references: new[] { SystemCoreRef.WithAliases(new[] { "A" }), SystemDataRef }); 3317var c = CreateCompilationWithMscorlib40(sources, new[] { SystemCoreRef.WithAliases(ImmutableArray.Create("A")) });
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (117)
Attributes\AttributeTests.cs (12)
2301var comp = CreateCompilationWithMscorlib40(source); 4046var source = CreateCompilationWithMscorlib40(@" 8310CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 8420var compilation = CreateCompilationWithMscorlib40(source); 8451var comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp0").ToMetadataReference(); 8452CreateCompilationWithMscorlib40(source, references: new[] { comp1 }).VerifyDiagnostics( 8476comp1 = CreateCompilationWithMscorlib40(source2, assemblyName: "Temp1").ToMetadataReference(); 8478var comp3 = CreateCompilationWithMscorlib40(source4, references: new[] { comp1, comp2 }); 8491comp3 = CreateCompilationWithMscorlib40(source5, references: new[] { comp1, comp2 }); 8518comp3 = CreateCompilationWithMscorlib40(source6, references: new[] { comp1, comp2 }); 8533comp3 = CreateCompilationWithMscorlib40(source7, references: new[] { comp1, comp2 }); 10019var compilation1 = CreateCompilationWithMscorlib40(source1, options: TestOptions.DebugDll);
Attributes\AttributeTests_Assembly.cs (31)
372var neutral = CreateCompilationWithMscorlib40( 380var de = CreateCompilationWithMscorlib40( 390var en_us = CreateCompilationWithMscorlib40( 403compilation = CreateCompilationWithMscorlib40( 422compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.EmitToImageReference() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "20"); 435compilation = CreateCompilationWithMscorlib40( 451compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.EmitToImageReference() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "25"); 454compilation = CreateCompilationWithMscorlib40( 470compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.EmitToImageReference() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "40"); 488compilation = CreateCompilationWithMscorlib40( 505compilation = CreateCompilationWithMscorlib40("", new MetadataReference[] { compilation.EmitToImageReference() }, TestOptions.ReleaseDll, assemblyName: assemblyNameBase + "60"); 1013var netmoduleCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseModule, references: references, assemblyName: assemblyName); 1073var consoleappCompilation = CreateCompilationWithMscorlib40( 1120consoleappCompilation = CreateCompilationWithMscorlib40( 1271var consoleappCompilation = CreateCompilationWithMscorlib40(consoleappSource, references: new[] { GetNetModuleWithAssemblyAttributesRef() }, options: TestOptions.ReleaseExe); 1323var consoleappCompilation = CreateCompilationWithMscorlib40(consoleappSource, references: new[] { GetNetModuleWithAssemblyAttributesRef() }, options: TestOptions.ReleaseExe); 1374var consoleappCompilation = CreateCompilationWithMscorlib40(consoleappSource, references: new[] { GetNetModuleWithAssemblyAttributesRef() }, options: TestOptions.ReleaseExe); 1419var compilation = CreateCompilationWithMscorlib40(consoleappSource, references: new[] { netmodule1Ref }, options: TestOptions.ReleaseExe); 1432compilation = CreateCompilationWithMscorlib40(netmodule2Source, options: TestOptions.ReleaseModule, references: new[] { netmodule1Ref }); 1439compilation = CreateCompilationWithMscorlib40("", options: TestOptions.ReleaseDll, references: new[] { netmodule1Ref, netmodule2Ref }); 1497var compilation = CreateCompilationWithMscorlib40(source, references: new[] { GetNetModuleWithAssemblyAttributesRef() }, options: TestOptions.ReleaseDll); 1520var defsRef = CreateCompilationWithMscorlib40(defaultHeaderString + s_defaultNetModuleSourceBody).ToMetadataReference(); 1523var compilation = CreateCompilationWithMscorlib40(source1, references: new[] { defsRef, netmodule1Ref }, options: TestOptions.ReleaseDll); 1533compilation = CreateCompilationWithMscorlib40("", references: new[] { defsRef, netmodule1Ref, netmodule2Ref }, options: TestOptions.ReleaseDll); 1576var compilation = CreateCompilationWithMscorlib40(source, references: new[] { netmoduleRef }, options: TestOptions.ReleaseDll); 1629var compilation = CreateCompilationWithMscorlib40(source, references: new[] { netmoduleDefsRef, netmodule0Ref, netmodule1Ref, netmodule2Ref, netmodule3Ref }, options: TestOptions.ReleaseDll); 1671var compilation = CreateCompilationWithMscorlib40(source, references: new[] { netmoduleRef }, options: TestOptions.ReleaseDll); 1718var compilation = CreateCompilationWithMscorlib40(source, references: new[] { netmoduleRef }, options: TestOptions.ReleaseDll); 1744var appCompilation = CreateCompilationWithMscorlib40(app, references: new[] { netModuleRef }, options: TestOptions.ReleaseDll); 1750appCompilation = CreateCompilationWithMscorlib40(app, references: new[] { netModuleRef, Net40.References.SystemCore }, options: TestOptions.ReleaseDll); 1784var appCompilation = CreateCompilationWithMscorlib40(app, references: new[] { netModuleRef }, options: TestOptions.ReleaseDll);
Attributes\AttributeTests_Dynamic.cs (1)
103var comp = CreateCompilationWithMscorlib40(s_dynamicTestSource, options: TestOptions.UnsafeReleaseDll, references: new[] { SystemCoreRef, ValueTupleRef, SystemRuntimeFacadeRef });
Attributes\AttributeTests_IsByRefLike.cs (3)
572var comAssembly = CreateCompilationWithMscorlib40(@" 608var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) }); 611var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.EmitToImageReference(embedInteropTypes: true) });
Attributes\AttributeTests_Locations.cs (1)
582CreateCompilationWithMscorlib40(source).VerifyDiagnostics(
Attributes\AttributeTests_Nullable.cs (5)
229var valueTuple_comp = CreateCompilationWithMscorlib40(valueTuple_source); 241var tupleElementNamesAttribute_comp = CreateCompilationWithMscorlib40(tupleElementNamesAttribute_source); 256var lib1_comp = CreateCompilationWithMscorlib40(lib1_source, references: new[] { getReference(valueTuple_comp), getReference(tupleElementNamesAttribute_comp) }); 263var lib2_comp = CreateCompilationWithMscorlib40(lib2_source, references: new[] { getReference(lib1_comp), getReference(valueTuple_comp) }); // missing TupleElementNamesAttribute 325var comp = CreateCompilationWithMscorlib40(source);
Attributes\AttributeTests_ReadOnlyStruct.cs (3)
564var comAssembly = CreateCompilationWithMscorlib40(@" 600var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) }); 603var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.EmitToImageReference(embedInteropTypes: true) });
Attributes\AttributeTests_RefReadOnly.cs (3)
1286var comAssembly = CreateCompilationWithMscorlib40(@" 1327var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) }); 1330var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.EmitToImageReference(embedInteropTypes: true) });
Attributes\AttributeTests_Security.cs (22)
103CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 142CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 185var compilation = CreateCompilationWithMscorlib40(source); 229var compilation = CreateCompilationWithMscorlib40(source); 319CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 463CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 565CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 670var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll, assemblyName: "Test"); 723var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 766var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll, parseOptions: TestOptions.Regular9); 804var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll, parseOptions: TestOptions.RegularPreview); 844var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 897var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 949var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 1009var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 1075var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 1137var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 1200var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseDll); 1303var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.UnsafeReleaseDll); 1383var compilation = CreateCompilationWithMscorlib40(source, options: TestOptions.UnsafeReleaseDll); 1550CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 1586CreateCompilationWithMscorlib40(source, options: TestOptions.DebugDll.WithXmlReferenceResolver(resolver)).VerifyDiagnostics(
Attributes\AttributeTests_Synthesized.cs (1)
1608var compilation = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.CreateTestOptions(outputKind, OptimizationLevel.Release, allowUnsafe: true));
Attributes\AttributeTests_Tuples.cs (4)
116var comp = CreateCompilationWithMscorlib40(s_tuplesTestSource, 129var comp = CreateCompilationWithMscorlib40( 655var comp = CreateCompilationWithMscorlib40( 817var comp = CreateCompilationWithMscorlib40(text, references: s_attributeRefs);
Attributes\AttributeTests_WellKnownAttributes.cs (13)
101var source = CreateCompilationWithMscorlib40(@" 209var source = CreateCompilationWithMscorlib40(@" 1437CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 1468CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 1499CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 5104var compilation = CreateCompilationWithMscorlib40(syntaxTree); 5392CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 5471CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 5504CreateCompilationWithMscorlib40(source).VerifyDiagnostics(); 5519CreateCompilationWithMscorlib40(source).VerifyDiagnostics(); 5530CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 5547CreateCompilationWithMscorlib40(source).VerifyDiagnostics( 6037CreateCompilationWithMscorlib40(source, new[] { Net40.References.SystemCore }).VerifyDiagnostics(
FlowAnalysis\StructTests.cs (1)
22var comp = CreateCompilationWithMscorlib40(@"
RefReadonlyParameterTests.cs (2)
7153var comp1 = CreateCompilationWithMscorlib40(source1).VerifyDiagnostics(); 7166var comp2 = CreateCompilationWithMscorlib40(source2, new[] { comp1Ref });
Semantics\OutVarTests.cs (4)
202var compilation = CreateCompilationWithMscorlib40(text, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular); 249var compilation = CreateCompilationWithMscorlib40(text, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular); 303var compilation = CreateCompilationWithMscorlib40(text, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular); 33476var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugDll, references: new[] { Net40.References.SystemCore });
Semantics\ParamsCollectionTests.cs (9)
13122var comAssembly = CreateCompilationWithMscorlib40(@" 13157var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) }); 13160var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.EmitToImageReference(embedInteropTypes: true) }); 13183var comAssembly = CreateCompilationWithMscorlib40(@" 13217var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.ToMetadataReference(embedInteropTypes: true) }); 13220var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comAssembly.EmitToImageReference(embedInteropTypes: true) }); 13243var comp1 = CreateCompilationWithMscorlib40(ParamCollectionAttributeSource, options: TestOptions.ReleaseDll); 13280var compilation_CompilationReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comp1Ref, comAssembly.ToMetadataReference(embedInteropTypes: true) }); 13283var compilation_BinaryReference = CreateCompilationWithMscorlib40(code, options: options, references: new[] { comp1Ref, comAssembly.EmitToImageReference(embedInteropTypes: true) });
Semantics\PatternMatchingTests4.cs (1)
3662var compilation = CreateCompilationWithMscorlib40(source);
Semantics\PatternSwitchTests.cs (1)
3175var compilation = CreateCompilationWithMscorlib40(
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\IOperationTests.cs (3)
458var compilation = CreateCompilationWithMscorlib40(text, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }); 489var compilation = CreateCompilationWithMscorlib40(sourceCode, new[] { SystemRef, SystemCoreRef, ValueTupleRef, SystemRuntimeFacadeRef }, sourceFileName: "file.cs"); 523var compilation = CreateCompilationWithMscorlib40(sourceCode, new[] { SystemRef, SystemCoreRef, ValueTupleRef, SystemRuntimeFacadeRef }, sourceFileName: "file.cs");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (38)
Semantics\BindingTests.cs (4)
2875var compilation = CreateCompilationWithMscorlib40(sourceText, new[] { Net40.References.SystemCore }, options: TestOptions.DebugDll); 3026var comp = CreateCompilationWithMscorlib40(source, new[] { Net40.References.SystemCore }); 3106var comp = CreateCompilationWithMscorlib40(source, new[] { Net40.References.SystemCore }); 3264var comp = CreateCompilationWithMscorlib40(source, new[] { Net40.References.SystemCore });
Semantics\ColorColorTests.cs (1)
1839var comp = CreateCompilationWithMscorlib40(new[] { tree }, new[] { Net40.References.SystemCore });
Semantics\ConstantTests.cs (2)
3457var comp = CreateCompilationWithMscorlib40(source, references: new[] { LinqAssemblyRef }); 3479var comp = CreateCompilationWithMscorlib40(source, references: new[] { LinqAssemblyRef });
Semantics\DeconstructionTests.cs (2)
1917var comp = CreateCompilationWithMscorlib40(source); 3816var comp = CreateCompilationWithMscorlib40(source);
Semantics\InterpolationTests.cs (1)
880CreateCompilationWithMscorlib40(source).VerifyEmitDiagnostics(
Semantics\LambdaTests.cs (2)
369var comp1 = CreateCompilationWithMscorlib40( 4180var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.RegularPreview);
Semantics\LookupPositionTests.cs (1)
3116var compilation = CreateCompilationWithMscorlib40(text, parseOptions: parseOptions);
Semantics\LookupTests.cs (1)
1367var comp = CreateCompilationWithMscorlib40(new[] { tree });
Semantics\MethodTypeInferenceTests.cs (1)
972CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics();
Semantics\NonTrailingNamedArgumentsTests.cs (1)
164var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular7_1, references: new[] { Net40.References.SystemCore });
Semantics\NullableReferenceTypesTests.cs (3)
2627CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics( 138236CompileAndVerify(CreateCompilationWithMscorlib40(source), sourceSymbolValidator: validate, symbolValidator: validate).VerifyDiagnostics(); 138402CompileAndVerify(CreateCompilationWithMscorlib40(source), symbolValidator: validate).VerifyDiagnostics(
Semantics\OperatorTests.cs (1)
11303var compilation = CreateCompilationWithMscorlib40(source, references: new[] { ValueTupleRef, SystemRuntimeFacadeRef })
Semantics\OverloadResolutionTests.cs (4)
8196var compilation = CreateCompilationWithMscorlib40(source1, new[] { Net40.References.SystemCore }, options: TestOptions.DebugExe); 8232var compilation = CreateCompilationWithMscorlib40(source1, new[] { Net40.References.SystemCore }, options: TestOptions.DebugExe); 11394CreateCompilationWithMscorlib40(code, references: new[] { SystemRuntimeFacadeRef, ValueTupleRef }).VerifyDiagnostics( 11501var libComp = CreateCompilationWithMscorlib40(librarySrc, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics();
Semantics\RawInterpolationTests.cs (1)
894CreateCompilationWithMscorlib40(source).VerifyEmitDiagnostics(
Semantics\SemanticAnalyzerTests.cs (1)
452CreateCompilationWithMscorlib40(source).VerifyDiagnostics(
Semantics\SemanticErrorTests.cs (8)
9939CreateCompilationWithMscorlib40(text, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics( 10049CreateCompilationWithMscorlib40(text, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics( 13743CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics( 13789CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics( 16974var compilation = CreateCompilationWithMscorlib40(text, references: new[] { Net40.References.SystemCore }); 16997var compilation = CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }); 22579CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics( 22592CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }, options: TestOptions.ReleaseDll.WithNullableContextOptions(NullableContextOptions.Disable)).VerifyDiagnostics(
Semantics\StructConstructorTests.cs (2)
3664var comp = CreateCompilationWithMscorlib40(sourceA); 3676comp = CreateCompilationWithMscorlib40(sourceB, references: new[] { refA });
Semantics\TargetTypedDefaultTests.cs (1)
2287var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular7_1, options: TestOptions.DebugExe,
Semantics\ValueTupleTests.cs (1)
169var comp = CreateCompilationWithMscorlib40("");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Symbols\AnonymousTypesSemanticsTests.cs (1)
2083CreateCompilationWithMscorlib40(
Symbols\AnonymousTypesSymbolTests.cs (2)
1452var compilation = CreateCompilationWithMscorlib40(new string[] { source1, source2, source3 }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.Internal), parseOptions: TestOptions.Regular); 1923var compilation = CreateCompilationWithMscorlib40(source);
Symbols\ExtensionMethodTests.cs (2)
1008CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }, 1031CreateCompilationWithMscorlib40(source, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics(
Symbols\GenericConstraintTests.cs (2)
1099CreateCompilationWithMscorlib40(text, references: new[] { Net40.References.SystemCore }, parseOptions: TestOptions.WithoutImprovedOverloadCandidates).VerifyDiagnostics( 1104CreateCompilationWithMscorlib40(text, references: new[] { Net40.References.SystemCore }).VerifyDiagnostics();
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (1)
478var localConsumer = CreateCompilationWithMscorlib40(assemblyName: "Dummy", source: (string[])null,
Symbols\Retargeting\NoPia.cs (2)
352var LocalTypes1 = CreateCompilationWithMscorlib40(s_sourceLocalTypes1_IL, options: TestOptions.ReleaseDll, assemblyName: "LocalTypes1"); 355var LocalTypes2 = CreateCompilationWithMscorlib40(s_sourceLocalTypes2_IL, options: TestOptions.ReleaseDll, assemblyName: "LocalTypes2");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1089CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.RegularPreview.WithNoRefSafetyRulesAttribute()),
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (6)
CodeGen\WinMdEventTests.cs (4)
31var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseWinMD); 66var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseWinMD); 108var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseWinMD); 150var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseWinMD);
Metadata\WinMdEventTests.cs (2)
3322var comp = CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseWinMD); 3428CreateCompilationWithMscorlib40(source, options: TestOptions.ReleaseWinMD).VerifyEmitDiagnostics(
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
3340var compilationV1 = CSharpTestBase.CreateCompilationWithMscorlib40(sourceV1, options: TestOptions.DebugDll, assemblyName: "lib");