436 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)
2125
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)
1752
var comp = CreateCompilationWithMscorlib46(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.
UnsafeReleaseExe
);
1838
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
,
4216
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
4286
verify(TestOptions.
UnsafeReleaseExe
, @"
4345
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
4411
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
4464
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
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)
230
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Passes)
284
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Passes)
448
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
516
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
584
options: TestOptions.
UnsafeReleaseExe
,
619
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
770
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "133", verify: Verification.Fails)
1064
}", 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);
970
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
988
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
1028
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1052
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1103
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1125
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1179
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1202
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1246
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1284
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1360
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
1480
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
1524
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
1553
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "210", verify: Verification.Fails);
1573
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @"
1614
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"1", verify: Verification.Fails);
1672
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1730
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
1800
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
1935
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
2001
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"a", verify: Verification.Fails);
2232
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"hTrue", verify: Verification.Fails);
2303
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
2371
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
2439
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
2510
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"970104", verify: Verification.Fails);
4433
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4493
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4548
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2);
4581
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"0", verify: Verification.Fails);
4632
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4694
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
4758
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4810
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4857
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4895
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
4934
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"20", verify: Verification.Fails);
5008
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
5068
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
5160
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"2123
5249
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
5309
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"23", verify: Verification.Fails);
5387
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
5448
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5490
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5529
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2);
5565
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5601
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5637
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5676
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5750
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5778
var comp = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5815
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"");
5895
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5942
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"00", verify: Verification.Fails);
6069
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
6144
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6145
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6195
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6196
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6870
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
6871
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7036
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails).VerifyIL("C.Main", @"
7099
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1234", verify: Verification.FailsPEVerify).VerifyIL("C.Main", @"
7260
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
7347
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
7389
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
7973
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2147483651
8059
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @"
8123
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @"
8182
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "I0", verify: Verification.Fails).VerifyIL("S.Main", @"
8250
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "8", verify: Verification.Fails).VerifyIL("S.Main", @"
8357
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("S.Main", @"
8424
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "44", verify: Verification.Fails).VerifyIL("S.Main", @"
8482
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @"
8538
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @"
8597
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "01", verify: Verification.Fails).VerifyIL("S.Main", @"
8652
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "2", verify: Verification.Fails);
9050
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9151
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9186
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: expectedOutput);
9221
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9230
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
9257
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
9321
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9368
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9398
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes, expectedOutput: @"
9448
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes);
9486
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9527
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
9636
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9737
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9772
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9807
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9864
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9921
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
9968
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10012
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10060
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "011010011010", verify: Verification.Fails).VerifyIL("S.Main", @"
10156
", options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
10198
", options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
10239
", options: TestOptions.
UnsafeReleaseExe
);
10429
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"123
10470
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
10543
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @"
10566
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @"
10691
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
10749
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify);
10773
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Passes);
11044
CompileAndVerify(string.Format(template, "int"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11045
CompileAndVerify(string.Format(template, "int*"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11046
CompileAndVerify(string.Format(template, "int**"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11047
CompileAndVerify(string.Format(template, "int[]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11048
CompileAndVerify(string.Format(template, "int[][]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11049
CompileAndVerify(string.Format(template, "int*[]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11083
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.FailsPEVerify with
11279
var comp = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics();
11346
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "b", verify: Verification.Fails);
11390
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "hello", verify: Verification.Fails);
11459
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
11539
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
11655
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
11701
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
11750
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
11792
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F654320F", verify: Verification.Fails);
11835
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Passes);
11889
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "System.Byte[]", verify: Verification.Fails);
12108
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "OK", verify: Verification.Passes);
12133
var comp = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.FailsPEVerify);
12165
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)
1334
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
9433
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
9514
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
11053
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11057
comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11693
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11710
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11751
var comp = CreateCompilation(new[] { TestSources.Span, source }, options: TestOptions.
UnsafeReleaseExe
);
11754
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 (49)
Attributes\AttributeTests_WellKnownAttributes.cs (2)
11518
var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.
UnsafeReleaseExe
);
11537
var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes);
FirstClassSpanTests.cs (5)
2002
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress),
2161
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
2399
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
2632
options: TestOptions.
UnsafeReleaseExe
.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
5177
CreateCompilationWithSpanAndMemoryExtensions(source, TestOptions.
UnsafeReleaseExe
, TestOptions.Regular.WithLanguageVersion(langVersion)).VerifyDiagnostics(
FlowAnalysis\FlowDiagnosticTests.cs (1)
2347
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "");
RefReadonlyParameterTests.cs (4)
3309
expectedOutput: "555", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
3331
CreateCompilation(new[] { source, RequiresLocationAttributeDefinition }, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
5088
expectedOutput: "111", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
5477
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
RefStructInterfacesTests.cs (11)
22677
var comp = CreateCompilation(src, targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, options: TestOptions.
UnsafeReleaseExe
);
22893
options: TestOptions.
UnsafeReleaseExe
,
22923
options: TestOptions.
UnsafeReleaseExe
,
22954
options: TestOptions.
UnsafeReleaseExe
,
22985
options: TestOptions.
UnsafeReleaseExe
,
23016
options: TestOptions.
UnsafeReleaseExe
,
23048
options: TestOptions.
UnsafeReleaseExe
,
23079
options: TestOptions.
UnsafeReleaseExe
,
23110
options: TestOptions.
UnsafeReleaseExe
,
23164
options: TestOptions.
UnsafeReleaseExe
,
23195
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"));
12383
options: TestOptions.
UnsafeReleaseExe
,
22602
options: useUnsafe ? TestOptions.
UnsafeReleaseExe
: TestOptions.ReleaseExe);
41810
var comp = CreateCompilation([sourceA, sourceB, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
);
41825
CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "[1, 2, 3], ");
41858
var comp = CreateCompilation([sourceA, sourceB1, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
);
41893
CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "[1, 2, 3], ");
Semantics\ExtensionTests.cs (9)
24569
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
24598
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
24625
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net90);
24710
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
24747
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
24771
comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
24809
var comp = CreateCompilation(src, options: TestOptions.
UnsafeReleaseExe
);
24847
VerifyOperationTreeAndDiagnosticsForTest<FixedStatementSyntax>(src, expectedOperationTree, [], targetFramework: TargetFramework.Net70, compilationOptions: TestOptions.
UnsafeReleaseExe
);
24875
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
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 (151)
Semantics\DelegateTypeTests.cs (26)
3897
CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4721
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.
UnsafeReleaseExe
);
11748
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11896
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11937
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
12260
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12305
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12358
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
12424
CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12481
CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12516
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12553
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12580
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12634
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12700
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12763
CompileAndVerify(sourceB, references: new[] { refA }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12820
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12861
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13113
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13157
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13260
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
13393
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: $"""
13416
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: $"""
14566
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
17656
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: "True").VerifyDiagnostics();
17670
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)
4345
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
13877
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
15837
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
Semantics\OperatorTests.cs (1)
12138
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\RefEscapingTests.cs (1)
11931
options: TestOptions.
UnsafeReleaseExe
,
Semantics\RefFieldTests.cs (8)
628
var comp = CreateCompilation(sourceB, references: new[] { refA }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
10382
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
10426
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
10480
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
11242
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
11265
comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
18141
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
28934
var comp = CreateCompilation(source, targetFramework: TargetFramework.Net70, options: TestOptions.
UnsafeReleaseExe
);
Semantics\SemanticErrorTests.cs (3)
16074
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2).VerifyDiagnostics(
16114
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
16161
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)
1389
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");