338 references to WithNoRefSafetyRulesAttribute
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
9776
var comp = CreateEmptyCompilation(string.Empty, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
9779
comp = CreateEmptyCompilation(string.Empty, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (118)
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
());
8052
var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\CodeGenDynamicTests.cs (6)
15857
var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "321 123", references: new[] { CSharpRef });
15879
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
15982
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
16108
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
16219
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
16336
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), expectedOutput: "True", references: new[] { CSharpRef }),
CodeGen\CodeGenExprLambdaTests.cs (3)
5378
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
5440
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
5513
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\CodeGenFunctionPointersTests.cs (6)
7563
var allInCoreLib = CreateEmptyCompilation(source1 + source2, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
7580
var coreLib = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
7583
var comp1 = CreateEmptyCompilation(source2, references: new[] { coreLib.EmitToImageReference() }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
7632
var allInCoreLib = CreateEmptyCompilation(source1 + source2, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseDll);
7649
var coreLib = CreateEmptyCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
7652
var comp1 = CreateEmptyCompilation(source2, references: new[] { coreLib.EmitToImageReference() }, parseOptions: TestOptions.RegularPreview.
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)
10516
CreateEmptyCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()).VerifyEmitDiagnostics(
14564
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
14598
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
14634
var compilation = CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
CodeGen\CodeGenTupleTest.cs (2)
25315
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
28025
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
();
4672
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4757
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4802
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4858
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4889
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4937
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
4966
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5014
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5043
var comp = CreateEmptyCompilation("", new[] { TestReferences.SymbolsTests.netModule.x64COFF }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5354
var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll);
5416
var compilation = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.ReleaseDll, references: new[] { CSharpRef });
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));
2230
var syntax = SyntaxFactory.ParseSyntaxTree(@"class C {}", TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
2419
var syntax = SyntaxFactory.ParseSyntaxTree(@"class C { static void Main() { } }", TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (96)
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
66
var compilation0 = CreateEmptyCompilation(src1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: references);
136
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Emit\EditAndContinue\EditAndContinueClosureTests.cs (7)
2463
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
2580
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
2713
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
3843
var source0 = MarkedSource(template.Replace("<<VALUE>>", "0"), options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
3844
var source1 = MarkedSource(template.Replace("<<VALUE>>", "1"), options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
3845
var source2 = MarkedSource(template.Replace("<<VALUE>>", "2"), options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
4733
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 (9)
46
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
228
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
345
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
447
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
520
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
571
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7996
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All));
8688
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
8771
var compilation0 = CreateCompilationWithMscorlib461(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll.WithMetadataImportOptions(MetadataImportOptions.All), assemblyName: "A");
Emit\EditAndContinue\EditAndContinueTest.cs (1)
28
private readonly CSharpParseOptions _parseOptions = parseOptions ?? TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
50
parser: s => Parse(s, fileName, options ?? TestOptions.Regular.
WithNoRefSafetyRulesAttribute
()),
Emit\EditAndContinue\EditAndContinueTests.cs (58)
259
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll.WithNullableContextOptions(NullableContextOptions.Enable));
308
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
500
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
561
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
794
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
1137
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
1260
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
2895
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
2979
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe, targetFramework: TargetFramework.NetStandard20);
3106
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
3434
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
3577
var compilation0 = CreateCompilation(source0, references: new[] { RefSafetyRulesAttributeLib }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll);
3829
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
3891
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
3956
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5421
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
5986
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
6109
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
6442
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
6527
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
6608
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6718
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6773
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
6889
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll);
6945
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7015
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7092
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7174
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.Net50);
7353
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7513
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7577
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7633
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
7741
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7799
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
7840
var compilation0 = CreateCompilation(parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, source:
8027
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: options, references: new[] { CSharpRef });
8409
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: ComSafeDebugDll);
8502
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
8605
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8691
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
8822
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9035
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9124
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9367
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9702
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
9812
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
10097
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
10214
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
11213
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
12093
var compilation0 = CreateCompilation(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
12200
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
12272
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
12357
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
12405
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
12446
var compilation0 = CreateCompilation(new[] { sourceA0, sourceB0 }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
12492
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20);
12695
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
15991
var compilation0 = CreateCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
Emit\NumericIntPtrTests.cs (1)
10325
var parseOptions = (useCSharp11 ? TestOptions.Regular11 : TestOptions.Regular10).
WithNoRefSafetyRulesAttribute
();
PDB\PDBAsyncTests.cs (1)
2017
var compilation = CreateCompilationWithMscorlib461(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)
10082
var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
10291
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
(),
1765
var compilation1 = CreateCompilation(source1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll);
1782
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
2973
var comp = CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), references: new[] { SystemCoreRef.WithAliases(new[] { "A" }), SystemDataRef });
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (65)
Attributes\AttributeTests.cs (1)
11217
var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), sourceSymbolValidator: verify, symbolValidator: verify, expectedOutput: "a");
Attributes\AttributeTests_Assembly.cs (5)
1076
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1123
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1178
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1197
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
1238
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(),
Attributes\AttributeTests_Dynamic.cs (2)
1188
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
1225
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)
2689
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
2805
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
3279
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
3457
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
4703
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
4812
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
5141
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
5204
CompileAndVerify(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Semantics\CollectionExpressionTests.cs (7)
4973
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
5037
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
5085
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
5928
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
6006
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
20970
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
21118
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
Semantics\RecordTests.cs (16)
16281
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
16290
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
17230
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
17240
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
17326
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
17336
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
17422
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
17431
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24274
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24282
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24339
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24347
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24409
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24418
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
24488
var comp = CreateEmptyCompilation(source0, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
24502
comp = CreateEmptyCompilation(source1, references: new[] { ref0 }, parseOptions: TestOptions.Regular9.
WithNoRefSafetyRulesAttribute
());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (27)
Semantics\DelegateTypeTests.cs (4)
4587
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
4623
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.UnsafeReleaseExe);
4659
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
4692
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)
1035
CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe)
1068
CreateEmptyCompilation(text, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe)
1113
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)
4511
var comp = CreateEmptyCompilation(src, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
4788
var comp = CreateEmptyCompilation(src, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
());
Semantics\ScriptSemanticsTests.cs (1)
141
parseOptions: TestOptions.Script.
WithNoRefSafetyRulesAttribute
(),
Semantics\UseSiteErrorTests.cs (1)
2305
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Semantics\Utf8StringsLiteralsTests.cs (1)
1943
var comp = CreateCompilation(source, targetFramework: TargetFramework.NetCoreApp, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugExe);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (22)
Compilation\CompilationAPITests.cs (3)
3602
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
3637
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
3662
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
();
5458
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
Symbols\CorLibrary\CorTypes.cs (8)
353
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
395
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
534
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
580
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
807
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
864
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
1002
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
1058
parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
());
Symbols\DefaultInterfaceImplementationTests.cs (2)
49651
var parseOptions = TestOptions.Regular.
WithNoRefSafetyRulesAttribute
();
49767
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
();
Symbols\PartialPropertiesTests.cs (1)
832
CompileAndVerify(source, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
(), assemblyValidator: (assembly) =>
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1075
CreateCompilationWithMscorlib40(source, parseOptions: TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
()),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Emit\CompilationOutputFilesTests.cs (1)
31
var compilation = CSharpTestBase.CreateCompilationWithMscorlib40AndSystemCore(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "lib");
Emit\CompilationOutputsTests.cs (1)
54
var compilation = CSharpTestBase.CreateCompilationWithMscorlib40AndSystemCore(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "lib");
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
271
var parseOptions = TestOptions.RegularPreview.
WithNoRefSafetyRulesAttribute
();
EditAndContinue\Extensions.cs (1)
95
LanguageNames.CSharp => CSharpParseOptions.Default.
WithNoRefSafetyRulesAttribute
(),
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditAndContinueMethodDebugInfoReaderTests.cs (1)
63
var tree = CSharpTestSource.Parse(source, path: "/a/c.cs", options: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), checksumAlgorithm: SourceHashAlgorithm.Sha1);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
2595
var compilationV1 = CSharpTestBase.CreateCompilation(sourceV1, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, targetFramework: DefaultTargetFramework, assemblyName: "lib");
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (1)
38
var compilation = CSharpTestBase.CreateCompilationWithMscorlib40AndSystemCore(source, parseOptions: TestOptions.Regular.
WithNoRefSafetyRulesAttribute
(), options: TestOptions.DebugDll, assemblyName: "lib");