165 references to ReleaseModule
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (26)
Emit\CompilationEmitTests.cs (24)
4048
options: TestOptions.
ReleaseModule
.WithModuleName(name + extension));
4210
var compilation = CreateCompilation(source, options: TestOptions.
ReleaseModule
, assemblyName: "ContentType");
4620
var comp = CreateCompilation(source1, options: TestOptions.
ReleaseModule
);
4622
CompileAndVerify(source2, references: new[] { metadataRef }, options: TestOptions.
ReleaseModule
, verify: Verification.Fails);
4704
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.AnyCpu));
4710
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.AnyCpu));
4732
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.X86));
4740
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.X86));
4763
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");
4792
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.AnyCpu));
4839
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium));
4847
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium));
4864
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.X86), assemblyName: "PlatformMismatch");
4922
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium));
4928
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium));
4943
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.AnyCpu), assemblyName: "PlatformMismatch");
4999
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium));
5005
parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium));
5020
var refCompilation = CreateEmptyCompilation(refSource, parseOptions: parseOptions, options: TestOptions.
ReleaseModule
.WithPlatform(Platform.Itanium), assemblyName: "PlatformMismatch");
5262
var comp1 = CreateCompilation(s1, options: TestOptions.
ReleaseModule
);
5266
var comp2 = CreateCompilation(s2, options: TestOptions.
ReleaseModule
, references: new[] { ref1 });
5309
var comp1 = CreateCompilation(s1, options: TestOptions.
ReleaseModule
.WithModuleName("A"));
5313
var comp2 = CreateCompilation(s2, options: TestOptions.
ReleaseModule
.WithModuleName("B"), references: new[] { ref1 });
5549
var modRef = CreateCompilation("public class A { }", options: TestOptions.
ReleaseModule
, assemblyName: "refMod").EmitToImageReference();
Emit\EmitErrorTests.cs (1)
264
var netModule = CreateCompilation(moduleSource, options: TestOptions.
ReleaseModule
, assemblyName: "ModuleNameMismatch");
Emit\EntryPointTests.cs (1)
1573
var netModule = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (86)
Attributes\AttributeTests_Assembly.cs (33)
419
compilation = compilation.WithOptions(TestOptions.
ReleaseModule
);
448
compilation = compilation.WithOptions(TestOptions.
ReleaseModule
);
467
compilation = compilation.WithOptions(TestOptions.
ReleaseModule
);
502
compilation = compilation.WithOptions(TestOptions.
ReleaseModule
);
807
{}", options: TestOptions.
ReleaseModule
);
1013
var netmoduleCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.
ReleaseModule
, references: references, assemblyName: assemblyName);
1124
options: TestOptions.
ReleaseModule
);
1177
options: TestOptions.
ReleaseModule
,
1239
options: TestOptions.
ReleaseModule
);
1432
compilation = CreateCompilationWithMscorlib40(netmodule2Source, options: TestOptions.
ReleaseModule
, references: new[] { netmodule1Ref });
1835
var module = CreateCompilation(moduleSrc, options: TestOptions.
ReleaseModule
, assemblyName: "M");
1932
var module = CreateCompilation(moduleSrc, options: TestOptions.
ReleaseModule
, assemblyName: "M");
1958
var module1 = CreateCompilation(moduleSrc1, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
1965
var module2 = CreateCompilation(moduleSrc2, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
1986
var module1 = CreateCompilation(moduleSrc1, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2011
var module1 = CreateCompilation(moduleSrc1, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2018
var module2 = CreateCompilation(moduleSrc2, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
2039
var module1 = CreateCompilation(moduleSrc1, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2064
var module1 = CreateCompilation(moduleSrc1, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2071
var module2 = CreateCompilation(moduleSrc2, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
2090
var module1 = CreateCompilation(moduleSrc1, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2116
var compMod1 = CreateCompilation(mod1Source, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2117
var compMod2 = CreateCompilation(mod2Source, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
2148
var compMod1 = CreateCompilation(mod1Source, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2149
var compMod2 = CreateCompilation(mod2Source, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
2178
var compMod1 = CreateCompilation(mod1Source, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2179
var compMod2 = CreateCompilation(mod2Source, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
2210
var compMod1 = CreateCompilation(mod1Source, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2211
var compMod2 = CreateCompilation(mod2Source, options: TestOptions.
ReleaseModule
, assemblyName: "M2");
2237
var compMod1 = CreateCompilation(mod1Source, options: TestOptions.
ReleaseModule
, assemblyName: "M1");
2291
var moduleWithAttribute = CreateCompilation(module, references: new[] { attributeDefinition1 }, options: TestOptions.
ReleaseModule
, assemblyName: "M1").EmitToImageReference();
2347
var module1WithAttribute = CreateCompilation(module1, references: new[] { c1Definition }, options: TestOptions.
ReleaseModule
, assemblyName: "M1").EmitToImageReference();
2376
var module2WithAttribute = CreateCompilation(module2, references: new[] { c1Definition }, options: TestOptions.
ReleaseModule
, assemblyName: "M1").EmitToImageReference();
Attributes\AttributeTests_Embedded.cs (2)
105
}", options: TestOptions.
ReleaseModule
);
221
var module = CreateCompilation(options: TestOptions.
ReleaseModule
, assemblyName: "testModule", source: @"
Attributes\AttributeTests_IsByRefLike.cs (4)
398
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
415
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
440
CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.
ReleaseModule
, symbolValidator: module =>
516
CreateCompilation(text, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
Attributes\AttributeTests_IsUnmanaged.cs (8)
258
CompileAndVerify(text, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.
ReleaseModule
, symbolValidator: module =>
284
CompileAndVerify(text, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.
ReleaseModule
, symbolValidator: module =>
320
options: TestOptions.
ReleaseModule
.WithMetadataImportOptions(MetadataImportOptions.All),
349
options: TestOptions.
ReleaseModule
.WithMetadataImportOptions(MetadataImportOptions.All),
665
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
680
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
702
CreateCompilation(source: code, options: TestOptions.
ReleaseModule
.WithMetadataImportOptions(MetadataImportOptions.All)).VerifyDiagnostics(
713
CreateCompilation(source: code, options: TestOptions.
ReleaseModule
.WithMetadataImportOptions(MetadataImportOptions.All)).VerifyDiagnostics(
Attributes\AttributeTests_NativeInteger.cs (2)
1174
var comp = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
1198
var comp = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
Attributes\AttributeTests_Nullable.cs (19)
993
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
1004
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular8, options: TestOptions.
ReleaseModule
);
2322
var comp = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
2349
var comp = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
4429
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4449
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4470
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4488
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4503
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4518
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4536
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4560
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4585
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4606
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4621
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4647
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular8, options: TestOptions.
ReleaseModule
);
4669
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4706
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
4725
var comp = CreateCompilation(new[] { source }, parseOptions: TestOptions.Regular8, options: WithNullableEnable(TestOptions.
ReleaseModule
));
Attributes\AttributeTests_ReadOnlyStruct.cs (4)
388
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
405
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
432
CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.
ReleaseModule
, symbolValidator: module =>
508
CreateCompilation(text, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
Attributes\AttributeTests_RefReadOnly.cs (9)
1095
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
1111
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
1135
CreateCompilation(code, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
1156
CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.
ReleaseModule
, symbolValidator: module =>
1233
CreateCompilation(text, options: TestOptions.
ReleaseModule
).VerifyDiagnostics(
1532
var compilation = CreateCompilation(code, options: TestOptions.
ReleaseModule
, references: new[] { reference });
1556
var compilation = CreateCompilation(code, options: TestOptions.
ReleaseModule
);
2438
var comp = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
2464
var comp = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
Semantics\ExperimentalAttributeTests.cs (1)
533
var moduleComp = CreateCompilation(libSrc, options: TestOptions.
ReleaseModule
, references: new[] { attrRef });
Semantics\ParamsCollectionTests.cs (4)
4453
var comp5 = CreateCompilation(src2, references: [comp1.ToMetadataReference()], targetFramework: TargetFramework.Net80, options: TestOptions.
ReleaseModule
);
12770
var comp3 = CreateCompilation(src1, references, options: TestOptions.
ReleaseModule
);
12774
var comp4 = CreateCompilation(src1, references: references.Concat([comp1Ref]), options: TestOptions.
ReleaseModule
.WithMetadataImportOptions(MetadataImportOptions.All));
12797
var comp7 = CreateCompilation(src1, references: references.Concat([comp5Ref]), options: TestOptions.
ReleaseModule
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\TopLevelStatementsTests.cs (1)
8074
var comp = CreateCompilation(text, options: TestOptions.
ReleaseModule
, parseOptions: DefaultParseOptions);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (51)
Compilation\CompilationAPITests.cs (12)
981
options: TestOptions.
ReleaseModule
,
987
options: TestOptions.
ReleaseModule
,
1037
options: TestOptions.
ReleaseModule
,
1043
options: TestOptions.
ReleaseModule
,
1057
options: TestOptions.
ReleaseModule
,
1092
options: TestOptions.
ReleaseModule
,
1126
options: TestOptions.
ReleaseModule
,
1132
options: TestOptions.
ReleaseModule
,
1673
var compilation = CreateCompilation(source, options: TestOptions.
ReleaseModule
);
1690
var compilation = CSharpCompilation.Create(assemblyName: null, options: TestOptions.
ReleaseModule
, syntaxTrees: new[] { Parse(source) }, references: new[] { MscorlibRef });
1706
compilation = CSharpCompilation.Create(assemblyName: "ModuleAssemblyName", options: TestOptions.
ReleaseModule
, syntaxTrees: new[] { Parse(source) }, references: new[] { MscorlibRef });
1981
c1 = CSharpCompilation.Create("c", options: TestOptions.
ReleaseModule
);
Compilation\ReferenceManagerTests.cs (6)
1706
var b = CreateCompilation(srcB, references: new[] { aRef }, options: TestOptions.
ReleaseModule
.WithModuleName("mod.netmodule"), assemblyName: "B");
1764
var moduleRef = CreateCompilation("public class TypeFromModule : TypeDependedOnByModule { }", new[] { assemblyRef }, options: TestOptions.
ReleaseModule
, assemblyName: "lib2").EmitToImageReference();
1815
var moduleRef = CreateCompilation("public class C { }", options: TestOptions.
ReleaseModule
, assemblyName: "lib").EmitToImageReference();
1864
var module = CreateCompilation(moduleSource, options: TestOptions.
ReleaseModule
);
2798
var mRef = CreateCompilationWithMscorlib46("public interface M : B { }", new[] { bRef }, options: TestOptions.
ReleaseModule
.WithModuleName("M.netmodule")).EmitToImageReference();
2799
var nRef = CreateCompilationWithMscorlib46("public interface N : D { }", new[] { dRef }, options: TestOptions.
ReleaseModule
.WithModuleName("N.netmodule")).EmitToImageReference();
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
6959
var comp = CreateCompilationUtil(source, options: TestOptions.
ReleaseModule
);
Symbols\CompilationCreationTests.cs (1)
2972
var lib1 = CreateCompilation(source1, assemblyName: "Lib1", options: TestOptions.
ReleaseModule
);
Symbols\Metadata\PE\TypeForwarders.cs (5)
1544
var bits0 = CreateCompilation(module0, options: TestOptions.
ReleaseModule
, assemblyName: "asm0").EmitToArray();
1618
var modCompilation = CreateCompilation(mod, references: new[] { new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.
ReleaseModule
);
1706
appCompilation = CreateCompilation(app, references: new[] { modRef1, new CSharpCompilationReference(forwardedTypesCompilation) }, options: TestOptions.
ReleaseModule
);
1727
var comp0 = CreateCompilation(source0, options: TestOptions.
ReleaseModule
, assemblyName: "asm0");
1853
", new[] { new CSharpCompilationReference(cC_v1) }, options: TestOptions.
ReleaseModule
, assemblyName: "D");
Symbols\ModuleInitializers\ModuleInitializersTests.cs (1)
815
var moduleOptions = TestOptions.
ReleaseModule
.WithMetadataImportOptions(MetadataImportOptions.All);
Symbols\Retargeting\NoPia.cs (1)
2599
var module1 = CreateCompilation(moduleSource, options: TestOptions.
ReleaseModule
, assemblyName: "Module1",
Symbols\Source\ClsComplianceTests.cs (11)
2366
var trueModuleRef = CreateCompilation("[assembly:System.CLSCompliant(true)][module:System.CLSCompliant(true)]", options: TestOptions.
ReleaseModule
, assemblyName: "true").EmitToImageReference();
2367
var falseModuleRef = CreateCompilation("[assembly:System.CLSCompliant(false)][module:System.CLSCompliant(false)]", options: TestOptions.
ReleaseModule
, assemblyName: "false").EmitToImageReference();
2368
var noneModuleRef = CreateCompilation("", options: TestOptions.
ReleaseModule
, assemblyName: "none").EmitToImageReference();
2401
var trueModuleRef = CreateCompilation("[assembly:System.CLSCompliant(true)]", options: TestOptions.
ReleaseModule
, assemblyName: "true").EmitToImageReference();
2402
var falseModuleRef = CreateCompilation("[assembly:System.CLSCompliant(false)]", options: TestOptions.
ReleaseModule
, assemblyName: "false").EmitToImageReference();
2403
var noneModuleRef = CreateCompilation("", options: TestOptions.
ReleaseModule
, assemblyName: "none").EmitToImageReference();
2434
var trueModuleRef = CreateCompilation("[assembly:System.CLSCompliant(true)][module:System.CLSCompliant(true)]", options: TestOptions.
ReleaseModule
, assemblyName: "true").EmitToImageReference();
2435
var falseModuleRef = CreateCompilation("[assembly:System.CLSCompliant(false)][module:System.CLSCompliant(false)]", options: TestOptions.
ReleaseModule
, assemblyName: "false").EmitToImageReference();
3866
var comp1 = CreateCompilation(source1, options: TestOptions.
ReleaseModule
);
3890
var comp3 = comp2.WithOptions(TestOptions.
ReleaseModule
.WithConcurrentBuild(false));
3896
comp3.WithOptions(TestOptions.
ReleaseModule
.WithConcurrentBuild(true)).VerifyDiagnostics(
Symbols\SymbolErrorTests.cs (13)
100
var module1 = CreateCompilation(text1, options: TestOptions.
ReleaseModule
, assemblyName: name1);
103
options: TestOptions.
ReleaseModule
,
6911
var mod3Ref = CreateCompilation(mod3Source, options: TestOptions.
ReleaseModule
, assemblyName: "ErrTestMod03").EmitToImageReference();
6996
var mod3Ref = CreateCompilation(mod3Source, options: TestOptions.
ReleaseModule
, assemblyName: "ErrTestMod03").EmitToImageReference();
7067
var ModuleA01Ref = CreateCompilation(ModuleA01, options: TestOptions.
ReleaseModule
, assemblyName: "ModuleA01").EmitToImageReference();
7075
var ModuleB01Ref = CreateCompilation(ModuleB01, options: TestOptions.
ReleaseModule
, assemblyName: "ModuleB01").EmitToImageReference();
7229
var moduleRef2 = CreateCompilation(mod2Source, options: TestOptions.
ReleaseModule
, assemblyName: "mod_1_2").EmitToImageReference();
7272
options: TestOptions.
ReleaseModule
,
7283
options: TestOptions.
ReleaseModule
,
7289
options: TestOptions.
ReleaseModule
,
7295
options: TestOptions.
ReleaseModule
,
7301
options: TestOptions.
ReleaseModule
,
19084
var netModule = CreateEmptyCompilation("", options: TestOptions.
ReleaseModule
, assemblyName: "lib").EmitToImageReference(expectedWarnings: new[] { Diagnostic(ErrorCode.WRN_NoRuntimeMetadataVersion) });
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
TestOptions.cs (1)
99
public static readonly CSharpCompilationOptions SigningReleaseModule =
ReleaseModule
.WithStrongNameProvider(SigningTestHelpers.DefaultDesktopStrongNameProvider);