645 references to UnsafeReleaseExe
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (200)
UnsafeEvolutionTests.cs (200)
956
options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
963
options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
965
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
967
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
971
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
975
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
992
options: TestOptions.
UnsafeReleaseExe
)
997
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1022
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
1027
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1031
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1035
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(
1108
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
1113
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1117
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1121
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(
1204
options: TestOptions.
UnsafeReleaseExe
)
1220
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
)
1225
options: TestOptions.
UnsafeReleaseExe
)
1228
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1233
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1238
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1264
options: TestOptions.
UnsafeReleaseExe
)
1269
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1319
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1323
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1327
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1437
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1441
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1445
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1498
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1521
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1525
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1529
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1589
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1667
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1737
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1821
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1854
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1858
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1862
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
1924
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
1929
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1933
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
1937
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(
2033
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
)
2037
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2043
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2049
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2119
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
2123
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
2127
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2320
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
2325
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
2329
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
2333
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(
2437
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics(expectedWarnings);
2442
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(expectedWarnings);
2446
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(expectedWarnings);
2450
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(
2664
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyEmitDiagnostics();
2669
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
2673
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics();
2677
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyEmitDiagnostics(
2699
options: TestOptions.
UnsafeReleaseExe
)
2751
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
)
2756
options: TestOptions.
UnsafeReleaseExe
)
2759
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2764
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2769
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2958
options: TestOptions.
UnsafeReleaseExe
)
2980
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
)
2985
options: TestOptions.
UnsafeReleaseExe
)
2988
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2993
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
2998
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3147
options: TestOptions.
UnsafeReleaseExe
)
3169
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
)
3174
options: TestOptions.
UnsafeReleaseExe
)
3177
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3182
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3187
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3232
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
)
3235
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3240
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3245
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3292
options: TestOptions.
UnsafeReleaseExe
)
3295
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
)
3300
options: TestOptions.
UnsafeReleaseExe
)
3303
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3308
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3313
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3339
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3381
CreateCompilation([source, IsExternalInitTypeDefinition], options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
3383
CreateCompilation([source, IsExternalInitTypeDefinition], options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules().WithWarningLevel(10)).VerifyDiagnostics(expectedDiagnostics);
3395
CreateCompilation([source, IsExternalInitTypeDefinition], options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyDiagnostics(expectedDiagnostics);
3397
CreateCompilation([source, IsExternalInitTypeDefinition], options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules().WithWarningLevel(11)).VerifyDiagnostics(expectedDiagnostics);
3401
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyDiagnostics(expectedDiagnostics);
3405
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules()).VerifyDiagnostics(
3434
options: TestOptions.
UnsafeReleaseExe
)
3477
CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
)
3482
options: TestOptions.
UnsafeReleaseExe
)
3485
CreateCompilationWithSpan([source], options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3490
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3495
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3575
options: TestOptions.
UnsafeReleaseExe
.WithMetadataImportOptions(MetadataImportOptions.All),
3593
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules().WithMetadataImportOptions(MetadataImportOptions.All),
3612
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
3986
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
4132
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
4137
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
4366
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
4763
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
5680
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
5745
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
5760
options: TestOptions.
UnsafeReleaseExe
)
5794
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
7825
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
7836
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
7848
options: TestOptions.
UnsafeReleaseExe
)
7857
options: TestOptions.
UnsafeReleaseExe
)
7866
options: TestOptions.
UnsafeReleaseExe
)
7973
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
7985
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
7998
options: TestOptions.
UnsafeReleaseExe
)
8009
options: TestOptions.
UnsafeReleaseExe
)
8015
options: TestOptions.
UnsafeReleaseExe
)
8045
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8057
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8069
options: TestOptions.
UnsafeReleaseExe
)
8077
options: TestOptions.
UnsafeReleaseExe
)
8083
options: TestOptions.
UnsafeReleaseExe
)
8110
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8116
options: TestOptions.
UnsafeReleaseExe
,
8153
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8159
options: TestOptions.
UnsafeReleaseExe
,
8199
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8215
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8228
options: TestOptions.
UnsafeReleaseExe
)
8248
options: TestOptions.
UnsafeReleaseExe
)
8254
options: TestOptions.
UnsafeReleaseExe
)
8291
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8307
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8320
options: TestOptions.
UnsafeReleaseExe
)
8340
options: TestOptions.
UnsafeReleaseExe
)
8346
options: TestOptions.
UnsafeReleaseExe
)
8406
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8510
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8525
options: TestOptions.
UnsafeReleaseExe
)
8539
options: TestOptions.
UnsafeReleaseExe
)
8545
options: TestOptions.
UnsafeReleaseExe
)
8595
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8613
options: TestOptions.
UnsafeReleaseExe
)
8648
options: TestOptions.
UnsafeReleaseExe
)
8654
options: TestOptions.
UnsafeReleaseExe
)
8684
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8699
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8712
options: TestOptions.
UnsafeReleaseExe
)
8726
options: TestOptions.
UnsafeReleaseExe
)
8732
options: TestOptions.
UnsafeReleaseExe
)
8770
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8793
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8806
options: TestOptions.
UnsafeReleaseExe
)
8835
options: TestOptions.
UnsafeReleaseExe
)
8841
options: TestOptions.
UnsafeReleaseExe
)
8875
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8891
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8904
options: TestOptions.
UnsafeReleaseExe
)
8918
options: TestOptions.
UnsafeReleaseExe
)
8924
options: TestOptions.
UnsafeReleaseExe
)
8953
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
8965
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
8978
options: TestOptions.
UnsafeReleaseExe
)
8986
options: TestOptions.
UnsafeReleaseExe
)
8992
options: TestOptions.
UnsafeReleaseExe
)
9018
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
9029
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
9042
options: TestOptions.
UnsafeReleaseExe
)
9053
options: TestOptions.
UnsafeReleaseExe
)
9059
options: TestOptions.
UnsafeReleaseExe
)
9090
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
9102
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
9115
options: TestOptions.
UnsafeReleaseExe
)
9219
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
9259
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
9838
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
9878
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
9962
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10015
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10060
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10146
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10199
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10228
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10306
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10358
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10398
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10474
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10527
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10567
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules())
10693
options: TestOptions.
UnsafeReleaseExe
.WithUpdatedMemorySafetyRules(),
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (226)
CodeGen\CodeGenAsyncLocalsTests.cs (1)
1312
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"1", verify: Verification.Fails);
CodeGen\CodeGenAsyncTests.cs (3)
2020
CompileAndVerify(source, expectedOutput: "0", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
2064
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: releaseSymbolValidator, verify: Verification.Fails)
2123
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
);
7465
var verifier = CompileAndVerifyFunctionPointers(source, expectedOutput: "", options: TestOptions.
UnsafeReleaseExe
);
8326
}", il, options: TestOptions.
UnsafeReleaseExe
);
8454
", il, options: TestOptions.
UnsafeReleaseExe
);
10711
", UnmanagedCallersOnlyAttribute }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.NetCoreApp);
10948
}", options: TestOptions.
UnsafeReleaseExe
);
10976
var comp = CreateCompilationWithSpan(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
10983
comp = CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
);
11010
var comp = CreateCompilationWithSpan(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
11026
comp = CreateCompilationWithSpan(source, options: TestOptions.
UnsafeReleaseExe
);
11043
}", options: TestOptions.
UnsafeReleaseExe
);
11291
", options: TestOptions.
UnsafeReleaseExe
);
11399
}", options: TestOptions.
UnsafeReleaseExe
);
11911
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
,
CodeGen\CodeGenInParametersTests.cs (2)
1754
var comp = CreateCompilationWithMscorlib46(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.
UnsafeReleaseExe
);
1840
comp = CreateCompilationWithMscorlib46(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature());
CodeGen\CodeGenReadonlyStructTests.cs (4)
1114
}", TestOptions.
UnsafeReleaseExe
);
1320
}", TestOptions.
UnsafeReleaseExe
);
1342
}", TestOptions.
UnsafeReleaseExe
);
2578
CompileAndVerify(csharp, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: "42");
CodeGen\CodeGenRefConditionalOperatorTests.cs (2)
1228
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
1303
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, @"
4414
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
4467
verify(TestOptions.
UnsafeReleaseExe
, Verification.Fails, @"
CodeGen\CodeGenRefOutTests.cs (5)
516
verify(TestOptions.
UnsafeReleaseExe
, @"
575
verify(TestOptions.
UnsafeReleaseExe
, @"
652
verify(TestOptions.
UnsafeReleaseExe
, @"
723
verify(TestOptions.
UnsafeReleaseExe
, @"
799
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)
461
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
529
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
597
options: TestOptions.
UnsafeReleaseExe
,
632
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails)
783
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "133", verify: Verification.Fails)
1077
}", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: @"
CodeGen\PatternTests.cs (3)
4608
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4665
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4711
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
CodeGen\UnsafeTests.cs (142)
388
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "123", verify: Verification.Fails);
425
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "456", verify: Verification.Fails);
453
var compVerifierOptimized = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "2", verify: Verification.Fails);
516
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1", verify: Verification.Fails);
568
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"Before: 2 7
615
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"ab", verify: Verification.Fails);
663
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
1714
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
1732
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
1772
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1796
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
1847
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1869
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1923
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1946
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
1990
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
2028
compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"34", verify: Verification.Fails);
2104
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
2224
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
2268
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
2297
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "210", verify: Verification.Fails);
2317
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @"
2358
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"1", verify: Verification.Fails);
2416
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"123", verify: Verification.Fails);
2474
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
2544
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
2679
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"12", verify: Verification.Fails);
2745
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"a", verify: Verification.Fails);
2976
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"hTrue", verify: Verification.Fails);
3047
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
3115
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
3183
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"01", verify: Verification.Fails);
3254
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"970104", verify: Verification.Fails);
5177
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
5237
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
5292
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2);
5325
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"0", verify: Verification.Fails);
5376
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
5438
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Fails);
5502
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5554
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5601
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5639
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
5678
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"20", verify: Verification.Fails);
5752
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
5812
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
5904
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"2123
5993
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"5456");
6053
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"23", verify: Verification.Fails);
6136
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"23", verify: Verification.Fails);
6248
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"3", verify: Verification.Fails);
6309
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6351
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6390
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2);
6426
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6462
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6498
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6537
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6611
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6639
var comp = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6676
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"");
6756
var compVerifier = CreateCompilationWithMscorlib46(text, options: TestOptions.
UnsafeReleaseExe
);
6803
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"00", verify: Verification.Fails);
6930
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
7005
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7006
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7056
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7057
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7731
CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7732
CompileAndVerify(string.Format(template, "checked"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL);
7897
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "12", verify: Verification.Fails).VerifyIL("C.Main", @"
7960
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "1234", verify: Verification.FailsPEVerify).VerifyIL("C.Main", @"
8121
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
8208
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
8250
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @"
8834
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2147483651
8920
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @"
8984
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @"
9043
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "I0", verify: Verification.Fails).VerifyIL("S.Main", @"
9111
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "8", verify: Verification.Fails).VerifyIL("S.Main", @"
9218
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("S.Main", @"
9285
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "44", verify: Verification.Fails).VerifyIL("S.Main", @"
9343
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @"
9399
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @"
9458
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "01", verify: Verification.Fails).VerifyIL("S.Main", @"
9513
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "2", verify: Verification.Fails);
9911
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10012
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10047
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: expectedOutput);
10082
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10091
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
10118
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
10182
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10229
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10259
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Passes, expectedOutput: @"
10309
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Passes);
10347
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10388
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
10497
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10598
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10633
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10668
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10725
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10782
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10829
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10873
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.Fails);
10921
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "011010011010", verify: Verification.Fails).VerifyIL("S.Main", @"
11017
", options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
11059
", options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"
11101
CreateCompilation(source, parseOptions: TestOptions.Regular14, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
11107
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
11108
CreateCompilation(source, parseOptions: TestOptions.RegularNext, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
11292
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"123
11333
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
11406
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @"
11429
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @"
11554
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
11612
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify);
11636
CompileAndVerify(text, parseOptions: TestOptions.Regular14, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"2", verify: Verification.Passes);
11645
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedPreviewDiagnostics);
11646
CreateCompilation(text, parseOptions: TestOptions.RegularNext, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedPreviewDiagnostics);
11933
CompileAndVerify(string.Format(template, "int"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11934
CompileAndVerify(string.Format(template, "int*"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11935
CompileAndVerify(string.Format(template, "int**"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11936
CompileAndVerify(string.Format(template, "int[]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11937
CompileAndVerify(string.Format(template, "int[][]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11938
CompileAndVerify(string.Format(template, "int*[]"), options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"True", verify: Verification.Passes);
11972
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.FailsPEVerify with
12168
var comp = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics();
12235
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "b", verify: Verification.Fails);
12279
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "hello", verify: Verification.Fails);
12348
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
12428
var verifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"
12544
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
12590
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
12639
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F6543210", verify: Verification.Fails);
12681
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "F654320F", verify: Verification.Fails);
12724
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.Passes);
12778
var compVerifier = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "System.Byte[]", verify: Verification.Fails);
12997
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "OK", verify: Verification.Passes);
13022
var comp = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "0", verify: Verification.FailsPEVerify);
13054
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)
3625
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);
9436
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
9517
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.Net70);
11056
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11060
comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11696
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11713
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
11754
var comp = CreateCompilation(new[] { TestSources.Span, source }, options: TestOptions.
UnsafeReleaseExe
);
11757
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 (51)
Attributes\AttributeTests_WellKnownAttributes.cs (2)
11558
var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.
UnsafeReleaseExe
);
11577
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)
3318
expectedOutput: "555", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
3340
CreateCompilation(new[] { source, RequiresLocationAttributeDefinition }, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
5097
expectedOutput: "111", options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
5486
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
RefStructInterfacesTests.cs (11)
23073
var comp = CreateCompilation(src, targetFramework: s_targetFrameworkSupportingByRefLikeGenerics, options: TestOptions.
UnsafeReleaseExe
);
23289
options: TestOptions.
UnsafeReleaseExe
,
23319
options: TestOptions.
UnsafeReleaseExe
,
23350
options: TestOptions.
UnsafeReleaseExe
,
23381
options: TestOptions.
UnsafeReleaseExe
,
23412
options: TestOptions.
UnsafeReleaseExe
,
23444
options: TestOptions.
UnsafeReleaseExe
,
23475
options: TestOptions.
UnsafeReleaseExe
,
23506
options: TestOptions.
UnsafeReleaseExe
,
23560
options: TestOptions.
UnsafeReleaseExe
,
23591
options: TestOptions.
UnsafeReleaseExe
,
Semantics\CollectionExpressionTests.cs (14)
7874
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
7901
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
7929
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
7954
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("0, 2, "));
7979
var comp = CreateCompilation(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80);
8025
CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[0, 2], "));
8047
var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("1010"));
8139
var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("10200"));
14212
options: TestOptions.
UnsafeReleaseExe
,
24579
options: useUnsafe ? TestOptions.
UnsafeReleaseExe
: TestOptions.ReleaseExe);
44723
var comp = CreateCompilation([sourceA, sourceB, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
);
44738
CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "[1, 2, 3], ");
44771
var comp = CreateCompilation([sourceA, sourceB1, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
);
44806
CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "[1, 2, 3], ");
Semantics\ExtensionTests.cs (9)
26671
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
26700
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
26727
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net90);
26812
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
26849
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
26873
comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
26911
var comp = CreateCompilation(src, options: TestOptions.
UnsafeReleaseExe
);
26949
VerifyOperationTreeAndDiagnosticsForTest<FixedStatementSyntax>(src, expectedOperationTree, [], targetFramework: TargetFramework.Net70, compilationOptions: TestOptions.
UnsafeReleaseExe
);
26977
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
Semantics\ExtensionTests2.cs (2)
9917
comp = CreateRuntimeAsyncCompilation(src, options: TestOptions.
UnsafeReleaseExe
);
11246
comp = CreateRuntimeAsyncCompilation(src, options: TestOptions.
UnsafeReleaseExe
);
Semantics\ParamsCollectionTests.cs (2)
13568
var comp5 = CreateCompilation(source5, references: [comp1Ref, comp3.ToMetadataReference()], options: TestOptions.
UnsafeReleaseExe
);
13674
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 (153)
Semantics\DelegateTypeTests.cs (26)
3871
CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
4695
var comp = CreateEmptyCompilation(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.
UnsafeReleaseExe
);
11722
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11870
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
11911
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
12234
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12279
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12332
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
12398
CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12455
CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12490
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12527
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12554
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12608
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12674
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12737
CompileAndVerify(sourceB, references: new[] { refA }, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12794
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
12835
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13087
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13131
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput:
13234
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
13367
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: $"""
13390
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: $"""
14540
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
17630
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: "True").VerifyDiagnostics();
17644
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: "4").VerifyDiagnostics();
Semantics\FunctionPointerTests.cs (19)
238
}", options: TestOptions.
UnsafeReleaseExe
);
2051
var comp = CreateCompilationWithIL(source, il, options: TestOptions.
UnsafeReleaseExe
);
2084
var comp = CreateCompilationWithIL(code, il, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.
UnsafeReleaseExe
);
2700
", options: TestOptions.
UnsafeReleaseExe
, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped);
2725
", options: TestOptions.
UnsafeReleaseExe
, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped);
2750
", options: TestOptions.
UnsafeReleaseExe
);
2782
", options: TestOptions.
UnsafeReleaseExe
);
2814
", options: TestOptions.
UnsafeReleaseExe
);
2847
", options: TestOptions.
UnsafeReleaseExe
);
2880
", options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.NetCoreApp);
2913
", options: TestOptions.
UnsafeReleaseExe
);
2948
", expectedOutput: "11", options: TestOptions.
UnsafeReleaseExe
, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped);
2978
", options: TestOptions.
UnsafeReleaseExe
);
3005
", options: TestOptions.
UnsafeReleaseExe
);
3035
", options: TestOptions.
UnsafeReleaseExe
);
3062
", options: TestOptions.
UnsafeReleaseExe
);
3259
}", options: TestOptions.
UnsafeReleaseExe
);
3338
var comp = CreateCompilationWithFunctionPointers(source, TestOptions.
UnsafeReleaseExe
);
3834
}", 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);
13880
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
15840
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
Semantics\OperatorTests.cs (1)
12547
var comp = CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
);
Semantics\OverloadResolutionTests.cs (4)
2741
CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: @"2
9691
CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular11).VerifyDiagnostics(
9703
CompileAndVerify(source, expectedOutput: "555", options: TestOptions.
UnsafeReleaseExe
,
9706
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)
15101
options: TestOptions.
UnsafeReleaseExe
,
Semantics\RefFieldTests.cs (8)
628
var comp = CreateCompilation(sourceB, references: new[] { refA }, options: TestOptions.
UnsafeReleaseExe
, targetFramework: TargetFramework.Net70);
10454
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
10498
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
10552
options: (useUnsafe ? TestOptions.
UnsafeReleaseExe
: null));
11314
var comp = CreateCompilation(source, parseOptions: TestOptions.Regular10, options: TestOptions.
UnsafeReleaseExe
);
11337
comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
18176
var comp = CreateCompilation(source, options: TestOptions.
UnsafeReleaseExe
);
28921
var comp = CreateCompilation(source, targetFramework: TargetFramework.Net70, options: TestOptions.
UnsafeReleaseExe
);
Semantics\SemanticErrorTests.cs (5)
16130
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_2).VerifyDiagnostics(
16170
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular14).VerifyDiagnostics(
16189
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedPreviewDiagnostics);
16191
CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.RegularNext).VerifyDiagnostics(expectedPreviewDiagnostics);
16231
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
);
1797
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(
1808
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
Semantics\StackAllocSpanExpressionsTests.cs (2)
592
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular7_3).VerifyDiagnostics(
597
CreateCompilationWithMscorlibAndSpan(test, TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
Semantics\UnsafeTests.cs (63)
611
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
620
CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
621
CompileAndVerify(code, expectedOutput: expectedOutput, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
703
var comp = CreateCompilationWithTasksExtensions(code, options: TestOptions.
UnsafeReleaseExe
);
812
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
813
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
814
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2243
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2244
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2245
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
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2287
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2288
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2289
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2310
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2311
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2312
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2329
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2330
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2331
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2348
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
2353
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2354
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2375
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2376
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2377
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2390
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(
2410
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2434
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2435
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2448
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2449
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2450
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2470
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2471
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2472
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2488
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2489
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2490
CreateCompilation(code, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics();
2510
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2511
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2512
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2535
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2536
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2537
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2563
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2564
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2565
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2588
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2599
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2600
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
2623
CreateCompilation(code, parseOptions: TestOptions.Regular12, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2624
CreateCompilation(code, parseOptions: TestOptions.Regular13, options: TestOptions.
UnsafeReleaseExe
).VerifyDiagnostics(expectedDiagnostics);
2625
VerifyUnsafeContextDiagnostics(code, TestOptions.
UnsafeReleaseExe
, expectedDiagnostics);
10144
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Skipped, expectedOutput: "42");
11960
var comp = CreateCompilation(text, options: TestOptions.
UnsafeReleaseExe
);
12268
var compilation = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
12385
var compilation = CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails);
12550
options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails,
12646
CompileAndVerify(text, options: TestOptions.
UnsafeReleaseExe
, expectedOutput: @"246");
12690
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)
1392
var comp = CreateCompilationWithIL(source, ilSource, options: TestOptions.
UnsafeReleaseExe
, parseOptions: TestOptions.Regular9);
Symbols\PartialPropertiesTests.cs (1)
2031
var verifier = CompileAndVerify(source, options: TestOptions.
UnsafeReleaseExe
, verify: Verification.Fails, expectedOutput: "1");