338 references to WithNoRefSafetyRulesAttribute
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
9554
var comp = CreateEmptyCompilation(string.Empty, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
9557
comp = CreateEmptyCompilation(string.Empty, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (221)
CodeGen\CodeGenConstructorInitTests.cs (1)
1209
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
CodeGen\CodeGenDisplayClassOptimisationTests.cs (51)
45
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3", options: TestOptions.ReleaseExe);
129
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3", options: TestOptions.DebugExe);
260
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"three
435
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
587
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
733
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"three
952
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"one
1132
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"one
1367
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
1733
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "one");
1842
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "one");
1994
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "one");
2159
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"Program+Disposable
2313
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"Program+Disposable
2516
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"Program+Disposable
2849
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"one
3052
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"two
3255
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"one");
3451
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"one");
3588
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"one");
3732
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"three
3943
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4033
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"");
4121
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4225
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4328
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4424
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4524
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4617
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4735
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4852
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
4971
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5091
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5221
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5338
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5467
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5567
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5664
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1");
5798
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"4");
5941
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"2");
6094
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3");
6229
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3");
6361
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1
6553
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"1
6751
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3
6919
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3
7087
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: @"3
7265
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
7401
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
7603
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
8043
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\CodeGenDynamicTests.cs (6)
15490
var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "321 123", references: new[] { CSharpRef });
15512
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
15615
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
15741
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
15852
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
15969
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
CodeGen\CodeGenExprLambdaTests.cs (3)
5303
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
5365
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
5438
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\CodeGenFunctionPointersTests.cs (6)
7550
var allInCoreLib = CreateEmptyCompilation(source1 + source2, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
7567
var coreLib = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
7570
var comp1 = CreateEmptyCompilation(source2, references: new[] { coreLib.EmitToImageReference() }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
7619
var allInCoreLib = CreateEmptyCompilation(source1 + source2, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
7636
var coreLib = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
7639
var comp1 = CreateEmptyCompilation(source2, references: new[] { coreLib.EmitToImageReference() }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
CodeGen\CodeGenIterators.cs (3)
2389
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
2435
var compilation = CreateEmptyCompilation(new[] { Parse(source, options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()) });
2499
var compilation = CreateEmptyCompilation(new[] { Parse(source, options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()) });
CodeGen\CodeGenMscorlib.cs (14)
223
var compilation = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
247
var compilation1 = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyName: GetUniqueName());
257
var compilation2 = CreateEmptyCompilation(source2, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { reference1 });
281
var compilation1 = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyName: GetUniqueName());
298
var compilation2 = CreateEmptyCompilation(source2, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { reference1 });
318
var compilation1 = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyName: GetUniqueName());
335
var compilation2 = CreateEmptyCompilation(source2, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { reference1 });
356
var compilation1 = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyName: GetUniqueName());
374
var compilation2 = CreateEmptyCompilation(source2, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { reference1 });
477
var compilation1 = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyName: GetUniqueName());
490
var compilation2 = CreateEmptyCompilation(source2, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { reference1 });
614
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
752
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
880
var comp = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll).VerifyDiagnostics();
CodeGen\CodeGenTests.cs (4)
10521
CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()).VerifyEmitDiagnostics(
14547
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
14581
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
14617
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\CodeGenTupleTest.cs (2)
25353
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
28063
var comp = CreateCompilation(source, targetFramework: TargetFramework.Mscorlib40, assemblyName: "emptyValueTuple", parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\EventTests.cs (1)
645
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
CodeGen\PatternTests.cs (5)
99
var compilation = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll);
122
var compilation = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
152
var compilation = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
200
var compilation = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
3315
var compilation = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll);
Emit\CompilationEmitTests.cs (18)
2124
parseOptions: TestOptions.Regular7_2.
WithNoRefSafetyRulesAttribute
(),
2130
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
2261
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
2328
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
2395
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
2455
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
2500
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4667
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4752
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4797
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4853
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4884
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4932
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4961
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5009
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5038
var comp = CreateEmptyCompilation("", new[] { TestReferences.SymbolsTests.netModule.x64COFF }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5349
var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll);
5411
var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll, references: new[] { CSharpRef });
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
66
var c1 = CreateEmptyCompilation(src1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: references);
136
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Emit\EditAndContinue\EditAndContinueClosureTests.cs (8)
44
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
2320
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
2437
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
2570
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
3709
var source0 = MarkedSource(template.Replace("<<VALUE>>", "0"), options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
3710
var source1 = MarkedSource(template.Replace("<<VALUE>>", "1"), options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
3711
var source2 = MarkedSource(template.Replace("<<VALUE>>", "2"), options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
4600
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
Emit\EditAndContinue\EditAndContinueDelegateCacheTests.cs (5)
45
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
109
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
173
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
237
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
301
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (12)
45
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
227
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
344
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
446
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
519
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
570
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
641
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
715
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
852
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7152
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All));
7844
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
7927
var compilation0 = CreateCompilationWithMscorlib45(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
Emit\EditAndContinue\EditAndContinueTest.cs (1)
38
_parseOptions = parseOptions ?? TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
44
parser: s => Parse(s, fileName, options ?? TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()),
Emit\EditAndContinue\EditAndContinueTests.cs (62)
146
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable));
192
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
384
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
454
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
542
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
802
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
917
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
1040
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
1860
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
1967
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
2051
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
2178
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
2462
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
2605
var compilation0 = CreateCompilation(source0, references: new[] { RefSafetyRulesAttributeLib }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll);
2859
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
2921
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
2986
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
4224
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
4782
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
4905
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
5153
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
5238
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
5319
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5429
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5484
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5600
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll);
5656
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5726
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5803
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5885
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.Net50);
6076
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6219
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6283
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6339
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
6447
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6505
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6546
var compilation0 = CreateCompilation(parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, source:
6733
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: options, references: new[] { CSharpRef });
7115
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll);
7208
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
7353
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll.WithModuleName("MODULE"));
7503
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7719
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7804
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7890
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8022
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8235
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8324
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8567
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8902
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9012
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
9297
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9414
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
10415
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
11271
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
11378
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
11450
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
11535
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
11583
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
11629
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
11832
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
14838
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
Emit\EmitMetadataTests.cs (4)
86
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), symbolValidator: module =>
529
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll, sourceSymbolValidator: validator(true), symbolValidator: validator(false));
2229
var syntax = SyntaxFactory.ParseSyntaxTree(@"class C {}", TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
2418
var syntax = SyntaxFactory.ParseSyntaxTree(@"class C { static void Main() { } }", TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
PDB\PDBAsyncTests.cs (1)
2017
var compilation = CreateCompilationWithMscorlib45(src, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
PDB\PDBIteratorTests.cs (1)
1624
var compilation = CreateCompilation(src, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetCoreApp);
PDB\PDBTests.cs (2)
10001
var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
10210
var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
PDB\PDBUsingTests.cs (8)
573
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
664
var compilation1 = CreateCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "TestExternAliases2");
673
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
717
var compilation1 = CreateCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "TestExternAliases3");
726
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1223
var compilation1 = CreateCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
1240
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
2431
var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { SystemCoreRef.WithAliases(new[] { "A" }), SystemDataRef });
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (43)
Attributes\AttributeTests.cs (1)
10919
var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), sourceSymbolValidator: verify, symbolValidator: verifyMetadata, expectedOutput: "a");
Attributes\AttributeTests_Assembly.cs (5)
1075
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1122
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1177
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1196
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1237
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
Attributes\AttributeTests_Dynamic.cs (2)
1191
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
1228
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Attributes\AttributeTests_Embedded.cs (4)
45
CreateCompilation(code, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()).VerifyEmitDiagnostics();
193
CompileAndVerify(code, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), verify: Verification.Passes, expectedOutput: "3");
270
var reference = CreateCompilation(assemblyName: "testRef", parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), source: @"
492
var compilation1 = CreateCompilation(parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), source: @"
Attributes\AttributeTests_IsUnmanaged.cs (4)
38
CompileAndVerify(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), symbolValidator: module =>
62
CompileAndVerify(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), symbolValidator: module =>
92
CompileAndVerify(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
114
CompileAndVerify(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
Attributes\AttributeTests_Nullable.cs (3)
746
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4393
var comp0 = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
4415
parseOptions: TestOptions.Regular8.
WithNoRefSafetyRulesAttribute
());
Attributes\AttributeTests_NullableContext.cs (1)
231
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Attributes\AttributeTests_NullablePublicOnly.cs (1)
522
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular.WithNullablePublicOnly().
WithNoRefSafetyRulesAttribute
());
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
486
CompileAndVerify(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_StructLayout.cs (2)
360
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
408
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
Attributes\AttributeTests_Synthesized.cs (6)
1122
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
1196
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
1234
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
1262
var compilation = CreateEmptyCompilation("", parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: options);
1608
var compilation = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.CreateTestOptions(outputKind, OptimizationLevel.Release, allowUnsafe: true));
1914
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Attributes\AttributeTests_Tuples.cs (4)
175
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
213
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
948
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1048
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
Attributes\AttributeTests_WellKnownAttributes.cs (8)
2608
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
2724
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
3198
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
3376
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
4622
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
4731
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
5052
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5115
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Emit\NumericIntPtrTests.cs (1)
10291
var parseOptions = (useCSharp11 ? TestOptions.Regular11 : TestOptions.Regular10).
WithNoRefSafetyRulesAttribute
();
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (7)
ExpressionCompilerTests.cs (2)
6552
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
6589
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
ReferencedModulesTests.cs (1)
1260
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
TupleTests.cs (1)
105
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
UsingDebugInfoTests.cs (3)
233
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
283
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
335
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (43)
Semantics\DelegateTypeTests.cs (4)
2801
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
2837
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseExe);
2873
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
2906
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Semantics\GlobalUsingDirectiveTests.cs (2)
3505
var parseOptions = TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
();
3701
var parseOptions = TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
();
Semantics\InterpolationTests.cs (3)
1037
CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe)
1070
CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe)
1115
var comp = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: Test.Utilities.TestOptions.UnsafeReleaseDll).VerifyDiagnostics();
Semantics\NativeIntegerTests.cs (10)
175
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
181
comp = CreateEmptyCompilation(sourceA, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
188
comp = CreateEmptyCompilation(sourceB, references: new[] { ref1 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
194
comp = CreateEmptyCompilation(sourceB, references: new[] { ref2 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
695
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
699
comp = CreateEmptyCompilation(sourceA, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
704
comp = CreateEmptyCompilation(sourceB, references: new[] { ref1 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
708
comp = CreateEmptyCompilation(sourceB, references: new[] { ref2 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
1300
var parseOptions = TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
();
1510
comp = CreateEmptyCompilation(sourceA, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Semantics\RawInterpolationTests.cs (3)
1035
CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe)
1067
CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe)
1111
var comp = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: Test.Utilities.TestOptions.UnsafeReleaseDll).VerifyDiagnostics();
Semantics\RecordStructTests.cs (2)
4481
var comp = CreateEmptyCompilation(src, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
4758
var comp = CreateEmptyCompilation(src, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
Semantics\RecordTests.cs (16)
16283
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
16292
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
17232
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
17242
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
17328
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
17338
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
17424
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
17433
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24285
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24293
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24350
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24358
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24420
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24429
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24499
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24513
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
Semantics\ScriptSemanticsTests.cs (1)
141
parseOptions: TestOptions.Script.
WithNoRefSafetyRulesAttribute
(),
Semantics\UseSiteErrorTests.cs (1)
2295
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Semantics\Utf8StringsLiteralsTests.cs (1)
1942
var comp = CreateCompilation(source, targetFramework: TargetFramework.NetCoreApp, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (13)
Compilation\CompilationAPITests.cs (3)
3599
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
3634
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
3659
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Compilation\UsedAssembliesTests.cs (5)
35
var comp1 = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
56
var comp1 = CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
378
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
419
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5361
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Symbols\DefaultInterfaceImplementationTests.cs (2)
49466
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
49582
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Symbols\Metadata\PE\LoadingMetadataTokens.cs (1)
40
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Symbols\MissingSpecialMember.cs (2)
485
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
508
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
991
CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
()),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (7)
EditAndContinue\EditAndContinueMethodDebugInfoReaderTests.cs (1)
64
var tree = CSharpTestSource.Parse(source, path: "/a/c.cs", options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), checksumAlgorithm: SourceHashAlgorithm.Sha1);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (4)
125
AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "proj", "proj", LanguageNames.CSharp, parseOptions: CSharpParseOptions.Default.
WithNoRefSafetyRulesAttribute
()).WithTelemetryId(s_defaultProjectTelemetryId)).GetProject(projectId).
310
var parseOptions = TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
();
2823
var compilationV1 = CSharpTestBase.CreateCompilation(sourceV1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: DefaultTargetFramework, assemblyName: "lib");
4558
AddProject(ProjectInfo.Create(projectId, VersionStamp.Create(), "P", "P", LanguageNames.CSharp, parseOptions: CSharpParseOptions.Default.
WithNoRefSafetyRulesAttribute
())).GetProject(projectId).
Emit\CompilationOutputFilesTests.cs (1)
31
var compilation = CSharpTestBase.CreateCompilationWithMscorlib40AndSystemCore(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "lib");
Emit\CompilationOutputsTests.cs (1)
55
var compilation = CSharpTestBase.CreateCompilationWithMscorlib40AndSystemCore(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "lib");
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (1)
39
var compilation = CSharpTestBase.CreateCompilationWithMscorlib40AndSystemCore(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "lib");