426 references to UnsafeReleaseExe
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (221)
CodeGen\CodeGenAsyncLocalsTests.cs (1)
1301
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"1", verify: Verification.Fails);
CodeGen\CodeGenAsyncTests.cs (3)
875
CompileAndVerify(source, expectedOutput: "0", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
919
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: releaseSymbolValidator, verify: Verification.Fails)
978
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "10", symbolValidator: releaseSymbolValidator, verify: Verification.Fails)
CodeGen\CodeGenClosureLambdaTests.cs (1)
2569
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F", verify: Verification.Passes);
CodeGen\CodeGenConditionalOperatorTests.cs (1)
3015
CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
CodeGen\CodeGenExprLambdaTests.cs (1)
2481
CompileAndVerifyUtil(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: TrimExpectedOutput(expectedOutput), verify: Verification.Fails);
CodeGen\CodeGenFunctionPointersTests.cs (19)
40
options: options ?? (expectedOutput is null ? TestOptions.UnsafeReleaseDll : TestOptions.
UnsafeReleaseExe
),
61
var comp = CreateCompilationWithIL(source, ilStub, parseOptions: TestOptions.RegularPreview, options: expectedOutput is null ? TestOptions.UnsafeReleaseDll : TestOptions.
UnsafeReleaseExe
);
5215
}}", options: TestOptions.
UnsafeReleaseExe
);
5239
}}", options: TestOptions.
UnsafeReleaseExe
);
6271
var allSourceComp = CreateCompilationWithFunctionPointers(new[] { executableCode, source1, source2 }, options: TestOptions.
UnsafeReleaseExe
);
6282
var derivedComp = CreateCompilationWithFunctionPointers(new[] { executableCode, source2 }, references: new[] { metadataRef }, options: TestOptions.
UnsafeReleaseExe
);
7467
var verifier = CompileAndVerifyFunctionPointers(source, expectedOutput: "", options: TestOptions.
UnsafeReleaseExe
);
8328
}", il, options: TestOptions.
UnsafeReleaseExe
);
8456
", il, options: TestOptions.
UnsafeReleaseExe
);
10722
", UnmanagedCallersOnlyAttribute }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.NetCoreApp);
10959
}", options: TestOptions.
UnsafeReleaseExe
);
10987
var comp = CreateCompilationWithSpan(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
10994
comp = CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
);
11021
var comp = CreateCompilationWithSpan(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
11037
comp = CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
);
11054
}", options: TestOptions.
UnsafeReleaseExe
);
11302
", options: TestOptions.
UnsafeReleaseExe
);
11410
}", options: TestOptions.
UnsafeReleaseExe
);
11890
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
,
CodeGen\CodeGenInParametersTests.cs (2)
1751
var comp = CreateCompilationWithMscorlib46(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.
UnsafeReleaseExe
);
1837
comp = CreateCompilationWithMscorlib46(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature());
CodeGen\CodeGenReadonlyStructTests.cs (4)
1090
}", TestOptions.
UnsafeReleaseExe
);
1296
}", TestOptions.
UnsafeReleaseExe
);
1318
}", TestOptions.
UnsafeReleaseExe
);
2554
CompileAndVerify(csharp, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: "42");
CodeGen\CodeGenRefConditionalOperatorTests.cs (2)
1221
verify(TestOptions.
UnsafeReleaseExe
, Verification.Passes, @"
1296
verify(TestOptions.
UnsafeReleaseExe
, @"
CodeGen\CodeGenRefLocalTests.cs (6)
91
}", options: TestOptions.
UnsafeReleaseExe
,
4207
verify(TestOptions.
UnsafeReleaseExe
, Verification.Passes, @"
4276
verify(TestOptions.
UnsafeReleaseExe
, @"
4332
verify(TestOptions.
UnsafeReleaseExe
, Verification.Passes, @"
4395
verify(TestOptions.
UnsafeReleaseExe
, Verification.Passes, @"
4447
verify(TestOptions.
UnsafeReleaseExe
, Verification.Passes, @"
CodeGen\CodeGenRefOutTests.cs (5)
514
verify(TestOptions.
UnsafeReleaseExe
, @"
573
verify(TestOptions.
UnsafeReleaseExe
, @"
650
verify(TestOptions.
UnsafeReleaseExe
, @"
721
verify(TestOptions.
UnsafeReleaseExe
, @"
797
verify(TestOptions.
UnsafeReleaseExe
, @"
CodeGen\CodeGenRefReadonlyReturnTests.cs (1)
433
}", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: "NullReferenceException");
CodeGen\CodeGenStackAllocInitializerTests.cs (17)
51
options: TestOptions.
UnsafeReleaseExe
,
124
options: TestOptions.
UnsafeReleaseExe
,
314
options: TestOptions.
UnsafeReleaseExe
,
370
options: TestOptions.
UnsafeReleaseExe
,
411
options: TestOptions.
UnsafeReleaseExe
,
494
options: TestOptions.
UnsafeReleaseExe
,
529
options: TestOptions.
UnsafeReleaseExe
,
569
options: TestOptions.
UnsafeReleaseExe
,
613
options: TestOptions.
UnsafeReleaseExe
,
671
options: TestOptions.
UnsafeReleaseExe
,
727
options: TestOptions.
UnsafeReleaseExe
,
869
", options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_3));
1050
", options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_3));
1498
verify: Verification.Fails, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
1526
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
1580
verify: Verification.Fails, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
1700
options: TestOptions.
UnsafeReleaseExe
,
CodeGen\CodeGenTests.cs (4)
14930
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @""
16289
var comp = CreateCompilationWithMscorlibAndSpan(source, TestOptions.
UnsafeReleaseExe
);
16746
var comp = CreateCompilationWithMscorlibAndSpan(source, TestOptions.
UnsafeReleaseExe
);
16770
var comp = CreateCompilationWithMscorlibAndSpan(source, TestOptions.
UnsafeReleaseExe
);
CodeGen\FixedSizeBufferTests.cs (11)
50
}", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
115
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
176
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Passes)
227
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Passes)
278
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Passes)
439
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
504
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
572
options: TestOptions.
UnsafeReleaseExe
,
607
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
758
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "133", verify: Verification.Fails)
1052
}", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: @"
CodeGen\PatternTests.cs (3)
4613
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4670
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4716
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
CodeGen\UnsafeTests.cs (137)
372
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "123", verify: Verification.Fails);
409
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "456", verify: Verification.Fails);
437
var compVerifierOptimized = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "2", verify: Verification.Fails);
500
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1", verify: Verification.Fails);
552
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"Before: 2 7
599
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"ab", verify: Verification.Fails);
647
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
694
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
712
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
752
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
776
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
827
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
849
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
903
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
926
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
970
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1008
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1084
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
1204
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
1248
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
1277
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "210", verify: Verification.Fails);
1297
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @"
1338
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"1", verify: Verification.Fails);
1396
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1454
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
1524
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
1659
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
1725
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"a", verify: Verification.Fails);
1956
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"hTrue", verify: Verification.Fails);
2027
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
2095
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
2163
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
2234
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"970104", verify: Verification.Fails);
4157
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4217
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4272
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2);
4305
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"0", verify: Verification.Fails);
4356
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4418
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4482
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4534
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4581
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4619
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4658
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"20", verify: Verification.Fails);
4732
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
4792
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
4884
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"2123
4973
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
5033
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"23", verify: Verification.Fails);
5111
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
5172
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5214
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5253
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2);
5289
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5325
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5361
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5400
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5474
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5502
var comp = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5539
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"");
5619
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5666
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"00", verify: Verification.Fails);
5793
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
5868
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
5869
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
5919
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
5920
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6594
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6595
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6760
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails).VerifyIL("C.Main", @"
6823
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1234", verify: Verification.FailsPEVerify).VerifyIL("C.Main", @"
6984
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
7071
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
7113
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
7697
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2147483651
7783
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @"
7847
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @"
7906
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "I0", verify: Verification.Fails).VerifyIL("S.Main", @"
7974
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "8", verify: Verification.Fails).VerifyIL("S.Main", @"
8081
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("S.Main", @"
8148
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "44", verify: Verification.Fails).VerifyIL("S.Main", @"
8206
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @"
8262
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @"
8321
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "01", verify: Verification.Fails).VerifyIL("S.Main", @"
8376
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "2", verify: Verification.Fails);
8774
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
8875
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
8910
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: expectedOutput);
8945
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
8954
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
8981
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
9045
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9092
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9122
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes, expectedOutput: @"
9172
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes);
9210
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9251
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
9360
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9461
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9496
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9531
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9588
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9645
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9692
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9736
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9784
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "011010011010", verify: Verification.Fails).VerifyIL("S.Main", @"
9880
", options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
9922
", options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
9963
", options: TestOptions.
UnsafeReleaseExe
);
10153
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"123
10194
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
10267
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @"
10290
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @"
10415
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
10473
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify);
10497
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Passes);
10768
CompileAndVerify(string.Format(template, "int"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
10769
CompileAndVerify(string.Format(template, "int*"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
10770
CompileAndVerify(string.Format(template, "int**"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
10771
CompileAndVerify(string.Format(template, "int[]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
10772
CompileAndVerify(string.Format(template, "int[][]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
10773
CompileAndVerify(string.Format(template, "int*[]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
10807
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.FailsPEVerify with
11003
var comp = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics();
11070
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "b", verify: Verification.Fails);
11114
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "hello", verify: Verification.Fails);
11183
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
11263
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
11379
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
11425
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
11474
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
11516
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F654320F", verify: Verification.Fails);
11559
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Passes);
11613
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "System.Byte[]", verify: Verification.Fails);
11832
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "OK", verify: Verification.Passes);
11857
var comp = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.FailsPEVerify);
11889
var comp = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0");
Emit\EmitCustomModifiers.cs (3)
45
options: TestOptions.
UnsafeReleaseExe
);
707
var compilation = CreateCompilationWithILAndMscorlib40(source, ilSource, options: TestOptions.
UnsafeReleaseExe
);
741
var compilation = CreateCompilationWithILAndMscorlib40(source, ilSource, options: TestOptions.
UnsafeReleaseExe
);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (11)
CodeGen\IndexAndRangeTests.cs (1)
3620
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
Emit\NumericIntPtrTests.cs (9)
1328
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
9427
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
9508
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
11047
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11051
comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11687
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11704
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11745
var comp = CreateCompilation(new[] { TestSources.Span, source }, options: TestOptions.
UnsafeReleaseExe
);
11748
comp = CreateCompilation(new[] { source }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
Emit\UnmanagedTypeModifierTests.cs (1)
1474
CompileAndVerify(code, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (40)
Attributes\AttributeTests_WellKnownAttributes.cs (2)
11479
var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.
UnsafeReleaseExe
);
11498
var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes);
FirstClassSpanTests.cs (5)
2001
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress),
2160
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
2398
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
2631
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
5145
CreateCompilationWithSpanAndMemoryExtensions(source, TestOptions.
UnsafeReleaseExe
, TestOptions.Regular.WithLanguageVersion(langVersion)).VerifyDiagnostics(
FlowAnalysis\FlowDiagnosticTests.cs (1)
2347
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "");
RefReadonlyParameterTests.cs (4)
3312
expectedOutput: "555", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
3334
CreateCompilation(new[] { source, RequiresLocationAttributeDefinition }, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
5091
expectedOutput: "111", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
5480
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
RefStructInterfacesTests.cs (11)
22676
var comp = CreateCompilation(src, targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, options: TestOptions.
UnsafeReleaseExe
);
22892
options: TestOptions.
UnsafeReleaseExe
,
22922
options: TestOptions.
UnsafeReleaseExe
,
22953
options: TestOptions.
UnsafeReleaseExe
,
22984
options: TestOptions.
UnsafeReleaseExe
,
23015
options: TestOptions.
UnsafeReleaseExe
,
23047
options: TestOptions.
UnsafeReleaseExe
,
23078
options: TestOptions.
UnsafeReleaseExe
,
23109
options: TestOptions.
UnsafeReleaseExe
,
23163
options: TestOptions.
UnsafeReleaseExe
,
23194
options: TestOptions.
UnsafeReleaseExe
,
Semantics\CollectionExpressionTests.cs (14)
6034
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
6061
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
6089
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
6114
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("0, 2, "));
6139
var comp = CreateCompilation(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80);
6185
CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[0, 2], "));
6207
var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("1010"));
6299
var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("10200"));
12380
options: TestOptions.
UnsafeReleaseExe
,
22589
options: useUnsafe ? TestOptions.
UnsafeReleaseExe
: TestOptions.ReleaseExe);
41723
var comp = CreateCompilation([sourceA, sourceB, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
);
41738
CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "[1, 2, 3], ");
41771
var comp = CreateCompilation([sourceA, sourceB1, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
);
41806
CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "[1, 2, 3], ");
Semantics\ParamsCollectionTests.cs (2)
13579
var comp5 = CreateCompilation(source5, references: [comp1Ref, comp3.ToMetadataReference()], options: TestOptions.
UnsafeReleaseExe
);
13680
var comp5 = CreateCompilation(source5, references: [comp1Ref, comp3.ToMetadataReference()], options: TestOptions.
UnsafeReleaseExe
);
Semantics\PatternMatchingTests.cs (1)
6521
var compilation = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IDelegateCreationExpression.cs (1)
2045
var comp = CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
);
IOperation\IOperationTests_IObjectCreationExpression.cs (1)
1399
", options: TestOptions.
UnsafeReleaseExe
);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (150)
Semantics\DelegateTypeTests.cs (26)
3799
CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4623
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.
UnsafeReleaseExe
);
11650
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11798
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11839
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
12162
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12207
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12260
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
12326
CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12383
CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12418
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12455
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12482
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12536
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12602
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12665
CompileAndVerify(sourceB, references: new[] { refA }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12722
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12763
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13015
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13059
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13162
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
13295
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: $"""
13318
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: $"""
14436
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
17526
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: "True").VerifyDiagnostics();
17540
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4").VerifyDiagnostics();
Semantics\FunctionPointerTests.cs (19)
237
}", options: TestOptions.
UnsafeReleaseExe
);
2049
var comp = CreateCompilationWithIL(source, il, options: TestOptions.
UnsafeReleaseExe
);
2082
var comp = CreateCompilationWithIL(code, il, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.
UnsafeReleaseExe
);
2698
", options: TestOptions.
UnsafeReleaseExe
, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped);
2723
", options: TestOptions.
UnsafeReleaseExe
, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped);
2748
", options: TestOptions.
UnsafeReleaseExe
);
2780
", options: TestOptions.
UnsafeReleaseExe
);
2812
", options: TestOptions.
UnsafeReleaseExe
);
2845
", options: TestOptions.
UnsafeReleaseExe
);
2878
", options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.NetCoreApp);
2911
", options: TestOptions.
UnsafeReleaseExe
);
2946
", expectedOutput: "11", options: TestOptions.
UnsafeReleaseExe
, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped);
2976
", options: TestOptions.
UnsafeReleaseExe
);
3003
", options: TestOptions.
UnsafeReleaseExe
);
3033
", options: TestOptions.
UnsafeReleaseExe
);
3060
", options: TestOptions.
UnsafeReleaseExe
);
3269
}", options: TestOptions.
UnsafeReleaseExe
);
3350
var comp = CreateCompilationWithFunctionPointers(source, TestOptions.
UnsafeReleaseExe
);
3846
}", options: TestOptions.
UnsafeReleaseExe
);
Semantics\GenericConstraintsTests.cs (10)
2437
options: TestOptions.
UnsafeReleaseExe
, references: new[] { reference, reference1 }, verify: Verification.Passes, expectedOutput: "123");
2523
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: string.Join(Environment.NewLine, type, size)).VerifyIL("Test.M<T>", @"
2575
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: "246").VerifyIL("Test.M<T>", @"
2613
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes, expectedOutput: "NotNullableValueTypeConstraint, DefaultConstructorConstraint");
2638
}", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes, expectedOutput: "4");
2673
}", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes, expectedOutput: "8");
3042
options: TestOptions.
UnsafeReleaseExe
,
3929
CompileAndVerify(code, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "42", verify: Verification.Skipped);
4260
options: TestOptions.
UnsafeReleaseExe
,
4316
options: TestOptions.
UnsafeReleaseExe
,
Semantics\InterpolationTests.cs (1)
3660
var comp = CreateCompilation(new[] { source, interpolatedStringBuilder }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.NetCoreApp);
Semantics\NativeIntegerTests.cs (3)
4340
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
13872
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
15832
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
Semantics\OperatorTests.cs (1)
11497
var comp = CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
);
Semantics\OverloadResolutionTests.cs (4)
2741
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"2
9694
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular11).VerifyDiagnostics(
9706
CompileAndVerify(source, expectedOutput: "555", options: TestOptions.
UnsafeReleaseExe
,
9709
CompileAndVerify(source, expectedOutput: "555", options: TestOptions.
UnsafeReleaseExe
,
Semantics\RawInterpolationTests_Handler.cs (1)
2023
var comp = CreateCompilation(new[] { source, interpolatedStringBuilder }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.NetCoreApp);
Semantics\RefFieldTests.cs (8)
602
var comp = CreateCompilation(sourceB, references: new[] { refA }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
10320
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
10364
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
10418
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
11180
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
11203
comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
18074
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
28317
var comp = CreateCompilation(source, targetFramework: TargetFramework.Net70, options: TestOptions.
UnsafeReleaseExe
);
Semantics\SemanticErrorTests.cs (3)
16011
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2).VerifyDiagnostics(
16051
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
16098
var c = CompileAndVerify(text, expectedOutput: "7788", verify: Verification.Fails, options: TestOptions.
UnsafeReleaseExe
);
Semantics\StackAllocInitializerTests.cs (6)
523
}", TestOptions.
UnsafeReleaseExe
);
778
""", TestOptions.
UnsafeReleaseExe
);
957
}", TestOptions.
UnsafeReleaseExe
);
975
}", TestOptions.
UnsafeReleaseExe
);
1793
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(
1804
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
Semantics\StackAllocSpanExpressionsTests.cs (2)
588
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(
593
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
Semantics\UnsafeTests.cs (63)
610
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
619
CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
620
CompileAndVerify(code, expectedOutput: expectedOutput, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
702
var comp = CreateCompilationWithTasksExtensions(code, options: TestOptions.
UnsafeReleaseExe
);
811
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
812
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
813
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2196
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2197
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2198
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2216
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2217
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2218
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2240
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2241
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2242
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2263
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2264
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2265
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2282
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2283
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2284
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2301
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
2306
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2307
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2328
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2329
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2330
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2343
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
2363
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2387
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2388
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2401
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2402
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2403
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2423
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2424
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2425
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2441
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2442
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2443
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2463
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2464
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2465
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2488
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2489
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2490
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2516
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2517
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2518
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2541
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2552
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2553
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2576
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2577
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2578
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
10037
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: "42");
11825
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
12133
var compilation = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
12250
var compilation = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
12415
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails,
12511
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"246");
12555
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"4812");
Semantics\UserDefinedConversionTests.cs (3)
1159
var verifier = CompileAndVerify(source: source1 + source3 + source5, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "");
1865
var comp = CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
);
1910
var comp = CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1387
var comp = CreateCompilationWithIL(source, ilSource, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
Symbols\PartialPropertiesTests.cs (1)
2004
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: "1");