8 instantiations of Verification
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\NumericIntPtrTests.cs (2)
9035CompileAndVerify(comp, verify: new Verification() { Status = VerificationStatus.PassesOrFailFast | VerificationStatus.FailsPEVerify }, expectedOutput: IncludeExpectedOutput(expectedResult)); 9070CompileAndVerify(comp, verify: new Verification() { Status = VerificationStatus.FailsPEVerify | VerificationStatus.PassesOrFailFast }, expectedOutput: IncludeExpectedOutput(expectedResult)).VerifyDiagnostics(expectedDiagnostics);
Microsoft.CodeAnalysis.Test.Utilities (6)
CommonTestBase.cs (6)
54public static readonly Verification Skipped = new() { Status = VerificationStatus.Skipped }; 55public static readonly Verification Passes = new() { Status = VerificationStatus.Passes }; 56public static readonly Verification FailsPEVerify = new() { Status = VerificationStatus.FailsPEVerify }; 57public static readonly Verification FailsILVerify = new() { Status = VerificationStatus.FailsILVerify }; 58public static readonly Verification Fails = new() { Status = VerificationStatus.Fails }; 59public static readonly Verification PassesOrFailFast = new() { Status = VerificationStatus.PassesOrFailFast };
2892 references to Verification
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (696)
CodeGen\CodeGenAsyncIteratorTests.cs (5)
713var verifier = CompileAndVerify(comp, expectedOutput: "123", verify: Verification.FailsILVerify); 872var verifier = CompileAndVerify(comp, expectedOutput: "123", verify: Verification.FailsILVerify); 8517CompileAndVerify(comp, expectedOutput: ExpectedOutput("42"), verify: Verification.FailsPEVerify); 8552CompileAndVerify(comp, expectedOutput: ExpectedOutput("42"), verify: Verification.FailsPEVerify); 8593CompileAndVerify(comp, expectedOutput: ExpectedOutput("42"), verify: Verification.FailsPEVerify);
CodeGen\CodeGenAsyncLocalsTests.cs (3)
27private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null, Verification verify = default) 1301var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1406verifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"1", verify: Verification.Fails);
CodeGen\CodeGenAsyncSpillTests.cs (6)
960CompileAndVerify(source, verify: Verification.Passes, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 3279verify: Verification.FailsILVerify with { ILVerifyMessage = "[MoveNext]: Unrecognized arguments for delegate .ctor. { Offset = 0x6d }" }); 3713verify: Verification.Fails // localloc is not verifiable. 3720verify: Verification.Fails // localloc is not verifiable. 3755verify: Verification.Fails // localloc is not verifiable. 3762verify: Verification.Fails // localloc is not verifiable.
CodeGen\CodeGenAsyncTests.cs (11)
32private CompilationVerifier CompileAndVerify(string source, string expectedOutput, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null, Verification verify = default) 871CompileAndVerify(source, expectedOutput: "0", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 913CompileAndVerify(source, options: TestOptions.UnsafeDebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: debugSymbolValidator, verify: Verification.Fails) 915CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: releaseSymbolValidator, verify: Verification.Fails) 972CompileAndVerify(source, options: TestOptions.UnsafeDebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: debugSymbolValidator, verify: Verification.Fails) 974CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "10", symbolValidator: releaseSymbolValidator, verify: Verification.Fails) 1144CompileAndVerify(source, expectedOutput: "0", options: TestOptions.UnsafeDebugExe, verify: Verification.Passes); 1205CompileAndVerify(source, expectedOutput: "0", options: TestOptions.UnsafeDebugExe, verify: Verification.Passes); 1246CompileAndVerify(source, expectedOutput: "0", options: TestOptions.UnsafeDebugExe, verify: Verification.Passes); 5873CompileAndVerify(source, options: TestOptions.DebugExe, verify: Verification.Skipped, expectedOutput: "0123").VerifyDiagnostics(diags); 5874CompileAndVerify(source, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: "0123").VerifyDiagnostics(diags);
CodeGen\CodeGenAwaitForeachTests.cs (10)
2383CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2386CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2454CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2457CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2509CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2510CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2511CompileAndVerify(source, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2563CompileAndVerify(comp, expectedOutput: "1 2 3 Done", verify: Verification.Fails); 9484verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics();
CodeGen\CodeGenAwaitUsingTests.cs (6)
3251CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, verify: Verification.FailsILVerify).VerifyDiagnostics(); 3252CompileAndVerify(source, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 3723verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 3752verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics();
CodeGen\CodeGenCheckedTests.cs (1)
391var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails);
CodeGen\CodeGenClosureLambdaTests.cs (2)
2569CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F", verify: Verification.Passes); 3249verify: Verification.FailsILVerify with { ILVerifyMessage = "[Main]: Unrecognized arguments for delegate .ctor. { Offset = 0xe }" });
CodeGen\CodeGenConditionalOperatorTests.cs (1)
3015CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails);
CodeGen\CodeGenConstructorInitTests.cs (1)
1151CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, verify: Verification.Skipped).VerifyIL("C..cctor()", @"
CodeGen\CodeGenDeconstructTests.cs (2)
7640var comp = CompileAndVerify(source, expectedOutput: "42", verify: Verification.Passes); 7665CompileAndVerify(compilation, expectedOutput: "10", verify: Verification.Fails);
CodeGen\CodeGenDynamicTests.cs (6)
36Verification verify = default) 337CompileAndVerifyWithMscorlib40(source, new[] { systemCoreRef, csrtRef }, verify: Verification.Fails).VerifyIL("C.F", @" 9593", allowUnsafe: true, verify: Verification.Fails); 9663", allowUnsafe: true, verify: Verification.Fails); 9734", allowUnsafe: true, verify: Verification.Fails); 9796", verify: Verification.FailsILVerify); // ILVerify doesn't support TypedReference
CodeGen\CodeGenExprLambdaTests.cs (4)
26Verification verify = default) => CompileAndVerify(source, references, targetFramework: TargetFramework.Standard, expectedOutput: expectedOutput, options: options, parseOptions: parseOptions, verify: verify); 2481CompileAndVerifyUtil(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: TrimExpectedOutput(expectedOutput), verify: Verification.Fails); 3220verify: Verification.FailsPEVerify); 5263var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes);
CodeGen\CodeGenForEachTests.cs (15)
1398var verifier = CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: @" 1462var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @" 1497var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @" 1538CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @"123"); 1579CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @"123"); 1616CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @"123"); 1653CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @"123"); 3300CompileAndVerify(comp, expectedOutput: "123", verify: Verification.Skipped); 4407var verifier = CompileAndVerify(source, expectedOutput: "1235", verify: Verification.FailsILVerify); 4869CompileAndVerify(source, parseOptions: TestOptions.Regular9, verify: Verification.FailsILVerify, expectedOutput: @"123Disposed") 5367verify: Verification.Fails, 5407verify: Verification.Fails, 5453verify: Verification.Fails, 5534verify: Verification.Skipped, 5593CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "42" : null, verify: Verification.Skipped)
CodeGen\CodeGenFunctionPointersTests.cs (10)
43return CompileAndVerify(comp, symbolValidator: symbolValidator, expectedOutput: expectedOutput, verify: Verification.Skipped); 62return CompileAndVerify(comp, expectedOutput: expectedOutput, symbolValidator: symbolValidator, verify: Verification.Skipped); 5400CompileAndVerify(comp, symbolValidator: symbolValidator, verify: Verification.Skipped); 6277verify: Verification.Skipped); 6287verify: Verification.Skipped); 6518CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped); 6642CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped); 6720CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped); 6798CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped); 11022var verifier = CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Skipped);
CodeGen\CodeGenIncrementTests.cs (1)
1039base.CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: "12").
CodeGen\CodeGenInParametersTests.cs (34)
1130", verify: Verification.Fails); 752var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 800var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"42 854var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"42 917var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 938comp = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "42", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 977var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 998comp = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "42", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 1038var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 1089var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"hi 1126var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1333var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1376var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1446var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"42"); 1479var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"42"); 1529CompileAndVerify(comp, verify: Verification.Passes, expectedOutput: @"6"); 1616var verifier = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "6"); 1752var result = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"47"); 1838result = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"47"); 1877CompileAndVerify(comp, verify: Verification.Passes, expectedOutput: @"6"); 1937CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2005CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2067CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2124CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2184CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2263CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2278CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2344var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2431v = CompileAndVerify(comp, verify: Verification.Passes, expectedOutput: @" 2574var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"0"); 2632var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @""); 2724var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"4242420"); 4011var verifier = CompileAndVerify(compilation, expectedOutput: "0011", verify: Verification.FailsPEVerify); 4603var verifier = CompileAndVerify(source, expectedOutput: "00", verify: Verification.FailsPEVerify);
CodeGen\CodeGenIterators.cs (1)
2392var verifier = CompileAndVerify(compilation, verify: Verification.FailsPEVerify);
CodeGen\CodeGenLocalFunctionTests.cs (9)
4609VerifyOutput(source, output, TestOptions.ReleaseExe.WithAllowUnsafe(true).WithWarningLevel(0), verify: Verification.Passes); 4635VerifyOutput(source, "2", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 4661VerifyOutput(source, "2", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 4688VerifyOutput(source, "2", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 4728VerifyOutput(src, $"10{Environment.NewLine}4", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 5742verify: Verification.Skipped); 5817verify: Verification.Skipped); 5892verify: Verification.Skipped); 6301internal CompilationVerifier VerifyOutput(string source, string output, CSharpCompilationOptions options, Verification verify = default)
CodeGen\CodeGenMscorlib.cs (5)
619CompileAndVerify(comp, verify: Verification.Skipped). 765CompileAndVerify(comp, verify: Verification.Fails). 894CompileAndVerify(comp, verify: Verification.Fails). 1041var c = CompileAndVerify(comp, verify: Verification.Skipped); 1167CompileAndVerify(comp, verify: Verification.Skipped).
CodeGen\CodeGenOverridingAndHiding.cs (1)
2559CompileAndVerify(outerCompilation, verify: Verification.FailsPEVerify).VerifyIL("Test.Main", @"
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (52)
131CompileAndVerify(comp, expectedOutput: "TrueTrue", verify: Verification.Passes).VerifyIL("Test.Main", @" 194verify: type == "byte" ? Verification.Passes : Verification.Skipped).VerifyIL("Test.Main", @$" 254CompileAndVerify(comp, expectedOutput: "TrueTrue", verify: Verification.Passes).VerifyIL("Test.Main", @" 307CompileAndVerify(comp, expectedOutput: "True", verify: Verification.Passes).VerifyIL("Test.Main", @" 364CompileAndVerify(comp, expectedOutput: "True", verify: Verification.Passes).VerifyIL("Test.Main", @" 418CompileAndVerify(comp, expectedOutput: "3", verify: Verification.Passes).VerifyIL("Test.Main", @" 480CompileAndVerify(comp, expectedOutput: "BlueTrue", verify: Verification.Fails).VerifyIL("Test.Main", @" 537CompileAndVerify(comp, expectedOutput: "BlueTrue", verify: Verification.Passes).VerifyIL("Test.Main", @" 610CompileAndVerify(comp, expectedOutput: "P10", verify: Verification.Fails).VerifyIL("Test.Main", @" 658var cv = CompileAndVerify(comp, expectedOutput: "", verify: Verification.Passes); 726var cv = CompileAndVerify(comp, expectedOutput: "100", verify: Verification.Passes); 765var verifier = CompileAndVerify(compilation, expectedOutput: "10;20;", verify: Verification.Skipped); 804var verifier = CompileAndVerify(compilation, expectedOutput: "10;20;", verify: Verification.Skipped); 899var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 927verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 946var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1027var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1051var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1094var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1173var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1317var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1369var verifier = CompileAndVerify(compilation, expectedOutput: "AF2D4567", verify: Verification.Skipped); 1482var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1516var verifier = CompileAndVerify(compilation, verify: Verification.Passes); 1549var verifier = CompileAndVerify(compilation, expectedOutput: "000000", verify: Verification.Passes); 1626var verifier = CompileAndVerify(compilation, expectedOutput: "3402", verify: Verification.Fails with { ILVerifyMessage = ilVerifyMessage, PEVerifyMessage = peVerifyMessage }); 1734CompileAndVerify(source, expectedOutput: "34361843576", verify: Verification.Skipped, targetFramework: TargetFramework.Net70).VerifyIL("Test.Main", @" 2047CompileAndVerify(compilation, expectedOutput: "34361843576", verify: Verification.Skipped).VerifyIL("Test.Main", @" 2407var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2514var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2542verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2567var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2615var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2666var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2738verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 2808verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 2880verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 2925verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 2993verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 3037var verifier = CompileAndVerify(compilation, expectedOutput: "1 2147483647", verify: Verification.FailsILVerify); 3086verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 3130var verifier = CompileAndVerify(compilation, expectedOutput: "1 4294967295", verify: Verification.Skipped); 3176verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 3245verify: Verification.FailsILVerify with { ILVerifyMessage = ilVerifyMessage }); 3287var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 3352CompileAndVerify(compilation, expectedOutput: "1 42", verify: Verification.Skipped).VerifyDiagnostics(); 3369CompileAndVerify(compilation, expectedOutput: "1 !", verify: Verification.Skipped).VerifyDiagnostics(); 3386var verifier = CompileAndVerify(compilation, expectedOutput: "2 True False", verify: Verification.Skipped).VerifyDiagnostics(); 3411var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 3434var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 3528var verifier = CompileAndVerify(compilation, verify: Verification.Passes);
CodeGen\CodeGenReadonlyStructTests.cs (28)
51var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"12"); 67comp = CompileAndVerify(text, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Passes, expectedOutput: @"12"); 122var comp = CompileAndVerify(text, new[] { ref1 }, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"12"); 138comp = CompileAndVerify(text, new[] { ref1 }, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Passes, expectedOutput: @"12"); 188var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.FailsPEVerify, expectedOutput: @"12"); 206comp = CompileAndVerify(text, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Passes, expectedOutput: @"12"); 262var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.FailsPEVerify, expectedOutput: @"hello2"); 281comp = CompileAndVerify(text, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Passes, expectedOutput: @"hello2"); 343var comp = CompileAndVerify(text, new[] { ref1 }, parseOptions: TestOptions.Regular, verify: Verification.FailsPEVerify, expectedOutput: @"hello2"); 362comp = CompileAndVerify(text, new[] { ref1 }, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Passes, expectedOutput: @"hello2"); 416var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"12"); 462var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"12"); 513var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"Program+S1Program+S1"); 570var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"4242"); 1092CompileAndVerify(comp, expectedOutput: "24", verify: Verification.Fails); 1109CompileAndVerify(comp, expectedOutput: "10", verify: Verification.Fails).VerifyIL("Test.Main", @" 1151CompileAndVerify(comp, expectedOutput: "12345", verify: Verification.Fails).VerifyIL("Test.Main", @" 1200CompileAndVerify(comp, expectedOutput: "30", verify: Verification.Fails).VerifyIL("Test.Main", @" 1261CompileAndVerify(comp, expectedOutput: "overflow", verify: Verification.Fails).VerifyIL("Test.M", expectedIL); 1267CompileAndVerify(comp, verify: Verification.Fails).VerifyIL("Test.M", expectedIL); 1298CompileAndVerify(comp, expectedOutput: "SpanOpCalled|PointerOpCalled", verify: Verification.Fails); 1320CompileAndVerify(comp, expectedOutput: "SpanOpCalled", verify: Verification.Fails); 2554CompileAndVerify(csharp, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "42"); 2557public static TheoryData<bool, CSharpParseOptions, Verification> ReadOnlyGetter_LangVersion_Data() => 2558new TheoryData<bool, CSharpParseOptions, Verification> 2560{ false, TestOptions.Regular7_3, Verification.Passes }, 2561{ true, null, Verification.Fails } 2566public void ReadOnlyGetter_LangVersion(bool isReadOnly, CSharpParseOptions parseOptions, Verification verify)
CodeGen\CodeGenRefConditionalOperatorTests.cs (21)
93var comp = CompileAndVerify(source, expectedOutput: "44", verify: Verification.Fails); 129var comp = CompileAndVerify(source, expectedOutput: "44", verify: Verification.Passes); 165var comp = CompileAndVerify(source, expectedOutput: "55", verify: Verification.Passes); 203var comp = CompileAndVerify(source, expectedOutput: "5555", verify: Verification.Passes); 250var comp = CompileAndVerify(source, expectedOutput: "67", verify: Verification.Fails); 304var comp = CompileAndVerify(source, expectedOutput: "446767", verify: Verification.Passes); 837var comp = CompileAndVerify(source, expectedOutput: "1", verify: Verification.Passes); 881var comp = CompileAndVerify(source, expectedOutput: "1", verify: Verification.Passes); 912var comp = CompileAndVerify(source, expectedOutput: "1", verify: Verification.Passes); 1065var comp = CompileAndVerifyWithMscorlib40(source, references: new[] { Net40.References.System, ValueTupleRef, Net40.References.SystemCore }, expectedOutput: "00", verify: Verification.FailsPEVerify); 1153var comp = CompileAndVerify(source, expectedOutput: "00", verify: Verification.FailsPEVerify); 1221verify(TestOptions.UnsafeReleaseExe, Verification.Passes, @" 1240verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 1265void verify(CSharpCompilationOptions options, Verification verify, string expectedIL) 1355var verifier = CompileAndVerify(comp, expectedOutput: "0run", verify: Verification.Fails); 2383CompileAndVerify(source, targetFramework: TargetFramework.NetCoreApp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, options: TestOptions.ReleaseExe, verify: Verification.FailsPEVerify); 2384CompileAndVerify(source, targetFramework: TargetFramework.NetCoreApp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, options: TestOptions.DebugExe, verify: Verification.FailsPEVerify); 2422CompileAndVerify(source, targetFramework: TargetFramework.NetCoreApp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, options: TestOptions.ReleaseExe, verify: Verification.FailsPEVerify); 2423CompileAndVerify(source, targetFramework: TargetFramework.NetCoreApp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, options: TestOptions.DebugExe, verify: Verification.FailsPEVerify); 2473CompileAndVerify(source, targetFramework: TargetFramework.NetCoreApp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, options: TestOptions.ReleaseExe, verify: Verification.FailsPEVerify); 2474CompileAndVerify(source, targetFramework: TargetFramework.NetCoreApp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, options: TestOptions.DebugExe, verify: Verification.FailsPEVerify);
CodeGen\CodeGenRefLocalTests.cs (40)
37var verifier = CompileAndVerify(src, verify: Verification.Fails); 67verify: Verification.Fails); 92verify: Verification.Fails, 561}", verify: Verification.Fails, expectedOutput: @"42 1775CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M", @" 1893CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M<T>", @" 2172CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M()", @" 2205var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2276var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2428var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2495var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2843CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M()", @" 2880var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2951var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3048var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3118CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M(ref int, ref int, object)", @" 3158var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3235var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3341var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3450CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M(D, ref int, ref int, object)", @" 3487verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 3527verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 3564verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 3612verify: Verification.Fails, targetFramework: TargetFramework.Net70); 3665verify: Verification.Fails, targetFramework: TargetFramework.Net70); 3879CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 3952CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Passes).VerifyIL("Program.Main()", @" 4207verify(TestOptions.UnsafeReleaseExe, Verification.Passes, @" 4222verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4239void verify(CSharpCompilationOptions options, Verification verify, string expectedIL) 4311var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails); 4332verify(TestOptions.UnsafeReleaseExe, Verification.Passes, @" 4348verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4373void verify(CSharpCompilationOptions options, Verification verify, string expectedIL) 4395verify(TestOptions.UnsafeReleaseExe, Verification.Passes, @" 4408verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4425void verify(CSharpCompilationOptions options, Verification verify, string expectedIL) 4447verify(TestOptions.UnsafeReleaseExe, Verification.Passes, @" 4462verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4481void verify(CSharpCompilationOptions options, Verification verify, string expectedIL)
CodeGen\CodeGenRefOutTests.cs (5)
543var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 630var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 692var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 778var verifier = CompileAndVerify(comp, expectedOutput: "0run", verify: Verification.Fails); 830var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails);
CodeGen\CodeGenRefReadonlyReturnTests.cs (15)
62var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails); 87comp = CompileAndVerify(source, verify: Verification.Fails); 294}", verify: Verification.Fails); 433}", options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: "NullReferenceException"); 805var comp = CompileAndVerifyWithMscorlib40(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: Verification.Passes); 883var comp = CompileAndVerifyWithMscorlib40(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: Verification.Fails); 915comp = CompileAndVerify(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails, targetFramework: TargetFramework.Mscorlib40); 1235}", verify: Verification.Fails).VerifyIL("Test.M", @" 1264}", verify: Verification.Fails).VerifyIL("Test.M", @" 1291}", verify: Verification.Fails).VerifyIL("Test.M", @" 1319}", verify: Verification.Fails).VerifyIL("Test.M", @" 1348}", verify: Verification.Fails).VerifyIL("Test.M", @" 1377}", verify: Verification.Fails).VerifyIL("Test.M", @" 1404}", verify: Verification.Fails).VerifyIL("Test.M", @" 1461}", verify: Verification.Fails, expectedOutput: "optional-provided");
CodeGen\CodeGenRefReturnTests.cs (22)
25Verification verify = default) 62}", verify: Verification.Fails, expectedOutput: @"42 108CompileAndVerifyRef(text, verify: Verification.Skipped).VerifyIL("Program.M(ref int)", @" 131CompileAndVerify(text, parseOptions: TestOptions.Regular10, verify: Verification.Fails).VerifyIL("Program.M(out int)", @" 158CompileAndVerifyRef(text, verify: Verification.Fails).VerifyIL("Program.M(ref int)", @" 310var compilation = CompileAndVerifyRef(text, verify: Verification.Passes); 502var compilation = CompileAndVerifyRef(text, verify: Verification.Passes); 765var compilation = CompileAndVerifyRef(text, verify: Verification.Fails); 1303CompileAndVerifyRef(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 1492CompileAndVerifyRef(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 1643CompileAndVerify(text, parseOptions: TestOptions.Regular, expectedOutput: "42", verify: Verification.Fails).VerifyIL("Program.M()", @" 1716CompileAndVerify(text, parseOptions: TestOptions.Regular, expectedOutput: "42", verify: Verification.Fails).VerifyIL("Program.M()", @" 1902CompileAndVerifyRef(text, expectedOutput: "12", verify: Verification.Fails) 2000CompileAndVerifyRef(text, expectedOutput: "1234", verify: Verification.Fails) 2105CompileAndVerifyRef(text, expectedOutput: "1True", verify: Verification.Fails) 2203CompileAndVerifyRef(text, expectedOutput: "1TrueTrue1TrueTrueTrueTrue1TrueTrue", verify: Verification.Fails) 2969var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "2"); 3082var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "2"); 3455CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: "Base", verify: Verification.Passes); 3548CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: "Program+RefFunc1`2[Derived2,Derived1]", verify: Verification.Passes); 3589Program+RefFunc1`2[Derived1,Base]", verify: Verification.Passes); 3633CompileAndVerify(text, expectedOutput: "37", parseOptions: TestOptions.Regular10, verify: Verification.Fails).VerifyIL("Program.Main()", @"
CodeGen\CodeGenScriptTests.cs (1)
557var verifier = CompileAndVerify(s0, verify: Verification.FailsPEVerify);
CodeGen\CodeGenShortCircuitOperatorTests.cs (5)
5181var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 5232var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify, options: TestOptions.DebugExe.WithAllowUnsafe(true), expectedOutput: @"--- 5543var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 7324var comp = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"", verify: Verification.Fails); 7349comp = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Passes);
CodeGen\CodeGenStackAllocInitializerTests.cs (38)
53verify: Verification.Fails).VerifyIL("Program.MakeBlock", 126verify: Verification.Fails).VerifyIL("Test.M<T>(T)", 216CompileAndVerify(comp, verify: Verification.Fails).VerifyIL("Test.M<T>(T)", 316verify: Verification.Fails).VerifyIL("C.Main", 371verify: Verification.Fails).VerifyIL("C.Main", 413verify: Verification.Passes).VerifyIL("C.Main", 432verify: Verification.Fails).VerifyIL("C.Main", 495verify: Verification.FailsPEVerify).VerifyIL("C.Main", 530verify: Verification.Fails, expectedOutput: @"424242").VerifyIL("C.Main", 570verify: Verification.Fails, expectedOutput: @"ffffffffffffffffffffffff").VerifyIL("C.Main", 614verify: Verification.Fails, expectedOutput: @"ABCDDD").VerifyIL("C.Main", 672verify: Verification.Fails, expectedOutput: @"123456789").VerifyIL("C.Main", 728verify: Verification.Fails, expectedOutput: @"123").VerifyIL("C.Main", 870CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"123") 914verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 952verify: Verification.Fails, targetFramework: TargetFramework.Net70); 980verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1005verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 1051CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"123") 1108verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1137verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1162verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1207verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1236verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1264verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1292verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1319verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1347verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1372verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1419verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 1457verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70); 1498verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net70); 1524verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 1528verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsCoreClr ? output : null, verify: Verification.Fails); 1580verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net70); 1637verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1674verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1701verify: Verification.Fails,
CodeGen\CodeGenStructsAndEnum.cs (3)
1553var compilation = CompileAndVerify(source, expectedOutput: "S1", verify: Verification.Skipped); 2099var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: "True"); 2214var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: @"353
CodeGen\CodeGenTests.cs (32)
81var result = CompileAndVerify(source, verify: Verification.FailsILVerify, options: TestOptions.DebugDll); 169var result = CompileAndVerify(source, verify: Verification.FailsILVerify, options: TestOptions.DebugDll); 5101var compilation = CompileAndVerify(source, expectedOutput: @"PASS", verify: Verification.Passes); 5162var compilation = CompileAndVerify(source, expectedOutput: @"hi", verify: Verification.Fails); 5189compilation = CompileAndVerify(source, expectedOutput: @"hi", verify: Verification.Passes, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 5254var compilation = CompileAndVerify(source, expectedOutput: @"hihi", verify: Verification.Fails); 5275compilation = CompileAndVerify(source, expectedOutput: @"hihi", verify: Verification.Fails, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 10458CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyIL("Test.Main", 12299var comp = CompileAndVerify(source, expectedOutput: @"42", parseOptions: TestOptions.Regular7_2, verify: Verification.FailsPEVerify); 12332comp = CompileAndVerify(source, expectedOutput: @"42", verify: Verification.Passes, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 12364comp = CompileAndVerify(source, expectedOutput: @"42", verify: Verification.Passes, parseOptions: TestOptions.Regular7_1); 12453var comp = CompileAndVerify(source, expectedOutput: @"-10", verify: Verification.FailsPEVerify); 12482comp = CompileAndVerify(source, expectedOutput: @"-10", verify: Verification.Passes, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 14930CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"" 16290CompileAndVerify(comp, expectedOutput: "24", verify: Verification.Fails); 16292CompileAndVerify(comp, expectedOutput: "24", verify: Verification.Fails); 16313CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("Test.Main", @" 16335CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("Test.Main", @" 16389CompileAndVerify(comp, expectedOutput: "12345", verify: Verification.Fails).VerifyIL("Test.Main", @" 16422CompileAndVerify(comp, expectedOutput: "12345", verify: Verification.Fails).VerifyIL("Test.Main", @" 16482CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16501CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16538CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16560CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16603CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16658CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16747CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails); 16749CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails); 16771CompileAndVerify(comp, expectedOutput: "SpanOpCalled", verify: Verification.Fails); 16773CompileAndVerify(comp, expectedOutput: "SpanOpCalled", verify: Verification.Fails); 17241var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Skipped, expectedOutput: @""); 17284", verify: Verification.FailsILVerify with
CodeGen\CodeGenTryFinally.cs (2)
3828verify: Verification.FailsPEVerify with 3860verify: Verification.FailsPEVerify with
CodeGen\CodeGenTupleTest.cs (5)
23446var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libComp.ToMetadataReference() }, options: TestOptions.DebugExe, verify: Verification.Fails); 23502var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "42qq", references: s_valueTupleRefs.Concat(new[] { libCompRef }).ToArray(), options: TestOptions.DebugExe, verify: Verification.Fails); 23848CompileAndVerify(comp, expectedOutput: "42qq", verify: Verification.Fails); 23901var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libCompRef }, options: TestOptions.DebugExe, verify: Verification.Passes); 27337var verifier = CompileAndVerify(comp1, verify: Verification.Skipped); // unsafe code
CodeGen\CodeGenUsingStatementTests.cs (3)
3169verify: Verification.FailsPEVerify, 3201verify: Verification.FailsPEVerify, 3239verify: Verification.FailsPEVerify,
CodeGen\DestructorTests.cs (1)
701CompileAndVerify(compilation, verify: Verification.FailsPEVerify).VerifyIL("B.Finalize",
CodeGen\FixedSizeBufferTests.cs (15)
50}", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 115CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 176CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Passes) 227CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Passes) 278CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Passes) 439CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 504CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 569var comp1 = CompileAndVerify(s1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).Compilation; 574expectedOutput: "12", verify: Verification.Fails).Compilation; 607CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 758CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "133", verify: Verification.Fails) 978CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes, 1010CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes, 1052}", options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: @" 1122}", options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails);
CodeGen\ForeachTest.cs (5)
66}", options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("Test.Main", @" 449CompileAndVerify(comp, expectedOutput: "RedGreenBlue", verify: Verification.Fails).VerifyIL("Test.Main", @" 500CompileAndVerify(comp, expectedOutput: "hello", verify: Verification.Passes).VerifyIL("Test.Main", @" 548CompileAndVerify(comp, expectedOutput: "123", verify: Verification.Fails).VerifyIL("Test.Main", @" 696CompileAndVerify(comp, expectedOutput: "123", verify: Verification.Fails).VerifyIL("Test.Main", @"
CodeGen\GotoTest.cs (3)
933CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Passes); 984CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Fails); 1067CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Passes);
CodeGen\IndexAndRangeTests.cs (1)
2100var verifier = CompileAndVerify(comp, verify: Verification.Passes, expectedOutput: @"3
CodeGen\ObjectAndCollectionInitializerTests.cs (2)
3534CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), expectedOutput: "1", verify: Verification.Fails); 3581var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput:
CodeGen\PatternTests.cs (4)
4613var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 4670var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 4716var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 4956var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped);
CodeGen\SwitchTests.cs (1)
4519var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify);
CodeGen\UnsafeTests.cs (195)
32var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes); 59var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 219var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes); 244var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 291var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 338var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 372var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "123", verify: Verification.Fails); 409var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "456", verify: Verification.Fails); 437var compVerifierOptimized = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "2", verify: Verification.Fails); 456var compVerifierUnoptimized = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "2", verify: Verification.Fails); 500var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails); 553After: 7 2", verify: Verification.Fails); 599var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"ab", verify: Verification.Fails); 647var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 694var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 712compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 752var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 776compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 827var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 849compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 903var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 926compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 970var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1008compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1084var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1204var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1251-1", verify: Verification.Fails); 1277var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "210", verify: Verification.Fails); 1297var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @" 1338var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1396var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1454var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1524var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1586var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 1659var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1725var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"a", verify: Verification.Fails); 1770var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"a", verify: Verification.Fails); 1814var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"h", verify: Verification.Fails); 1871var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"hTrue", verify: Verification.Fails); 1956var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"hTrue", verify: Verification.Fails); 2027var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2095var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2163var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2234var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"970104", verify: Verification.Fails); 2325CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2387CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2450CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2506CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2567CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2628CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2688CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2764CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2848CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2978CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3029CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3094CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3178CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3258CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3314CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3359CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3413CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3463CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3515CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3569CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3622CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3676CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3726CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3776CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3825CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3865CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3906CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3964CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4028CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4095CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4157var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4217var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4305var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"0", verify: Verification.Fails); 4356var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4418var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4658var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"20", verify: Verification.Fails); 4732var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4792var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4884var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2123 4973var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 5033var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"23", verify: Verification.Fails); 5111var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 5539var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @""); 5666var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"00", verify: Verification.Fails); 5868CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5869CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5919CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5920CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5956CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 6046CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 6136CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify).VerifyIL("C.M", @" 6226CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify).VerifyIL("C.M", @" 6367CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6368CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6430CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6431CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6537CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL, sequencePoints: "C.Main"); 6538CompileAndVerify(string.Format(template, "checked "), options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL, sequencePoints: "C.Main"); 6594CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6595CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6636CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6637CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6664CompileAndVerifyException<NotSupportedException>(text, "Type is not supported.", allowUnsafe: true, verify: Verification.Fails); 6705CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6706CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6735CompileAndVerifyException<NotSupportedException>(text, "Type is not supported.", allowUnsafe: true, verify: Verification.Fails); 6760CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails).VerifyIL("C.Main", @" 6823CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1234", verify: Verification.FailsPEVerify).VerifyIL("C.Main", @" 6936CompileAndVerifyException<NotSupportedException>(text, "Type is not supported.", allowUnsafe: true, verify: Verification.Fails); 6984CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @" 7071CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @" 7113CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @" 7156CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7221CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7286CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7351CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7421CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails).VerifyIL("C.Test", @" 7529var comp = CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails); 76992", verify: Verification.Fails).VerifyIL("S.Main", @" 7783CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @" 7847CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @" 7906CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "I0", verify: Verification.Fails).VerifyIL("S.Main", @" 7974CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "8", verify: Verification.Fails).VerifyIL("S.Main", @" 8081CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("S.Main", @" 8148CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "44", verify: Verification.Fails).VerifyIL("S.Main", @" 8206CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @" 8262CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @" 8321CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "01", verify: Verification.Fails).VerifyIL("S.Main", @" 8376CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "2", verify: Verification.Fails); 8774CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 8875CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 8910CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: expectedOutput); 8945CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 8954CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 8981CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9045CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9092CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9122CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Passes, expectedOutput: @" 9172CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes); 9210CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9251CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9360CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9461CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9496CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9531CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9588CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9645CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9692CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9736CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9784CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "011010011010", verify: Verification.Fails).VerifyIL("S.Main", @" 9884False", verify: Verification.Skipped); 9926False", verify: Verification.Skipped); 10013CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 10070CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 10107CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify).VerifyIL("C.M", @" 10153CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"123 10194var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 10267CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @" 10290CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @" 10340var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10415CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 10473CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify); 10497CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Passes); 10684CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.Test", @" 10768CompileAndVerify(string.Format(template, "int"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 10769CompileAndVerify(string.Format(template, "int*"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 10770CompileAndVerify(string.Format(template, "int**"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 10771CompileAndVerify(string.Format(template, "int[]"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 10772CompileAndVerify(string.Format(template, "int[][]"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 10773CompileAndVerify(string.Format(template, "int*[]"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 10807CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.FailsPEVerify with 10827var c = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify with 10849var c = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify with 10927CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyDiagnostics( 10950var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyDiagnostics(); 11003var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics(); 11070CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "b", verify: Verification.Fails); 11114var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "hello", verify: Verification.Fails); 11183var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 11263var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 11315var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll.WithConcurrentBuild(false), verify: Verification.Passes); 11339var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll.WithConcurrentBuild(false), verify: Verification.FailsPEVerify); 11379var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11425var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11474var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11516var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F654320F", verify: Verification.Fails); 11559var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Passes); 11613var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 11686var v = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 11832CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "OK", verify: Verification.Passes); 11857var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.FailsPEVerify);
Emit\CompilationEmitTests.cs (22)
2128CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes); 2160CompileAndVerify(comp, emitOptions: emitRegularWithoutPrivateMembers, verify: Verification.Passes); 2188CompileAndVerify(comp, emitOptions: emitMetadataOnly, verify: Verification.Passes); 2217CompileAndVerify(comp, emitOptions: emitRefOnly, verify: Verification.Passes); 2266CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes); 2276CompileAndVerify(comp, emitOptions: emitMetadataOnly, verify: Verification.Passes); 2288CompileAndVerify(comp, emitOptions: emitRefOnly, verify: Verification.Passes); 2333CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes); 2343CompileAndVerify(comp, emitOptions: emitMetadataOnly, verify: Verification.Passes); 2355CompileAndVerify(comp, emitOptions: emitRefOnly, verify: Verification.Passes); 2400CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes); 2410CompileAndVerify(comp, emitOptions: emitMetadataOnly, verify: Verification.Passes); 2422CompileAndVerify(comp, emitOptions: emitRefOnly, verify: Verification.Passes); 2461CompileAndVerify(comp, emitOptions: emitRefOnly, verify: Verification.Passes); 2506CompileAndVerify(comp, emitOptions: emitRefOnly, verify: Verification.Passes); 4254CompileAndVerify(compilation, verify: Verification.Passes, symbolValidator: module => 4291CompileAndVerify(compilation, verify: Verification.Skipped, symbolValidator: module => 4497CompileAndVerify(compilation, verify: Verification.Passes, symbolValidator: module => 4554CompileAndVerify(compilation, verify: Verification.Passes, symbolValidator: module => 4622CompileAndVerify(source2, references: new[] { metadataRef }, options: TestOptions.ReleaseModule, verify: Verification.Fails); 5047CompileAndVerify(comp, verify: Verification.Fails); 5553CompileAndVerify(comp, verify: Verification.FailsILVerify, symbolValidator: module =>
Emit\CovariantReturnTests.cs (4)
283CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 316CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 443CompileAndVerify(vbCompilation, verify: Verification.Skipped, expectedOutput: expectedOutput) 552CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped);
Emit\DeterministicTests.cs (1)
341CompileAndVerify(forwardingCompilation, symbolValidator: metadataValidator, sourceSymbolValidator: metadataValidator, verify: Verification.Skipped);
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (2)
1225CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails); 3641private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null, Verification verify = default)
Emit\EmitCustomModifiers.cs (3)
47CompileAndVerify(c, verify: Verification.Passes, expectedOutput: 709CompileAndVerify(compilation, verify: Verification.FailsPEVerify); 743CompileAndVerify(compilation, verify: Verification.FailsPEVerify);
Emit\EmitErrorTests.cs (3)
118verify: Verification.Fails); 152verify: Verification.Fails); 191verify: Verification.Fails);
Emit\EmitMetadataTests.cs (3)
209CompileAndVerifyWithMscorlib40(sources, new[] { TestReferences.SymbolsTests.MultiModule.Assembly }, verify: Verification.FailsILVerify, assemblyValidator: (assembly) => 229verify: Verification.Fails, 246CompileAndVerify(source, new[] { netModule1, netModule2 }, verify: Verification.FailsILVerify, assemblyValidator: (assembly) =>
Emit\InAttributeModifierTests.cs (25)
1660CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1680CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1701CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1721CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1742CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1763CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1784CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1804CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1825CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1846CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1866CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1886CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1907CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1928CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1949CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1974CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 1995CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 2015CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 2035CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 2055CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 2075CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 2099CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 2119CompileAndVerify(code, verify: Verification.Passes, sourceSymbolValidator: validator, symbolValidator: validator); 4498CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 4541CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module =>
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (182)
CodeGen\CodeGenCallTests.cs (2)
33463var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, verify: Verification.Fails, expectedOutput: expectedOutput).VerifyDiagnostics(); 33506CompileAndVerify(source, options: TestOptions.DebugExe, verify: Verification.Fails, expectedOutput: expectedOutput).VerifyDiagnostics();
CodeGen\CodeGenLengthBasedSwitchTests.cs (3)
831var verifier = CompileAndVerify(comp, expectedOutput: "RAN", verify: Verification.Skipped); 1983var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 2089var verifier = CompileAndVerify(comp, verify: Verification.Skipped);
CodeGen\CodeGenSpanBasedStringConcatTests.cs (62)
37var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 93var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 169var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? expectedOutput : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 230var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "ab" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 282var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "ab" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 336var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 389var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 444var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "ab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 488var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "ab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 538var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 651var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 726var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 800var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 850var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1004var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1073var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cssscsssccsc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1183var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cssscsssccsc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1287var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1363var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? expectedOutput : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1474var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "aab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1540var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "aab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1605var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scscsc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1666var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cssscsssccsc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1746var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1792var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1851var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cssscsssccsc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1938var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1991var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccab" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2059var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2192var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2270var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2347var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2398var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2597var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cssscsssccsc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2714var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "csssscsssscssssccscsscsccssc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2902var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "csssscsssscssssccscsscsccssc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3090var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scss" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3178var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? expectedOutput : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3363var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "aaab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3438var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abab" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3514var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scsscsscsscsscsscs" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3587var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "csssscsssscssssccscsscsccssc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3708var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcd" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3756var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcd" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3826var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "csssscsssscssssccscsscsccssc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3960var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccccabcabc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4031var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccccabcabc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4136var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcdabdccdabdcabcabddabc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4292var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcd" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4345var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcddabc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4401var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcddabc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4474var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccccabcabc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4564var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcdabdccdabdcabcabddabc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4688var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcddabc" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4845var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4926var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5006var verifier = CompileAndVerify(compilation: comp, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5058var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5305var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "csssscsssscssssccscsscsccssc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5486var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scsssssssc" : null, verify: ExecutionConditionUtil.IsCoreClr ? default : Verification.Skipped); 5605var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sscss" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5676var verifier = CompileAndVerify(compilation: comp, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcde" : null, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped);
CodeGen\IndexAndRangeTests.cs (3)
3621var verifier = CompileAndVerify(comp, expectedOutput: "Id(0) Id(1)", verify: Verification.Skipped); 4416var verifier = CompileAndVerify(comp, expectedOutput: "++ Length Index=7 X=42 Index=7 Y=43 Index=7 Z=44", verify: Verification.Skipped); 4459var verifier = CompileAndVerify(comp, verify: Verification.Skipped,
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
486var v0 = CompileAndVerify(compilation0, verify: Verification.FailsILVerify); 590var v0 = CompileAndVerify(compilation0, verify: Verification.Passes);
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (9)
10873var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 10935var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 11001var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 11054var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 11105var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 11159var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 11220var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 11275var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 11342var v0 = CompileAndVerify(compilation0, verify: Verification.Passes);
Emit\EditAndContinue\EditAndContinueTests.cs (28)
1414using var _ = new EditAndContinueTest(verification: Verification.Skipped) 1636using var _ = new EditAndContinueTest(verification: Verification.Skipped) 1778using var _ = new EditAndContinueTest(verification: Verification.Skipped) 2068var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 2143var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 2208var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 2286var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 8415var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 15546var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 15652var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 15756using var _ = new EditAndContinueTest(options: TestOptions.DebugDll, targetFramework: TargetFramework.NetLatest, verification: Verification.Skipped) 15897using var _ = new EditAndContinueTest(options: TestOptions.DebugDll, targetFramework: TargetFramework.NetStandard20, verification: Verification.Skipped) 16076var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 16133using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Minimal, verification: Verification.Skipped) 16173using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Minimal, verification: Verification.Skipped) 17474using var _ = new EditAndContinueTest(verification: Verification.Skipped) 17782using var _ = new EditAndContinueTest(verification: Verification.Skipped) 18600var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 18676var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 18770var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 18859var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 18900using var _ = new EditAndContinueTest(targetFramework: TargetFramework.NetCoreApp, verification: Verification.Fails) 19085using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Net80, verification: Verification.Skipped) 19194using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Net80, verification: Verification.Skipped) 19302using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Net80, verification: Verification.Skipped) 19389using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Net80, verification: Verification.Skipped) 19583using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Net80, verification: Verification.Skipped) 19763using var _ = new EditAndContinueTest(targetFramework: TargetFramework.Net80, verification: Verification.Skipped)
Emit\EditAndContinue\LocalSlotMappingTests.cs (1)
1052using var _ = new EditAndContinueTest(verification: Verification.Skipped)
Emit\ManagedAddressTests.cs (1)
66var verifier = CompileAndVerify(comp, expectedOutput: "012", verify: Verification.Fails with
Emit\NumericIntPtrTests.cs (58)
1096var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 1134var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 1330var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput($"{size}{size}{size}{size}"), verify: Verification.FailsPEVerify); 1433CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 1457var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(@"1"), verify: Verification.FailsPEVerify); 1492var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 1648var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 1759var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 2256CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "System.OverflowException" : "1152921504606846975"), verify: Verification.FailsPEVerify); 2294CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "-1" : "1152921504606846975")); 2412CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedOutput)); 2483var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 2617var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 2799CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("0, 0, 0, 0")); 2824CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 2857CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 3053CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 3060CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 3063CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 3066CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 3069CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 3127var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 3295var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 6022var verifier = CompileAndVerify(comp, verify: useUnsafeContext ? Verification.Skipped : Verification.FailsPEVerify); 6251var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedResult)); 6627var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedResult)); 6859var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedResult)); 6899var verifier = CompileAndVerify(comp, emitOptions: EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"), verify: Verification.Skipped); 8132CompileAndVerify(comp, verify: Verification.FailsPEVerify); 8184var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 8410var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 8614var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 8690var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9122CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "System.OverflowException" : "4294967337")).VerifyDiagnostics( 9140CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "41" : "4294967337")).VerifyDiagnostics(); 9189CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "System.OverflowException" : "2147483648")).VerifyDiagnostics( 9207CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "-2147483648" : "2147483648")).VerifyDiagnostics(); 9247CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9277CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9301CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9429var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9534var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(expectedOutput)); 9703CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9834var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 10025var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 10710CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("1, 2, 3, 4"), verify: Verification.FailsPEVerify); 10726CompileAndVerify(comp2, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.FailsPEVerify); 10832CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expected), verify: Verification.FailsPEVerify); 10900CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expected), verify: Verification.FailsPEVerify); 10987var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 11049CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("OVERFLOW RAN"), verify: Verification.Skipped); 11053CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("RAN"), verify: Verification.Skipped); 11630return CompileAndVerify(comp, verify: Verification.FailsPEVerify); 11688var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("RAN")); 11706var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("63"), verify: Verification.FailsPEVerify); 11754var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("00")); 11826verify: Verification.Skipped);
Emit\RuntimeProbing\ModuleCancellationTests.cs (4)
25private CompilationVerifier CompileAndVerify(string source, string? expectedOutput = null, CSharpCompilationOptions? options = null, Verification? verification = null) 30verify: verification ?? Verification.Passes, 787var verifier = CompileAndVerify(source, verification: Verification.FailsPEVerify); 2765var verifier = CompileAndVerify(source, verification: Verification.FailsPEVerify);
Emit\RuntimeProbing\StackOverflowProbingTests.cs (3)
24private CompilationVerifier CompileAndVerify(string source, string? expectedOutput = null, CSharpCompilationOptions? options = null, Verification? verification = null) 29verify: verification ?? Verification.Passes, 693var verifier = CompileAndVerify(source, verification: Verification.FailsPEVerify);
Emit\UnmanagedTypeModifierTests.cs (1)
1474CompileAndVerify(code, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"
PDB\PDBTests.cs (5)
8695var verifier = CompileAndVerify(c, verify: Verification.Skipped); 9092var verifier = CompileAndVerify(c, verify: Verification.Skipped); 9459var verifier = CompileAndVerify(c, verify: Verification.Skipped); 12189var c = CompileAndVerify(source, verify: Verification.Skipped); 12260var c = CompileAndVerify(source, verify: Verification.Skipped);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1164)
Attributes\AttributeTests_Assembly.cs (12)
351CompileAndVerify(comp, verify: Verification.FailsPEVerify, symbolValidator: m => 424CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics( 486verify: Verification.Skipped).VerifyDiagnostics(); 507CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics( 596verify: Verification.FailsILVerify, 627verify: Verification.FailsILVerify, 657verify: Verification.FailsILVerify, 687verify: Verification.FailsILVerify, 715CompileAndVerify(compilation, verify: Verification.Fails, 744CompileAndVerify(compilation, verify: Verification.Fails, 777CompileAndVerify(compilation, verify: Verification.Fails, 818verify: Verification.FailsILVerify,
Attributes\AttributeTests_Dynamic.cs (3)
105CompileAndVerify(comp, verify: Verification.Passes, symbolValidator: module => 1197CompileAndVerify(comp, verify: Verification.Fails); 1234CompileAndVerify(comp, verify: Verification.Fails);
Attributes\AttributeTests_Embedded.cs (2)
193CompileAndVerify(code, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), verify: Verification.Passes, expectedOutput: "3"); 290CompileAndVerify(code, verify: Verification.Passes, references: new[] { reference }, symbolValidator: module =>
Attributes\AttributeTests_IsByRefLike.cs (16)
49CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: validate); 60CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 78CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 120CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 146CompileAndVerify(codeB, verify: Verification.Passes, references: new[] { referenceA }, symbolValidator: module => 370CompileAndVerify(code2, verify: Verification.Passes, symbolValidator: module => 440CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 461var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module => 494CompileAndVerify(text, references: new[] { RefSafetyRulesAttributeLib }, verify: Verification.Passes, symbolValidator: module => 688CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: validate, sourceSymbolValidator: validate); 711CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module => 754CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 805CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 870CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 1001CompileAndVerify(compilation1, verify: Verification.FailsPEVerify, symbolValidator: module => 1029CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_IsUnmanaged.cs (4)
258CompileAndVerify(text, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 284CompileAndVerify(text, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 318verify: Verification.Fails, 347verify: Verification.Fails,
Attributes\AttributeTests_LifetimeAnnotation.cs (1)
555verify: Verification.Skipped,
Attributes\AttributeTests_Nullable.cs (1)
1005CompileAndVerify(comp, verify: Verification.Skipped, symbolValidator: module =>
Attributes\AttributeTests_ReadOnlyStruct.cs (10)
37CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module => 56CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module => 74CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module => 92CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module => 110CompileAndVerify(text, verify: Verification.Passes, symbolValidator: module => 136CompileAndVerify(codeB, verify: Verification.Passes, references: new[] { referenceA }, symbolValidator: module => 360CompileAndVerify(code2, verify: Verification.Passes, symbolValidator: module => 432CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 453var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module => 486CompileAndVerify(text, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_RefReadOnly.cs (25)
35CompileAndVerify(text, verify: Verification.Fails, symbolValidator: module => 117CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, symbolValidator: module => 399CompileAndVerify(text, verify: Verification.Fails, symbolValidator: module => 471CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, symbolValidator: module => 595CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 649CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 683CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, options: options, symbolValidator: module => 722CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 816CompileAndVerify(codeB, verify: Verification.Fails, options: options, references: new[] { referenceA }, symbolValidator: module => 1065CompileAndVerify(code2, verify: Verification.Fails, symbolValidator: module => 1156CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 1178var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Fails, symbolValidator: module => 1211CompileAndVerify(text, references: new[] { RefSafetyRulesAttributeLib }, verify: Verification.Fails, symbolValidator: module => 1586CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 1628CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 1673CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 1722CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 1769CompileAndVerify(code, verify: Verification.Passes, references: new[] { reference }, symbolValidator: module => 1812CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 1861CompileAndVerify(code, verify: Verification.Passes, references: new[] { reference }, symbolValidator: module => 1901CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 1970CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 2019CompileAndVerify(code, verify: Verification.Passes, references: new[] { reference }, symbolValidator: module => 2060CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 2102CompileAndVerify(code, verify: Verification.Passes, references: new[] { reference }, symbolValidator: module =>
Attributes\AttributeTests_RefSafetyRules.cs (2)
155CompileAndVerify(comp, verify: Verification.Skipped, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: false, includesAttributeUse: false, publicDefinition: false)); 158CompileAndVerify(comp, verify: Verification.Skipped, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: true, includesAttributeUse: true, publicDefinition: false));
Attributes\AttributeTests_Security.cs (2)
1304CompileAndVerify(compilation, verify: Verification.Passes, symbolValidator: module => 1384CompileAndVerify(compilation, verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_StructLayout.cs (3)
218CompileAndVerify(unverifiable, assemblyValidator: validator, verify: Verification.FailsPEVerify); 221CompileAndVerify(unloadable, assemblyValidator: validator, verify: Verification.FailsPEVerify); 339CompileAndVerify(source, verify: Verification.FailsPEVerify);
Attributes\AttributeTests_Synthesized.cs (36)
798verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Fails); 982CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1017CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1052CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1087CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1124CompileAndVerify(source, parseOptions: parseOptions, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1162CompileAndVerify(source, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1198CompileAndVerify(source, parseOptions: parseOptions, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1236CompileAndVerify(source, parseOptions: parseOptions, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1274var verify = outputKind.IsNetModule() 1275? Verification.Fails 1276: Verification.FailsILVerify; 1308CompileAndVerify(compilation, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1357CompileAndVerify(compilation, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1404CompileAndVerify(compilation, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1448CompileAndVerify(compilation, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1493CompileAndVerify(compilation, verify: Verification.Skipped, symbolValidator: module => 1533CompileAndVerify(source, references: new[] { reference }, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1574CompileAndVerify(source, references: new[] { reference }, options: options, verify: outputKind.IsNetModule() ? Verification.Skipped : Verification.Passes, symbolValidator: module => 1611CompileAndVerify(compilation, verify: Verification.Skipped, symbolValidator: module => 1624CompileAndVerifyWithMscorlib40("", references: new[] { moduleReference }, symbolValidator: validateSecurity, verify: Verification.Skipped);
Attributes\AttributeTests_Tuples.cs (2)
120CompileAndVerify(comp, verify: Verification.Passes, symbolValidator: module => 241verify: Verification.Passes,
Attributes\AttributeTests_WellKnownAttributes.cs (46)
3701CompileAndVerify(source, options: TestOptions.ReleaseDll, verify: Verification.FailsPEVerify, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator); 5657var verifier = CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Mscorlib40); 10412private CompilationVerifier CompileAndVerifyWithSkipLocalsInit(string src, CSharpCompilationOptions options, CSharpParseOptions parseOptions = null, Verification? verify = null) 10423return CompileAndVerify(comp, verify: verify ?? Verification.Fails); 10426private CompilationVerifier CompileAndVerifyWithSkipLocalsInit(string src, CSharpParseOptions parseOptions = null, Verification? verify = null) 10428return CompileAndVerifyWithSkipLocalsInit(src, TestOptions.UnsafeReleaseDll, parseOptions, verify ?? Verification.Fails); 10502var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10537var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10570var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); 10603var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); 10820var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10850var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10910var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11392var verifier = CompileAndVerifyWithSkipLocalsInit(source, parseOptions: TestOptions.RegularPreview, verify: Verification.Skipped); 11417var verifier = CompileAndVerifyWithSkipLocalsInit(source, parseOptions: TestOptions.RegularPreview, verify: Verification.Skipped); 11448var verifier = CompileAndVerifyWithSkipLocalsInit(source, parseOptions: TestOptions.RegularPreview, verify: Verification.Skipped); 11498var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.UnsafeReleaseExe, verify: Verification.Passes); 11537var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11578var comp1 = CompileAndVerify(source1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11582var comp2 = CompileAndVerify(source2, references: new[] { reference }, verify: Verification.Passes); 11614var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11662var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11696var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11733var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11764var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11810var comp_skip = CompileAndVerify(source_skip, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11933var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11985var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12057var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12092var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12165var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12226var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12419var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12469var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12524var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12582var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12629var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12658var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12686var comp = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, verify: Verification.Fails); 12714var comp = CompileAndVerify(source, options: TestOptions.DebugModule.WithAllowUnsafe(true), verify: Verification.Fails); 12799var verifier = CompileAndVerify(src, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12866var verifier = CompileAndVerify(comp, verify: Verification.Fails); 12920var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 13040var verifier = CompileAndVerify(src, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped); 13086var verifier = CompileAndVerify(src, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped); 13114var verifier = CompileAndVerify(comp, verify: Verification.Fails);
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
2728CompileAndVerify(cb, verify: Verification.Fails).Diagnostics.Verify();
FieldKeywordTests.cs (33)
178CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(""" 731var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("")); 870var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1093CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("(0, -2, 0, -4, 0, -6)")); 1208CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("(2, -2, 6, -4, 10, -6)")); 1423CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(""" 1489verify: Verification.Skipped, 1574var verifier = CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: """ 1640verify: Verification.Skipped, 1732verify: Verification.Skipped, 1796verify: Verification.Skipped, 1904verify: Verification.Skipped, 2137verify: Verification.Skipped, 2347verify: Verification.Skipped, 2476verify: Verification.Skipped, 3061verify: Verification.Skipped, 3211verify: Verification.Skipped, 3397verify: Verification.Skipped, 3601verify: Verification.Skipped, 4054verify: Verification.Skipped, 4205verify: Verification.Skipped, 4337verify: Verification.Skipped, 4471verify: Verification.Skipped, 4862verify: Verification.Skipped, 7983CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($$""" 8036verify: Verification.Skipped, 8172CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "C"); 8380verify: Verification.Skipped, 8447verify: Verification.Skipped, 9237verify: Verification.Skipped, 10224var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(""" 10308var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(""" 10405var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("""
FirstClassSpanTests.cs (45)
712var verifier = CompileAndVerify(comp, expectedOutput: "InvalidCastException", verify: Verification.FailsILVerify); 742var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 798var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 803verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 824var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 879var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 884verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 905var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 1907verify: Verification.Fails, 1968var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Internal"); 2021var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "External"); 2069var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Internal"); 2113var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "External"); 2182var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Span2"); 2257var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: """ 2307var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Internal"); 2350var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "External"); 2493var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Span2"); 2540var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Internal"); 2584var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "External"); 2603verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: "Internal"); 2699CompileAndVerify(comp2, verify: Verification.FailsILVerify) 3070CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3102CompileAndVerify(source, parseOptions: TestOptions.Regular13, verify: Verification.FailsILVerify) 3124CompileAndVerify(source, parseOptions: TestOptions.RegularNext, verify: Verification.FailsILVerify) 3126CompileAndVerify(source, verify: Verification.FailsILVerify) 3184CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3215CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3246CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3329CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 4069var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 4134var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 4426var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify); 5457var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5489var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5600CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5603var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5657var verifier = CompileAndVerify(comp, expectedOutput: "C", verify: Verification.FailsILVerify).VerifyDiagnostics(); 5701var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5950CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5953CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5983CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 5986CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 6016CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 6019CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics();
RefReadonlyParameterTests.cs (19)
679verify: Verification.FailsPEVerify); 2373var verifier = CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails); 2423var verifier = CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails); 3116var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: """ 3312expectedOutput: "555", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 5091expectedOutput: "111", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 5480options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 5530CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails).VerifyDiagnostics(); 5566CompileAndVerify(source, expectedOutput: "10", verify: Verification.Fails).VerifyDiagnostics(); 7948CompileAndVerify(new[] { source, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8183CompileAndVerify(new[] { source1, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8192CompileAndVerify(new[] { source2, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8276CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8278CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8293CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular11, options: TestOptions.UnsafeDebugExe, 8308CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8310CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8356CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8358CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe,
RefStructInterfacesTests.cs (271)
38CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr || !isVirtual ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 71CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 151CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr || !isVirtual ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 183CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 306CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 398CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr || !isVirtual ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 430CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 554CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 729CompileAndVerify(comp4, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 776CompileAndVerify(comp6, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 802CompileAndVerify(comp7, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 836CompileAndVerify(comp8, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 865CompileAndVerify(comp9, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 886CompileAndVerify(comp10, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1217CompileAndVerify(comp4, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1305CompileAndVerify(comp6, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1342CompileAndVerify(comp7, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1395CompileAndVerify(comp8, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1452CompileAndVerify(comp9, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1472CompileAndVerify(comp10, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1793CompileAndVerify(comp4, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1881CompileAndVerify(comp6, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1918CompileAndVerify(comp7, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 1971CompileAndVerify(comp8, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 2028CompileAndVerify(comp9, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 2048CompileAndVerify(comp10, sourceSymbolValidator: verify, symbolValidator: verify, verify: Verification.Skipped).VerifyDiagnostics(); 2975var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: (tS1IsClass == ThreeState.True || tS2IsClass == ThreeState.True ? null : "12"), verify: Verification.Fails); 4368CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 4370CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 4424CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 5758CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 5786CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 5819CompileAndVerify(comp, sourceSymbolValidator: verify, symbolValidator: verify, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 5986var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"S1.M1 S1.M1" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 6068verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 6600Verification.Passes : 6601Verification.Skipped).VerifyDiagnostics(); 6736Verification.Passes : 6737Verification.Skipped).VerifyDiagnostics(); 6853Verification.Passes : 6854Verification.Skipped).VerifyDiagnostics(); 6974Verification.Passes : 6975Verification.Skipped).VerifyDiagnostics(); 7113Verification.Passes : 7114Verification.Skipped).VerifyDiagnostics(); 7434var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 7624var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 7842var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123456" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 8039var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 8232var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 8507var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics( 8894Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 8895Verification.Skipped).VerifyDiagnostics(); 9098Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 9099Verification.Skipped).VerifyDiagnostics(); 9461Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 9462Verification.Skipped).VerifyDiagnostics(); 9673Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 9674Verification.Skipped).VerifyDiagnostics(); 9897Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 9898Verification.Skipped).VerifyDiagnostics(); 10109Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 10110Verification.Skipped).VerifyDiagnostics(); 10505Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 10506Verification.Skipped).VerifyDiagnostics(); 10702Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 10703Verification.Skipped).VerifyDiagnostics(); 10941Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 10942Verification.Skipped).VerifyDiagnostics(); 11157Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 11158Verification.Skipped).VerifyDiagnostics(); 11384Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 11385Verification.Skipped).VerifyDiagnostics(); 11944Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 11945Verification.Skipped).VerifyDiagnostics(); 11992Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 11993Verification.Skipped).VerifyDiagnostics(); 12028Verification.Passes : 12029Verification.Skipped).VerifyDiagnostics(); 12295Verification.Passes : 12296Verification.Skipped).VerifyDiagnostics(); 12541Verification.Passes : 12542Verification.Skipped).VerifyDiagnostics(); 12800Verification.Passes : 12801Verification.Skipped).VerifyDiagnostics(); 13070Verification.Passes : 13071Verification.Skipped).VerifyDiagnostics(); 13329Verification.Passes : 13330Verification.Skipped).VerifyDiagnostics(); 13669verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 13968var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 14309var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 14670var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123456" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 15021var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 15369var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 15799var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics( 16334CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 17613var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 17810var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 18032var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123456" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 18235var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 18436var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 18716var verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"123" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics( 19101Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 19102Verification.Skipped).VerifyDiagnostics(); 19272Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 19273Verification.Skipped).VerifyDiagnostics(); 19597Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 19598Verification.Skipped).VerifyDiagnostics(); 19782Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } : 19783Verification.Skipped).VerifyDiagnostics(); 20038CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20051CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20083CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20094CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20202Called System.Int64", verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20295CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20308CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20340CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20351CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? @"Called" : null, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 20405verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 20452verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 20497verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 20542verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 21257verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 21505verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 21642verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 21703verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 21836verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 21971verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 22477verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 22533verify: ExecutionConditionUtil.IsMonoOrCoreClr && !s2IsRefStruct ? Verification.Passes : Verification.Skipped, 22588verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 22636verify: ExecutionConditionUtil.IsMonoOrCoreClr && !s2IsRefStruct ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 22680verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 22729verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 22781verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped 22827verify: Verification.Skipped 22843verify: Verification.FailsPEVerify, 22867verify: Verification.FailsPEVerify, 22895verify: Verification.FailsPEVerify, 22925verify: Verification.FailsPEVerify, 22956verify: Verification.FailsPEVerify, 22987verify: Verification.FailsPEVerify, 23018verify: Verification.FailsPEVerify, 23050verify: Verification.FailsPEVerify, 23081verify: Verification.FailsPEVerify, 23112verify: Verification.FailsPEVerify, 23136verify: Verification.FailsPEVerify, 23166verify: Verification.FailsPEVerify, 23197verify: Verification.FailsPEVerify, 23221verify: Verification.FailsPEVerify, 23622verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 23675verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 23737verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 24034verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24137verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24195verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24270verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24369verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24538verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24651verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24794verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 24886verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 25030verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 25114verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped). 25334verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 25578verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 27183verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 27293verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 27527verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 27712verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 27822verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 27954verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 28089Verification.FailsILVerify.WithILVerifyMessage( 28092Verification.Skipped).VerifyDiagnostics(); 28263verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 28321verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 28391Verification.FailsILVerify.WithILVerifyMessage( 28395Verification.Skipped).VerifyDiagnostics(); 28498verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 28558verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 28634Verification.FailsILVerify.WithILVerifyMessage( 28639Verification.Skipped).VerifyDiagnostics(); 28889verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 28949CompileAndVerify(compilation1, symbolValidator: metadataValidator, verify: Verification.Skipped).VerifyDiagnostics(); 28951CompileAndVerify(compilation2, symbolValidator: metadataValidator, verify: Verification.Skipped).VerifyDiagnostics();
RefUnsafeInIteratorAndAsyncTests.cs (8)
452CompileAndVerify(source, expectedOutput: IfSpans("456"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 472CompileAndVerify(source, expectedOutput: IfSpans("123"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 948CompileAndVerify(source, expectedOutput: IfSpans("-1 456"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 978CompileAndVerify(source, expectedOutput: IfSpans("-1 456"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 1006CompileAndVerify(source, expectedOutput: IfSpans("-1 456"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 1032CompileAndVerify(source, expectedOutput: IfSpans("123-1"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 1231CompileAndVerify(source, expectedOutput: IfSpans("123"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 1256CompileAndVerify(source, expectedOutput: IfSpans("123"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics();
Semantics\CollectionExpressionTests.cs (254)
1193verify: Verification.Fails, 1440CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($""" 1535CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($""" 1635CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($""" 1739CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($""" 1854CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($""" 1923CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: expectedOutput); 1930CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: expectedOutput); 1969CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("Span<string>")).VerifyDiagnostics(); 2010CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(""" 2085verify: Verification.Skipped, 2170verify: Verification.Skipped, 2206verify: Verification.Skipped, 2213verify: Verification.Skipped, 2285verify: Verification.Skipped, 2365verify: Verification.Skipped, 2371verify: Verification.Skipped, 2409verify: Verification.Skipped, 2416verify: Verification.Skipped, 2423verify: Verification.Skipped, 2490verify: Verification.Skipped, 2496verify: Verification.Skipped, 2502verify: Verification.Skipped, 2659verify: Verification.Skipped, 2665verify: Verification.Skipped, 2671verify: Verification.Skipped, 2842verify: Verification.Skipped, 2848verify: Verification.Skipped, 2854verify: Verification.Skipped, 3078CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($$""" 3116CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($$""" 3150CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($$""" 3192CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput($$""" 3882verify: Verification.Skipped, 4746verify: Verification.FailsPEVerify, 4770verify: Verification.FailsPEVerify, 5445verify: Verification.Skipped, 5625verify: Verification.Skipped, 5650verify: Verification.Skipped, 6153CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("0, 2, ")); 6224CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[0, 2], ")); 6246var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("1010")); 6338var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("10200")); 8767CompileAndVerify(new[] { sourceA, sourceB }, verify: Verification.FailsILVerify, expectedOutput: "1, 2, "); 8815CompileAndVerify(new[] { sourceA, sourceB }, verify: Verification.FailsILVerify, expectedOutput: "1, 2, "); 9433verify: Verification.Skipped, 9541verify: Verification.Skipped, 10091verify: Verification.Skipped, 10580var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3], "), verify: Verification.Skipped); 10634var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3], "), verify: Verification.Skipped); 10722var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3], "), verify: Verification.Skipped); 10778var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[(1, 1), (2, 2), (3, 3)], "), verify: Verification.Skipped); 10832var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[(1, 1), (2, 2), (3, 3)], "), verify: Verification.Skipped); 10931var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[[1], [2], [3]], "), verify: Verification.Skipped); 11269verify: Verification.FailsPEVerify, 11292var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [1, 2, 3],", verify: Verification.Skipped); 11345var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 11460var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [1, 2, 3],", verify: Verification.Skipped); 11599verify: Verification.FailsPEVerify, 11690verify: Verification.FailsPEVerify, 11984verify: Verification.FailsPEVerify, 12009verify: Verification.FailsPEVerify, 12201verify: Verification.FailsPEVerify, 12447verify: Verification.FailsPEVerify, 13297verify: Verification.FailsPEVerify, 13322verify: Verification.FailsPEVerify, 13401verify: Verification.FailsPEVerify); 14286var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.FailsPEVerify); 14357verify: Verification.Fails with { ILVerifyMessage = """ 14497var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.FailsPEVerify); 14611var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.FailsPEVerify); 14669var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[[1], [2]],"), verify: Verification.FailsPEVerify); 14773var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[[1], [2]],"), verify: Verification.Fails); 15013var verifier = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "[1, 2], [2], "); 15280verify: Verification.Fails, 15357verify: Verification.Fails, 15471verify: targetFramework == TargetFramework.Net80 ? Verification.Fails : Verification.FailsPEVerify, 15654verify: Verification.Skipped); 15682verify: Verification.Skipped); 15710verify: Verification.Skipped, 15769verify: Verification.Skipped, 15852verify: Verification.Fails, 15901verify: Verification.FailsPEVerify, 15950verify: Verification.FailsPEVerify, 15999verify: Verification.Fails, 16106verify: Verification.FailsPEVerify, 16171verify: Verification.Fails, 16215verify: Verification.Fails, 16311verify: Verification.Fails, 16431verify: Verification.Fails, 17109verify: Verification.Fails, 17172verify: Verification.Fails, 17233verify: Verification.FailsPEVerify, 17424verify: Verification.FailsPEVerify, 17473verify: Verification.FailsPEVerify, 17522verify: Verification.FailsPEVerify, 17568verify: Verification.FailsPEVerify, 17614verify: Verification.FailsPEVerify, 17706verify: Verification.FailsPEVerify, 17899verify: Verification.FailsPEVerify, 17951verify: Verification.FailsPEVerify, 18251verify: Verification.FailsPEVerify, 18322verify: Verification.Fails, 18486verify: Verification.Fails, 18530verify: Verification.Fails, 19170verify: Verification.FailsPEVerify, 19233verify: Verification.FailsPEVerify, 19697verify: Verification.Skipped, 20091verify: Verification.Fails, 20451verify: Verification.FailsPEVerify, 20552verify: Verification.FailsPEVerify, 20677verify: Verification.FailsPEVerify, 20757verify: Verification.FailsPEVerify, 20887verify: Verification.FailsPEVerify, 20932verify: Verification.FailsPEVerify, 21037var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 21185var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 21288verify: Verification.FailsPEVerify, 21422verify: Verification.FailsPEVerify, 21576verify: Verification.FailsPEVerify, 21673verify: Verification.FailsPEVerify, 21787verify: Verification.FailsPEVerify, 21895verify: Verification.FailsPEVerify, 22003verify: Verification.FailsPEVerify, 22219CompileAndVerify(new[] { source, s_collectionExtensions }, verify: Verification.Skipped, expectedOutput: "[0, 1], "); 22313verify: Verification.Skipped, 22413verify: Verification.Skipped, 22465verify: Verification.Skipped, 22538verify: Verification.Skipped, 22666verify: Verification.Skipped, 22817var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 22846verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 22903var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 22946verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 23016var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 23059verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 23127var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 23156verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 23212verify: Verification.Skipped, 23338verify: Verification.Skipped, 23405verify: Verification.Skipped, 23516verify: Verification.Skipped, 23618verify: Verification.Skipped, 23688verify: Verification.Skipped, 23753verify: Verification.Skipped, 23855verify: Verification.Skipped, 23934verify: Verification.Skipped, 24043verify: Verification.Skipped, 24103verify: Verification.Skipped, 24226verify: Verification.Skipped, 24301verify: Verification.Skipped, 24356verify: Verification.Skipped, 24418verify: Verification.Skipped, 24514verify: Verification.Skipped, 24588verify: Verification.Skipped, 24676verify: Verification.Skipped, 24734verify: Verification.Skipped, 24818verify: Verification.Skipped, 24873verify: Verification.Skipped, 24928verify: Verification.Skipped, 24995verify: Verification.Skipped, 25133verify: Verification.Skipped, 25266verify: Verification.Fails, 25354verify: Verification.Skipped, 25432verify: Verification.Fails, 25499verify: Verification.Fails, 25563verify: Verification.Fails, 25630verify: Verification.Fails, 25756verify: Verification.Fails, 25841verify: Verification.FailsPEVerify, 25878verify: Verification.Fails, 25938verify: Verification.Skipped, 25960var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3], ")); 29451var verifier = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: IncludeExpectedOutput("[1, 2, 3],")); 29535CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("1 2 3"), verify: Verification.FailsPEVerify); 29559CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("1 2 3"), verify: Verification.FailsPEVerify); 29583CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("a b c"), verify: Verification.FailsPEVerify); 29606CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("97 98 99"), verify: Verification.FailsPEVerify); 29640verify: Verification.FailsPEVerify, 29697verify: Verification.FailsPEVerify, 30157var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30228var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30286var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[[1, 2, 3]],"), verify: Verification.Skipped); 30328var verifier = CompileAndVerify([sourceA, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[],"), verify: Verification.Skipped); 30362var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[],"), verify: Verification.Skipped); 30395var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30438var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30649verify: Verification.Skipped); 30773var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30820var verifier = CompileAndVerify([sourceA, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30851var verifier = CompileAndVerify([sourceA, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30913var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(WithSpanAllocWarning)); 30942verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 33658var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 33722var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 33766var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [4, 5, 6], [1, 2, 3, 4, 5, 6],"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80); 33862var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[D, D],"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80); 33969var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.Fails, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80); 34053var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe); 34136var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80); 34228var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[Derived], [Derived], "), targetFramework: TargetFramework.Net80); 34287var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[Derived], [Derived], ")); 34374var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[Derived], [Derived, Derived],"), targetFramework: TargetFramework.Net80); 34481var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80); 34642var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 34741var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 34822verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Skipped); 34878var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],")); 34907verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],")); 34969verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],")); 35040var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[1, 2], [1, 2, 1, 2],")); 35134var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[1, 2], [1, 2, 1, 2],")); 35261var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35318var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 2],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35546var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35597var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35643var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35949var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 35980var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c],", verify: Verification.Skipped); 36018var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c], [1, 2, 3], [a, b, c], [1, 2, 3], ", verify: Verification.Skipped); 36132var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c],", verify: Verification.Skipped); 36166var verifier = CompileAndVerify(comp, expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36200var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c],", verify: Verification.Skipped); 36271var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36308var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36340var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 36412var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36467var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: expectedOutput, verify: Verification.Skipped); 36520var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36574var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36659var verifier = CompileAndVerify(comp, expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36741var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, 4, 5, 6],", verify: Verification.Skipped); 36846var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], [1, 2, 3], [1, 2, 3], ", verify: Verification.Skipped); 36943var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c], [a, b, c], [a, b, c], [a, b, c], ", verify: Verification.Skipped); 37061verify: Verification.Skipped); 37184var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3, 4],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37235var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[a, b, c], [a, b, c, d],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37301var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[a, b, c], [a, b, c],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37369var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[a, b, c], [a, b, c, a, b, c],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37407var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3, 4],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 41461CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: "1, 2, "); 42230verify: Verification.Skipped, 42294verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 42374verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 42462verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 42923verify: Verification.Skipped, 43035verify: Verification.Skipped, 43159verify: Verification.Skipped, 43249verify: Verification.Skipped, 43339CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("123"), verify: Verification.Skipped).VerifyDiagnostics();
Semantics\InlineArrayTests.cs (143)
56private static Verification VerifyOnMonoOrCoreClr 60return ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped; 2154CompileAndVerify(comp1, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics( 2280CompileAndVerify(comp1, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics( 3135var verifier = CompileAndVerify(comp, expectedOutput: "0 0 111 111", verify: Verification.Fails).VerifyDiagnostics(); 3198var verifier = CompileAndVerify(comp, expectedOutput: "0 0 111 111", verify: Verification.Fails).VerifyDiagnostics(); 3261var verifier = CompileAndVerify(comp, expectedOutput: "0 0 111 111", verify: Verification.Fails).VerifyDiagnostics(); 3337var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 3561var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 3793var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 4018var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4143var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4272var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4403var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4529var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 4679var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics( 5075var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 6072var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 6168var verifier = CompileAndVerify(comp, expectedOutput: "0 5 111", verify: Verification.Fails).VerifyDiagnostics(); 6248var verifier = CompileAndVerify(comp, expectedOutput: "10 111", verify: Verification.Fails).VerifyDiagnostics(); 6363var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6402var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6445var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6488var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6529var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 6554var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6656var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6682var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6712var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6742var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6814var verifier = CompileAndVerify(comp, expectedOutput: "0 0", verify: Verification.Fails).VerifyDiagnostics(); 6858var verifier = CompileAndVerify(comp, expectedOutput: "0 4 111", verify: Verification.Fails).VerifyDiagnostics(); 6908var verifier = CompileAndVerify(comp, expectedOutput: "0 5 111", verify: Verification.Fails).VerifyDiagnostics(); 6958var verifier = CompileAndVerify(comp, expectedOutput: "0 5 111", verify: Verification.Fails).VerifyDiagnostics(); 7014var verifier = CompileAndVerify(comp, expectedOutput: "0 9 111", verify: Verification.Fails).VerifyDiagnostics(); 7064var verifier = CompileAndVerify(comp, expectedOutput: "0 10 111", verify: Verification.Fails).VerifyDiagnostics(); 7119var verifier = CompileAndVerify(comp, expectedOutput: "0 9 111", verify: Verification.Fails).VerifyDiagnostics(); 7188var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7258var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 7337var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7473var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7618var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7786var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7948var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8164var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics( 8258CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Skipped); 8373var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8481var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8598var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8886var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10014var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10061var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10346var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10391var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11131var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11177var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11223var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11273var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11347var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11473var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 13211var verifier = CompileAndVerify(comp, expectedOutput: "0 1 0", verify: Verification.Fails).VerifyDiagnostics( 13749var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13807var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13865var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13918var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13969var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 14020var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 14637var verifier = CompileAndVerify(comp, verify: Verification.Fails, 14686var verifier = CompileAndVerify(comp, verify: Verification.Fails, 15164var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 15248var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15385var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15440var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15501var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15564var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15618var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 15646var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 15672var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15698var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15894var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15920var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15949var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15978var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16013var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16048var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16085var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16122var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16183var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16231var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16318var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16433var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16671var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 16941CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics( 16971CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 17009CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 17046CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 17049CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 17163CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 17541var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics( 17659var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics( 17734var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics( 17988CompileAndVerify(comp, expectedOutput: " Throw 111 999 Throw", verify: Verification.Fails).VerifyDiagnostics(); 18168CompileAndVerify(comp, expectedOutput: " 10 1 Throw 0 Throw", verify: Verification.Fails).VerifyDiagnostics(); 18275CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 18303CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 18371CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 18504CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 19982var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20120CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20169var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20320CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20442var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20579CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20628var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20779CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20820verify: Verification.FailsILVerify, expectedOutput: expectedOutput).VerifyDiagnostics(); 20823verify: Verification.FailsILVerify, expectedOutput: expectedOutput).VerifyDiagnostics(); 21389var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 21391CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 21540var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21610CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21657var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21730CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21859var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21929CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21976var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 22049CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 22098verify: Verification.FailsILVerify, expectedOutput: expectedOutput).VerifyDiagnostics(); 22101verify: Verification.FailsILVerify, expectedOutput: expectedOutput).VerifyDiagnostics(); 22654var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 22656CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 22834CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 22943CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 22972CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics(); 23000CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics(); 23029CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 23062CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 23088CompileAndVerify(comp, expectedOutput: "s", verify: Verification.Fails).VerifyDiagnostics(); 23110CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics(); 23343parseOptions: parseOptions, targetFramework: TargetFramework.Net80, verify: Verification.FailsPEVerify);
Semantics\LockTests.cs (58)
77verify: Verification.FailsILVerify); 135verify: Verification.FailsPEVerify); 396CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 429CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 465CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 501CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 537CompileAndVerify(source, expectedOutput: "OLD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 779CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 807CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 843var verifier = CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify); 905CompileAndVerify(source, expectedOutput: "E1DE2D", verify: Verification.FailsILVerify).VerifyDiagnostics( 940CompileAndVerify(source, expectedOutput: "E1DE2D", verify: Verification.FailsILVerify).VerifyDiagnostics( 975CompileAndVerify(source, expectedOutput: "E1DE2D", verify: Verification.FailsILVerify).VerifyDiagnostics( 1013CompileAndVerify(source, expectedOutput: "E1DE2D", verify: Verification.FailsILVerify).VerifyDiagnostics( 1052var verifier = CompileAndVerify(source, expectedOutput: "L", verify: Verification.FailsILVerify); 1320CompileAndVerify(source, expectedOutput: "ELD", verify: Verification.FailsILVerify).VerifyDiagnostics(); 1366verify: Verification.Fails, targetFramework: TargetFramework.Net60).VerifyDiagnostics(); 1405var verifier = CompileAndVerify(source, expectedOutput: "L", verify: Verification.FailsILVerify); 1473var verifier = CompileAndVerify(source, expectedOutput: "L", verify: Verification.FailsILVerify); 1638verify: Verification.FailsILVerify).VerifyDiagnostics(); 1640verify: Verification.FailsILVerify).VerifyDiagnostics(); 1655var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1669var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1682var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1712var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1743var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1775var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1893var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 1943expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2007expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2083expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2238expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2392expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2504expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2612expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2676expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2751expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 2906expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 3056expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 3120expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 3195expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 3350expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 3544verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3548verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3583verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3587verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3656var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3660verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3697var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 3888verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify); 4089var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 4134var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 4152var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, expectedOutput: """ 4212var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify, 4322var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify, 4442var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 4505var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify, 4559var verifier = CompileAndVerify([source, LockTypeDefinition], verify: Verification.FailsILVerify,
Semantics\OutVarTests.cs (2)
6109CompileAndVerify(compilation, verify: Verification.Fails, expectedOutput: 6143CompileAndVerify(compilation, verify: Verification.Fails, expectedOutput:
Semantics\ParamsCollectionTests.cs (65)
102Verification.FailsILVerify with { ILVerifyMessage = "[InlineArrayAsSpan]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0xc }" } 103: Verification.Skipped, 281verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 387verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 413verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 594verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 1068verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 1266verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 2606verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 3019Verification.FailsILVerify with { ILVerifyMessage = "[InlineArrayAsReadOnlySpan]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x11 }" } 3020: Verification.Skipped, 4406CompileAndVerify(comp2, expectedOutput: ExpectedOutput("span"), verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 4409CompileAndVerify(comp2, expectedOutput: ExpectedOutput("span"), verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 4412CompileAndVerify(comp2, expectedOutput: ExpectedOutput("array"), verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 4463verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 4525verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 4678verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 4863verify: Verification.Skipped, 4901verify: Verification.Skipped, 5074CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: ExpectedOutput($""" 5184CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: ExpectedOutput($""" 5289CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: ExpectedOutput($""" 5396CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: ExpectedOutput($""" 5455CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: ExpectedOutput(""" 5498CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: ExpectedOutput(""" 5584verify: Verification.Skipped, 5641verify: Verification.Skipped, 5678Verification.FailsILVerify with { ILVerifyMessage = "[InlineArrayAsSpan]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0xc }" } 5679: Verification.Skipped, 5743verify: Verification.Skipped, 5811verify: Verification.Skipped, 8882verify: Verification.Skipped, 8925verify: Verification.Skipped, 8969verify: Verification.Skipped, 12528Verification.FailsILVerify with { ILVerifyMessage = "[GetEnumerator]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x9 }" } 12529: Verification.Passes 12840Verification.Passes : 12841Verification.Fails with 13348verify: image ? Verification.Passes : Verification.Skipped, 13414verify: image ? Verification.Passes : Verification.Skipped, 13478verify: image ? Verification.Passes : Verification.Skipped, 13582verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 13683verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped, 16499verify: Verification.Skipped, 16513verify: Verification.Skipped, 16806var verifier = CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics( 16971verifier = CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics(
Semantics\PatternMatchingTests.cs (5)
2575CompileAndVerify(compilation, verify: Verification.Fails, expectedOutput: 6227var comp = CompileAndVerify(compilation, expectedOutput: "ok", verify: Verification.FailsILVerify); 6526CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify); 8447CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: @"True 10047CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: @"True
Semantics\PatternMatchingTests_ListPatterns.cs (2)
8059var verifier = CompileAndVerify(compilation, verify: Verification.FailsPEVerify); 8130var verifier = CompileAndVerify(compilation, expectedOutput: "1 2 3", verify: Verification.FailsPEVerify);
Semantics\PatternMatchingTests3.cs (2)
474var comp = CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 3491CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped);
Semantics\PatternMatchingTests4.cs (3)
3360var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 3387var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 3413var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped);
Semantics\PrimaryConstructorTests.cs (11)
7045", verify: Verification.Skipped); 7093S3 { X = 3, Y = }", verify: Verification.Skipped); 8768var verifier = CompileAndVerify(comp, expectedOutput: @"122123124125125", verify: Verification.Fails).VerifyDiagnostics( 12244var verifier = CompileAndVerify(comp, expectedOutput: @"123124125126-1", verify: Verification.Fails).VerifyDiagnostics(); 12317var verifier = CompileAndVerify(comp, expectedOutput: @"123124125126-1-2-3", verify: Verification.Fails).VerifyDiagnostics(); 12394var verifier = CompileAndVerify(comp, expectedOutput: @"123123124-1-2-3", verify: Verification.Passes).VerifyDiagnostics( 14664", verify: Verification.Skipped).VerifyDiagnostics( 15066", verify: Verification.Skipped).VerifyDiagnostics( 15433CompileAndVerify(comp, expectedOutput: @"123", verify: Verification.Skipped).VerifyDiagnostics(); 15834var verifier = CompileAndVerify(comp, expectedOutput: @"122123124125125", verify: Verification.Fails).VerifyDiagnostics( 21910CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics();
Semantics\RecordTests.cs (77)
37verify: Verification.Skipped); 781CompileAndVerify(comp, expectedOutput: "(2, 2)", verify: Verification.Skipped /* init-only */).VerifyDiagnostics(); 801CompileAndVerify(comp, expectedOutput: "(2, 2)", verify: Verification.Skipped /* init-only */).VerifyDiagnostics(); 857CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Skipped /* init-only */); 1423CompileAndVerify(comp, expectedOutput: "P1 P2 P3 RAN", verify: Verification.Skipped /* pointers */); 1717CompileAndVerify(comp, expectedOutput: "static ctor", verify: Verification.Skipped); 2424verify: Verification.Passes, 2470CompileAndVerify(comp, expectedOutput: "RAN 2", verify: Verification.Skipped /* init-only */); 2485CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 5269CompileAndVerify(comp, expectedOutput: "C2 { I1 = 42, I2 = 43 }", verify: Verification.Skipped /* init-only */); 5303CompileAndVerify(comp, expectedOutput: "C1 { I1 = 42, P2 = 43, P3 = 44 }", verify: Verification.Skipped /* init-only */); 5376CompileAndVerify(comp, expectedOutput: "B1 { P = 1 } B2 { P = 2 }", verify: Verification.Skipped /* init-only */); 5590var v = CompileAndVerify(comp, expectedOutput: "C1 { field = hello } C1 { field = 42 }", verify: Verification.Skipped /* init-only */); 5726var v = CompileAndVerify(comp, expectedOutput: "C1 { Property = 42 }", verify: Verification.Skipped /* init-only */); 5768CompileAndVerify(comp, expectedOutput: "C1 { Property1 = 42, Property2 = , field1 = 43, field2 = hi }", verify: Verification.Skipped /* init-only */); 5790var v = CompileAndVerify(comp, expectedOutput: "C1 { A1 = 42, A2 = 100, B1 = 43, B2 = 101 }", verify: Verification.Skipped /* init-only */); 6130CompileAndVerify(comp, expectedOutput: "C1 { A2 = 42, A1 = 100, B2 = 43, B1 = 101 }", verify: Verification.Skipped /* init-only */); 6154CompileAndVerify(comp, expectedOutput: "C1 { A1 = 100, B1 = 101 }", verify: Verification.Skipped /* init-only */); 6178CompileAndVerify(comp, expectedOutput: "C1 { B1 = 101, A1 = 100 }", verify: Verification.Skipped /* init-only */); 7614CompileAndVerify(comp, expectedOutput: "R1 { I1 = 1 } R2 { I1 = 10, I2 = 11 } R3 { I1 = 20, I2 = 21, I3 = 22 }", verify: Verification.Skipped /* init-only */); 11342var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 11556var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 11792var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 12282CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 12361CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 12466CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 12596var verifierA = CompileAndVerify(compA, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12636var verifierB = CompileAndVerify(compB, expectedOutput: "(1, 2, 3, 4) (1, 2, 3, 4) (10, 2, 30, 4)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12688var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 3, 4) (10, 20, 30, 40)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12745var verifier = CompileAndVerify(comp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12777var verifier = CompileAndVerify(comp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics( 13005var verifier = CompileAndVerify(comp, expectedOutput: "RAN", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13060var verifier = CompileAndVerify(comp, expectedOutput: "1 RAN 2", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13182var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 42) RAN (10, 20, 42)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13222var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 42) (10, 20, 42)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13502var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 3, 4, 100, 200)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13981CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "RAN").VerifyDiagnostics(); 14007CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "RAN").VerifyDiagnostics(); 14040CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "RAN").VerifyDiagnostics( 14073CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "123").VerifyDiagnostics(); 23535CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 23569CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 23756CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 24617CompileAndVerify(comp, expectedOutput: "(42, 43, 44)", verify: Verification.Skipped /* init-only */); 24871CompileAndVerify(comp, expectedOutput: "(42, 43)", verify: Verification.Skipped /* init-only */); 24916CompileAndVerify(comp, expectedOutput: "(42, 43, 44, 45)", verify: Verification.Skipped /* init-only */); 24943CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 24967var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 25004var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Skipped /* init-only */); 25034var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 25099verify: Verification.Skipped, 25159verify: Verification.Skipped, 25236verify: Verification.Skipped, 25293verify: Verification.Skipped, 25368verify: Verification.Skipped, 25452verify: Verification.Skipped, 25522verify: Verification.Skipped, 25588parseOptions: TestOptions.Regular9, options: TestOptions.DebugExe, verify: Verification.Skipped /* init-only */); 25620CompileAndVerify(comp, expectedOutput: "(R, R2)", verify: Verification.Skipped /* init-only */); 27694CompileAndVerify(comp, expectedOutput: "4243", verify: Verification.Skipped /* init-only */); 27898CompileAndVerify(compDebug, expectedOutput: "C1 { I1 = 42 }", verify: Verification.Skipped /* init-only */); 27901CompileAndVerify(compRelease, expectedOutput: "C1 { I1 = 42 }", verify: Verification.Skipped /* init-only */); 27921CompileAndVerify(compDebug, expectedOutput: "C1 { I1 = 42 }", verify: Verification.Skipped /* init-only */); 27924CompileAndVerify(compRelease, expectedOutput: "C1 { I1 = 42 }", verify: Verification.Skipped /* init-only */); 29317var verifier = CompileAndVerify(comp, expectedOutput: "42 - 42", verify: Verification.Skipped /* init-only */); 30442CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics(); 30445CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics();
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
328CompileAndVerify(compilation, expectedOutput: "Pass", verify: Verification.Skipped);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IObjectCreationExpression.cs (1)
15270var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (345)
Semantics\ArglistTests.cs (7)
193var verifier = CompileAndVerify(source: text, expectedOutput: "System.Int32", verify: Verification.FailsILVerify); 361var verifier = CompileAndVerify(source: text, expectedOutput: "System.String", verify: Verification.FailsILVerify); 675var verifier = CompileAndVerify(source: text, expectedOutput: "1123", verify: Verification.FailsILVerify); 79742", verify: Verification.FailsILVerify); 905var verifier = CompileAndVerify(source: text, expectedOutput: "4242", verify: Verification.FailsILVerify); 1679CompileAndVerify(source, expectedOutput: "111", verify: Verification.FailsILVerify).VerifyDiagnostics(); 1698CompileAndVerify(source, expectedOutput: "111", verify: Verification.FailsILVerify).VerifyDiagnostics();
Semantics\BetterCandidates.cs (2)
952CompileAndVerify(compilation, expectedOutput: "2", verify: Verification.Skipped); 986var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes);
Semantics\BindingAsyncTasklikeMoreTests.cs (2)
1591CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: "3"); 1595CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: "3");
Semantics\BindingAwaitTests.cs (1)
2840var compiled = CompileAndVerify(comp, expectedOutput: "dynamic42", verify: Verification.FailsPEVerify);
Semantics\DelegateTypeTests.cs (29)
3799CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 11413var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 11653CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 11726", verify: Verification.FailsILVerify with { ILVerifyMessage = "[F2]: Return type is ByRef, TypedReference, ArgHandle, or ArgIterator. { Offset = 0x18 }" }); 12162CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12207CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12238CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 12326CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12383CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12418CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12455CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12482CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12536CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12602CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12665CompileAndVerify(sourceB, references: new[] { refA }, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12722CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12763CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12837CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: 12899CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: 12958CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: 13015CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 13059CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 14093var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 14145var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 14210var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 14259var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 16468verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Skipped, 17526CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: "True").VerifyDiagnostics();
Semantics\DynamicTests.cs (7)
1553expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics(); 1575expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics(); 1597expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics(); 1642expectedOutput: RefFieldTests.IncludeExpectedOutput("1"), verify: Verification.FailsPEVerify).VerifyDiagnostics(); 1670expectedOutput: ro ? "0" : "1", verify: ro ? Verification.FailsPEVerify : default).VerifyDiagnostics(); 3916var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithAllowUnsafe(true), verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3944var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithAllowUnsafe(true), verify: Verification.FailsPEVerify).VerifyDiagnostics();
Semantics\ForEachTests.cs (1)
3085CompileAndVerify(comp, verify: Verification.FailsPEVerify).
Semantics\FunctionPointerTests.cs (11)
26return CompileAndVerify(compilation, verify: Verification.Skipped, expectedOutput: expectedOutput); 239var verifier = CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Skipped); 973CompileAndVerify(comp, verify: Verification.Skipped); 2698", options: TestOptions.UnsafeReleaseExe, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped); 2723", options: TestOptions.UnsafeReleaseExe, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped); 2946", expectedOutput: "11", options: TestOptions.UnsafeReleaseExe, verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped); 3351var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: @" 3848var verifier = CompileAndVerify(comp, expectedOutput: "True", verify: Verification.Skipped);
Semantics\GenericConstraintsTests.cs (11)
2437options: TestOptions.UnsafeReleaseExe, references: new[] { reference, reference1 }, verify: Verification.Passes, expectedOutput: "123"); 2523options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: string.Join(Environment.NewLine, type, size)).VerifyIL("Test.M<T>", @" 2575options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "246").VerifyIL("Test.M<T>", @" 2613options: 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"); 3043verify: Verification.Fails, 3929CompileAndVerify(code, options: TestOptions.UnsafeReleaseExe, expectedOutput: "42", verify: Verification.Skipped); 3962CompileAndVerify(code, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped) 4261verify: Verification.Skipped, 4317verify: Verification.Skipped,
Semantics\InitOnlyMemberTests.cs (11)
1448verify: Verification.FailsPEVerify); 2742verify: Verification.FailsPEVerify); 2788var v = CompileAndVerify(comp, expectedOutput: "2 3", verify: Verification.Skipped); 3011CompileAndVerify(comp, expectedOutput: "RAN 42", verify: Verification.Skipped /* init-only */); 4197verify: Verification.FailsPEVerify); 4221" }, verify: Verification.FailsPEVerify, expectedOutput: "1"); 4257" }, verify: Verification.FailsPEVerify, expectedOutput: "1"); 4296" }, verify: Verification.FailsPEVerify, expectedOutput: "1"); 4336" }, verify: Verification.FailsPEVerify, expectedOutput: "1"); 4431" }, verify: Verification.FailsPEVerify, expectedOutput: @"I1 was 1 4565CompileAndVerify(comp, expectedOutput: "c", verify: Verification.FailsPEVerify);
Semantics\InterceptorsTests.cs (7)
4087var verifier = CompileAndVerify(CreateEmptyCompilation((source, "Program.cs"), parseOptions: RegularWithInterceptors, options: WithNullableEnable()), verify: Verification.Skipped); 4180var verifier = CompileAndVerify(CreateEmptyCompilation((source, "Program.cs"), parseOptions: RegularWithInterceptors, options: WithNullableEnable()), verify: Verification.Skipped); 4691var verifier = CompileAndVerify(new[] { (source, "Program.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, verify: Verification.Skipped); 7434CompileAndVerify(comp, verify: Verification.Fails); 7454verify: Verification.Fails, 7487CompileAndVerify(comp, verify: Verification.Fails); 7507verify: Verification.Fails,
Semantics\InterpolationTests.cs (9)
1114var compilation = CompileAndVerify(comp, verify: Verification.Fails); 4056var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: @" 4628verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped); 9745verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped); 11386", verify: Verification.Skipped); 11564", verify: Verification.Skipped); 11671", verify: Verification.Skipped);
Semantics\NamedAndOptionalTests.cs (1)
774var c = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify);
Semantics\NativeIntegerTests.cs (6)
4618var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 4690verify: Verification.FailsILVerify with { ILVerifyMessage = "[GetHashCode]: Unrecognized arguments for delegate .ctor. { Offset = 0x12 }" }, 9512var verifier = CompileAndVerify(comp, verify: useUnsafeContext || !verify ? Verification.Skipped : Verification.Passes); 10378var verifier = CompileAndVerify(comp, emitOptions: EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"), verify: Verification.Skipped); 13898var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: expectedOutput);
Semantics\NullableReferenceTypesTests.cs (12)
116637CompileAndVerify(compilation2, verify: Verification.FailsPEVerify); 116648CompileAndVerify(compilation3, verify: Verification.FailsPEVerify); 138543verify: ExecutionConditionUtil.IsDesktop ? Verification.Skipped : Verification.Passes, 138581verify: ExecutionConditionUtil.IsDesktop ? Verification.Skipped : Verification.Passes, 138612verify: ExecutionConditionUtil.IsDesktop ? Verification.Skipped : Verification.Passes, 138646verify: ExecutionConditionUtil.IsDesktop ? Verification.Skipped : Verification.Passes, 138691verify: ExecutionConditionUtil.IsDesktop ? Verification.Skipped : Verification.Passes,
Semantics\NullableTests.cs (2)
208verifier = CompileAndVerify(source: source3, expectedOutput: "1", verify: Verification.FailsPEVerify); 267CompileAndVerify(source: source4.Replace("TYPE", type), expectedOutput: "0", verify: Verification.FailsPEVerify);
Semantics\OverloadResolutionTests.cs (6)
2741CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2 9707parseOptions: TestOptions.Regular12, verify: Verification.Fails).VerifyDiagnostics(expectedDiagnostics); 9710verify: Verification.Fails).VerifyDiagnostics(expectedDiagnostics); 9741CompileAndVerify(source, expectedOutput: "555", verify: Verification.FailsILVerify, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9742CompileAndVerify(source, expectedOutput: "555", verify: Verification.FailsILVerify).VerifyDiagnostics(expectedDiagnostics); 11627CompileAndVerify(code, expectedOutput: @"1", verify: Verification.Fails);
Semantics\QueryTests.cs (3)
4600verify: Verification.FailsPEVerify, 4644verify: Verification.FailsPEVerify, 4694verify: Verification.FailsPEVerify,
Semantics\RawInterpolationTests.cs (1)
1112var compilation = CompileAndVerify(comp, verify: Verification.Fails);
Semantics\RawInterpolationTests_Handler.cs (5)
2459value:C", verify: Verification.FailsILVerify); 2929verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped); 7958verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped);
Semantics\RecordStructTests.cs (12)
40verify: Verification.Skipped); 1310CompileAndVerify(comp, expectedOutput: "(2, 2)", verify: Verification.Skipped /* init-only */) 1685CompileAndVerify(comp, expectedOutput: "P1 P2 P3 RAN", verify: Verification.Skipped /* pointers */); 2169var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, verify: Verification.Skipped); 2425CompileAndVerify(comp, expectedOutput: "static ctor", verify: Verification.Skipped /* init-only */); 2523CompileAndVerify(comp, expectedOutput: "(42, 43)", verify: Verification.Skipped /* init-only */); 2826var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 2867var verifier = CompileAndVerify(new[] { src, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, verify: Verification.Skipped); 2899var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 5541var v = CompileAndVerify(comp, expectedOutput: "C1 { I = 42 }", verify: Verification.Skipped /* init-only */); 7664var verifier = CompileAndVerify(comp, expectedOutput: "4243", verify: Verification.Skipped /* init-only */); 10513verify: Verification.Skipped,
Semantics\RefEscapingTests.cs (13)
1030var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 5038var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 5088var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 5138var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 5217var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 5321var compiled = CompileAndVerify(comp, verify: Verification.Passes); 7061CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics().VerifyIL("Program.Test3", 7106CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics().VerifyIL("Program.Test1", 7205CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics().VerifyIL("Program.Test1", 7252CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics().VerifyIL("Program.Test1", 7391CompileAndVerify(comp, verify: Verification.Skipped).VerifyDiagnostics().VerifyIL("Program.Test1", 7477CompileAndVerify(comp, verify: Verification.Skipped). 7521CompileAndVerify(comp, verify: Verification.Skipped).
Semantics\RefFieldTests.cs (67)
212var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 286var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 340CompileAndVerify(comp, verify: Verification.Skipped); 372CompileAndVerify(comp, verify: Verification.Skipped); 427var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 830var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 937var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1111var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1169var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1285var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1322var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1356var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1401var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1446var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1691var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1729var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1766var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1806var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1844var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1989var verifier = CompileAndVerify(compB, verify: Verification.Skipped); 2264verify: Verification.Skipped, 2539var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 2641CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 2733CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")).VerifyDiagnostics(). 2783CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")).VerifyDiagnostics(). 6382var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 6787var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 7189var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 7314var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8363var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8409var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8566var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8635var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8672var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8709var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8754var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8804var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8873var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8944var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 9007var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 9081var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(@"(1, Hello world)")); 9700var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 10098var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 18246var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 18861var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 20417var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")); 21161var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")); 21335var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("4242")); 21459var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("4242")); 21788var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")); 26155var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: "12", verify: Verification.Fails); 26299var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: "12", verify: Verification.Fails); 28620var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 30331verify: Verification.Skipped, 30385verify: Verification.Skipped, 30453verify: Verification.Skipped, 30516verify: Verification.Skipped, 30565verify: Verification.Skipped, 30639verify: Verification.Skipped, 30712verify: Verification.Skipped, 30755verify: Verification.Skipped, 30794verify: Verification.Skipped, 30836verify: Verification.Skipped, 30880verify: Verification.Skipped, 30921verify: Verification.Skipped, 30969verify: Verification.Skipped, 31012verify: Verification.Skipped,
Semantics\RefLocalsAndReturnsTests.cs (7)
2468var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 2536var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3298CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12, targetFramework: TargetFramework.Net70, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3299CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net70, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3300CompileAndVerify(code, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net70, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3461CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net70, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3462CompileAndVerify(code, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net70, verify: Verification.FailsPEVerify).VerifyDiagnostics();
Semantics\SemanticErrorTests.cs (3)
7623CompileAndVerify(text, expectedOutput: expectedOutput, verify: Verification.Fails); 13441var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 16098var c = CompileAndVerify(text, expectedOutput: "7788", verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe);
Semantics\SpanStackSafetyTests.cs (13)
1062CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 1065CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 1209CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 1212CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 2203CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2239CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2279}", options: TestOptions.ReleaseExe), verify: Verification.Fails, expectedOutput: @" 2323}", options: TestOptions.ReleaseExe), verify: Verification.Fails, expectedOutput: @" 2622CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics(); 2648CompileAndVerify(comp, expectedOutput: "Done", verify: Verification.FailsILVerify).VerifyDiagnostics(); 2672CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics(); 2702CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics(); 2725CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics();
Semantics\StackAllocInitializerTests.cs (2)
525CompileAndVerify(comp, expectedOutput: "123123123", verify: Verification.Fails); 780CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics();
Semantics\StructConstructorTests.cs (9)
2282var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: 2464var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: 2770", verify: Verification.Skipped); 2880", verify: Verification.Skipped); 2950S3 { X = 3, Y = }", verify: Verification.Skipped); 3004CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular10, verify: Verification.Skipped, expectedOutput: expectedOutput); 3005CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, verify: Verification.Skipped, expectedOutput: expectedOutput); 3111CompileAndVerify(source, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: 3946var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "explicit ctor");
Semantics\TargetTypedDefaultTests.cs (1)
1941CompileAndVerify(comp, expectedOutput: "123: True", verify: Verification.FailsILVerify);
Semantics\TopLevelStatementsTests.cs (5)
911CompileAndVerify(comp, expectedOutput: "100 200 300", verify: Verification.Skipped); 932CompileAndVerify(comp, expectedOutput: "12", verify: Verification.Skipped); 6081verify: Verification.Skipped); 6153verify: Verification.Skipped); 8444CompileAndVerify(comp, expectedOutput: "4", verify: Verification.Skipped);
Semantics\UnsafeTests.cs (9)
703CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics( 5999var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 10037CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: "42"); 12133var compilation = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 12250var compilation = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 12329CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12412var comp1 = CompileAndVerify(s1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).Compilation; 12415options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, 12466options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails,
Semantics\UserDefinedConversionTests.cs (5)
1721var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1774var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1831var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1866var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Skipped); 1911var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Skipped);
Semantics\UseSiteErrorTests.cs (1)
2381CompileAndVerify(compilation5, verify: Verification.FailsILVerify);
Semantics\Utf8StringsLiteralsTests.cs (40)
422", verify: Verification.Fails).VerifyDiagnostics(); 459", verify: Verification.Fails).VerifyDiagnostics(); 467", verify: Verification.Fails).VerifyDiagnostics(); 1455CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan<char>ReadOnlySpan<byte>", verify: Verification.Fails).VerifyDiagnostics(); 1653", verify: Verification.Fails).VerifyDiagnostics(); 1670", verify: Verification.Fails).VerifyDiagnostics(); 1706", verify: Verification.Fails).VerifyDiagnostics(); 1723", verify: Verification.Fails).VerifyDiagnostics(); 1759", verify: Verification.Fails).VerifyDiagnostics(); 1776", verify: Verification.Fails).VerifyDiagnostics(); 1821", verify: Verification.Fails).VerifyDiagnostics(); 1838", verify: Verification.Fails).VerifyDiagnostics(); 1881", verify: Verification.Fails).VerifyDiagnostics(); 2008", verify: Verification.Fails).VerifyDiagnostics(); 2039var verifier = CompileAndVerify(comp, expectedOutput: "{ 0x63 0x61 0x74 }", verify: Verification.Fails).VerifyDiagnostics(); 2103CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan", verify: Verification.Fails).VerifyDiagnostics(); 2123CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan", verify: Verification.Fails).VerifyDiagnostics(); 2144CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan", verify: Verification.Fails).VerifyDiagnostics(); 2173", verify: Verification.Fails).VerifyDiagnostics(); 2202", verify: Verification.Fails).VerifyDiagnostics(); 2366", verify: Verification.Fails).VerifyDiagnostics(); 3333var verifier = CompileAndVerify(comp, verify: Verification.Fails with { ILVerifyMessage = """ 3385var verifier = CompileAndVerify(comp, verify: Verification.Fails).VerifyDiagnostics(); 3448var verifier = CompileAndVerify(comp, expectedOutput: @"ArgumentOutOfRangeException", verify: Verification.Fails).VerifyDiagnostics(); 3498", verify: Verification.Fails).VerifyDiagnostics(); 3540", verify: Verification.Fails).VerifyDiagnostics(); 3589", verify: Verification.Fails).VerifyDiagnostics(); 3638", verify: Verification.Fails).VerifyDiagnostics(); 3688", verify: Verification.Fails).VerifyDiagnostics(); 3735", verify: Verification.Fails).VerifyDiagnostics(); 3776", verify: Verification.Fails).VerifyDiagnostics(); 3829CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).VerifyDiagnostics(); 3855CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).VerifyDiagnostics(); 3901CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 3947CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 3991CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 4034CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 4065", verify: Verification.Fails).VerifyDiagnostics(); 4136", verify: Verification.Fails).VerifyDiagnostics(); 4301CompileAndVerify(comp, expectedOutput: "801", verify: Verification.Fails).VerifyDiagnostics();
Semantics\WarningVersionTests.cs (24)
159verify: Verification.Skipped); 168verify: Verification.Skipped); 181verify: Verification.Skipped); 192verify: Verification.Skipped); 237verify: Verification.Skipped); 246verify: Verification.Skipped); 260verify: Verification.Skipped); 271verify: Verification.Skipped); 323verify: Verification.Skipped); 332verify: Verification.Skipped); 348verify: Verification.Skipped); 362verify: Verification.Skipped); 447verify: Verification.Skipped); 456verify: Verification.Skipped); 469verify: Verification.Skipped); 480verify: Verification.Skipped); 534verify: Verification.Skipped); 543verify: Verification.Skipped); 556verify: Verification.Skipped); 567verify: Verification.Skipped); 621verify: Verification.Skipped); 630verify: Verification.Skipped); 643verify: Verification.Skipped); 654verify: Verification.Skipped);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (282)
Compilation\CompilationAPITests.cs (1)
1029CompileAndVerify(assembly, verify: Verification.FailsILVerify);
Compilation\IndexedProperties_BindingTests.cs (1)
205var reference = BasicCompilationUtils.CompileToMetadata(COMSource, verify: Verification.Passes);
Compilation\ReferenceManagerTests.cs (2)
390verify: Verification.Skipped); 1741verify: Verification.Passes);
Compilation\SemanticModelGetSemanticInfoTests.cs (2)
1440var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Skipped); 1579var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Skipped);
Compilation\UsedAssembliesTests.cs (8)
36CompileAndVerify(comp1, verify: Verification.FailsILVerify); 57CompileAndVerify(comp1, verify: Verification.FailsILVerify); 111CompileAndVerify(comp2, verify: Verification.Skipped).Diagnostics.Where(d => d.Code != (int)ErrorCode.WRN_NoRuntimeMetadataVersion).Verify(after); 121CompileAndVerify(comp3, verify: Verification.Skipped).Diagnostics.Where(d => d.Code != (int)ErrorCode.WRN_NoRuntimeMetadataVersion).Verify(after); 327CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: expectedOutput).VerifyDiagnostics(); 339CompileAndVerify(comp3, verify: Verification.Skipped, expectedOutput: expectedOutput).VerifyDiagnostics(); 345CompileAndVerify(comp2, verify: Verification.Skipped, expectedOutput: expectedOutput).VerifyDiagnostics(); 421CompileAndVerify(comp1, verify: Verification.FailsILVerify);
Symbols\AnonymousTypesSemanticsTests.cs (1)
1901CompileAndVerify(comp, expectedOutput: "RAN", verify: Verification.FailsPEVerify);
Symbols\AnonymousTypesSymbolTests.cs (1)
1472verify: Verification.Passes
Symbols\CovariantReturnTests.cs (23)
588CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 729CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 787CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 846CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base<object>, Derived<object, string>)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 908CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived<Q>)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 977CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1037CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base<object>, Derived<object, string>)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1101CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived<Q>)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1163CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1225CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base<object>, Derived<object, string>)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1292CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived<Q>)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1442CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1505CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1570var c = CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped); 1634CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 1911CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 2100CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 2234CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 2411CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived, Derived2)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 2529CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped).VerifyIL("Program.M(Base, Derived, Derived2)", source: assignments, sequencePoints: "Program.M", expectedIL: @" 2648CompileAndVerify(vbComp, verify: Verification.Skipped).VerifyIL("Derived2.T(Base, Derived, Derived2)", source: vbSource, sequencePoints: "Derived2.T", expectedIL: @" 3240var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3403var verifier = CompileAndVerify(comp, verify: Verification.Skipped);
Symbols\DefaultInterfaceImplementationTests.cs (14)
44private static Verification VerifyOnMonoOrCoreClr 48return ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped; 52private static Verification Verify(bool isStatic) 55return isStatic ? Verification.Skipped : VerifyOnMonoOrCoreClr; 63private static Verification VerifyOnMonoOrCoreClr_FailsIlVerify 67return ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped; 71private static Verification VerifyFailsIlVerify(bool isStatic) 73return !isStatic && ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.FailsILVerify : Verification.Skipped; 31748private void ValidateNestedTypes_01(string source1, Accessibility expected = Accessibility.Public, TargetFramework targetFramework = TargetFramework.Standard, bool execute = true, Verification verify = default) 44770CompileAndVerify(compilation1, symbolValidator: ValidateConstructor, verify: Verification.Skipped); 50760CompileAndVerify(compilation2, expectedOutput: "Test.M1", verify: Verification.Skipped);
Symbols\ExtendedPartialMethodsTests.cs (2)
1216verify: Verification.Skipped); 1226verify: Verification.Skipped);
Symbols\ExtensionMethodTests.cs (1)
2301G: S", verify: Verification.FailsILVerify);
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1389var verifier = CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Skipped);
Symbols\IndexedPropertyTests.cs (15)
1085var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, verify: Verification.Passes); 1173var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 1209var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 1541var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Skipped); 1564var compilation3 = CompileAndVerify(source3, references: new[] { reference1 }, verify: Verification.Skipped); 1957var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 1969var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2045var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 2104var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Skipped); 2237var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 2261var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2309var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 2331var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2386var reference1 = BasicCompilationUtils.CompileToMetadata(source1, verify: Verification.Passes); 2406var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput:
Symbols\InterfaceImplementationTests.cs (1)
2450CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: @"set_P1
Symbols\Metadata\PE\TypeForwarders.cs (2)
1643CompileAndVerify(appCompilation, verify: Verification.Fails, 1728var asm0 = ModuleMetadata.CreateFromImage(CompileAndVerify(comp0, verify: Verification.Skipped).EmittedAssemblyData);
Symbols\MethodImplementationFlagsTests.cs (2)
163CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator, verify: Verification.Skipped); 185CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator, verify: Verification.Skipped);
Symbols\ModuleInitializers\AccessibilityTests.cs (2)
381verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped);
Symbols\ModuleInitializers\ModuleInitializersTests.cs (8)
280verify: ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Passes : Verification.Skipped); 357verify: !ExecutionConditionUtil.IsMonoOrCoreClr ? Verification.Skipped : Verification.Passes); 833CompileAndVerify(comp1, symbolValidator: validateModuleInitializer, verify: Verification.Skipped); 850CompileAndVerify(comp2, symbolValidator: validateModuleInitializer, verify: Verification.Skipped); 1071CompileAndVerify(comp, symbolValidator: validateModuleInitializer, verify: Verification.Skipped, expectedOutput: "12"); 1074CompileAndVerify(comp, symbolValidator: validateNoModuleInitializer, verify: Verification.Skipped, expectedOutput: "1");
Symbols\PartialPropertiesTests.cs (3)
692verify: Verification.Skipped); 2004var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "1"); 2919verify: Verification.Fails,
Symbols\RequiredMembersTests.cs (12)
1388var verifier = CompileAndVerify(comp, verify: Verification.Skipped, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 2541CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3216CompileAndVerify(originalComp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 3264CompileAndVerify(originalComp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 3299CompileAndVerify(originalComp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 3347CompileAndVerify(originalComp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics(); 3394CompileAndVerify(originalComp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Skipped).VerifyDiagnostics();
Symbols\Source\RecordTests.cs (7)
24verify: Verification.FailsPEVerify); 753var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 806var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 903var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics( 971}", verify: Verification.Passes, expectedOutput: @"False 1055}", verify: Verification.Passes).VerifyDiagnostics( 1526var verifier = CompileAndVerify(comp, expectedOutput: "", verify: Verification.Passes).VerifyDiagnostics();
Symbols\StaticAbstractMembersInInterfacesTests.cs (167)
5307CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5343CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5492CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5560CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5599CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5643CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5874CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5913CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 5982CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 6027CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 6120CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 6166CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 8394var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 8428verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 8771CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 8777var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 8910verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 9318var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 9339verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 9609var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 9684verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10088var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10538CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10544var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10649verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10821var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10886verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10993var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11067verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11206var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11271verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11371var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11482verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11708CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11714var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11838verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 12001var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 12072verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13145var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13164verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13230var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13250verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13321var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13359verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14021var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14060verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14523var verifier = CompileAndVerify(compilation2, verify: Verification.Skipped).VerifyDiagnostics(); 14661var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14691verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14891CompileAndVerify(compilation1, verify: Verification.Skipped, expectedOutput: !Execute(isVirtual) ? null : @" 14957CompileAndVerify(compilation1, verify: Verification.Skipped, expectedOutput: !Execute(isVirtual) ? null : @" 15079var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 15103verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 15351var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 15373verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 16063CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16065CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 16125CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16127CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 16198CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16476var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16561var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16679CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16765var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16860CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16942CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 17024CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 17095CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 17169CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 17256CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 17353CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, expectedOutput: !(Execute(isVirtual) && ExecutionConditionUtil.IsMonoOrCoreClr) ? null : (genericFirst ? "T" : "int"), verify: Verification.Skipped).VerifyDiagnostics( 17459CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, expectedOutput: !(Execute(isVirtual) && ExecutionConditionUtil.IsMonoOrCoreClr) ? null : (genericIsStatic ? "T" : "int"), verify: Verification.Skipped).VerifyDiagnostics(); 19297CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19299CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19378CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19380CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19470CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19472CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19569CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19571CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19652CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19654CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19744CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19746CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19833CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 19835CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 19926CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20000CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20083CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20163CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20792var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20909var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21020var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21155var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21291CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21351CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21454CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21572var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21698CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21807CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21909CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 22925CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 22927CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 23020CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 23022CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 23111CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 23113CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 23216CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 23809CompileAndVerify(compilation5, sourceSymbolValidator: validate5, symbolValidator: validate5, verify: Verification.Skipped).VerifyDiagnostics(); 24161CompileAndVerify(compilation5, sourceSymbolValidator: validate5, symbolValidator: validate5, verify: Verification.Skipped).VerifyDiagnostics(); 24390var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 24579var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 24777CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 24890var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 25020CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 25091CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 25703CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 25705CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 25798CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 25800CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 25903CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 26236CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics(); 26349CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics(); 26623CompileAndVerify(compilation3, sourceSymbolValidator: validate3, symbolValidator: validate3, verify: Verification.Skipped).VerifyDiagnostics(); 26918var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27119var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27442CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27555var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27686CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27757CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 28654CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 28656CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 28782CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 28784CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped, 28890CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29251var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29367var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29515CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29633CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29739CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 30144CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30150var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30216verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30329var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30402verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30787var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30873verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31086var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31142var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31200var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31248var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31291var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31345var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31394var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31467CompileAndVerify(compilation1, verify: Verification.Skipped, expectedOutput: !Execute(isVirtual) ? null : @" 31525CompileAndVerify(compilation1, verify: Verification.Skipped, expectedOutput: !Execute(isVirtual) ? null : @" 31578CompileAndVerify(compilation1, verify: Verification.Skipped, expectedOutput: !Execute(isVirtual: false) ? null : @" 31619CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 31716CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 33477verify: Verification.Skipped); 33523verify: Verification.Skipped); 33658CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 33663CompileAndVerify(compilation2, verify: Verification.Skipped).VerifyDiagnostics(); 33668CompileAndVerify(compilation3, verify: Verification.Skipped).VerifyDiagnostics(); 33715CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 33720CompileAndVerify(compilation2, verify: Verification.Skipped).VerifyDiagnostics(); 33725CompileAndVerify(compilation3, verify: Verification.Skipped).VerifyDiagnostics();
Symbols\SymbolErrorTests.cs (6)
6250CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 7327CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics(); 7336CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics(); 7407CompileAndVerify(compilation, verify: Verification.Skipped).VerifyDiagnostics(); 18453var verifier = CompileAndVerify(comp, verify: Verification.Skipped). 20817verify: Verification.FailsILVerify with { ILVerifyMessage = "[Main]: Unable to resolve token. { Offset = 0x1, Token = 167772167 }" });
Microsoft.CodeAnalysis.CSharp.Test.Utilities (10)
BasicCompilationUtils.cs (1)
19public static MetadataReference CompileToMetadata(string source, string assemblyName = null, IEnumerable<MetadataReference> references = null, Verification verify = default)
CSharpTestBase.cs (9)
813Verification verify = default) => 849Verification verify = default) => 886Verification verify = default) 927Verification verify = default) => 963Verification verify = default) => 1000Verification verify = default) 1033Verification verify = default) 1534internal CompilationVerifier CompileAndVerifyException<T>(string source, string expectedMessage = null, bool allowUnsafe = false, Verification verify = default) where T : Exception 1540internal CompilationVerifier CompileAndVerifyException<T>(CSharpCompilation comp, string expectedMessage = null, Verification verify = default) where T : Exception
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (21)
CodeGen\WinRTCollectionTests.cs (17)
439verify: Verification.Fails); 1837verify: Verification.Fails); 3197verify: Verification.Fails); 4440verify: Verification.Fails); 4806verify: Verification.Fails); 4992verify: Verification.Fails); 5189verify: Verification.Fails, 5410verify: Verification.Fails); 5547verify: Verification.Fails); 5817verify: Verification.Fails); 6044verify: Verification.Fails); 6243verify: Verification.Fails); 6602verify: Verification.Fails); 6763verify: Verification.Fails); 7035verify: Verification.Fails); 7162verify: Verification.Fails); 7283verify: Verification.Fails);
Metadata\WinMdEventTests.cs (2)
2449verify: OSVersion.IsWin8 ? Verification.Passes : Verification.Fails);
WinRTUtil.cs (2)
26verify: isWin8 ? Verification.Passes : Verification.Fails);
Microsoft.CodeAnalysis.Test.Utilities (14)
CommonTestBase.cs (10)
30/// default(<see cref="Verification"/>) should be passing. 54public static readonly Verification Skipped = new() { Status = VerificationStatus.Skipped }; 55public static readonly Verification Passes = new() { Status = VerificationStatus.Passes }; 56public static readonly Verification FailsPEVerify = new() { Status = VerificationStatus.FailsPEVerify }; 57public static readonly Verification FailsILVerify = new() { Status = VerificationStatus.FailsILVerify }; 58public static readonly Verification Fails = new() { Status = VerificationStatus.Fails }; 59public static readonly Verification PassesOrFailFast = new() { Status = VerificationStatus.PassesOrFailFast }; 61public Verification WithILVerifyMessage(string message) 87Verification verify = default) 187Verification verify)
Compilation\IRuntimeEnvironment.cs (1)
401void Verify(Verification verification);
CompilationVerifier.cs (2)
264Verification peVerify, 333private void ILVerify(Verification verification)
Platform\CoreClr\CoreCLRRuntimeEnvironment.cs (1)
111public void Verify(Verification verification)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (117)
Attributes\AssemblyAttributes.vb (8)
788verify:=Verification.FailsILVerify, 819verify:=Verification.FailsILVerify, 850verify:=Verification.FailsILVerify, 881verify:=Verification.FailsILVerify, 910CompileAndVerify(compilation, verify:=Verification.Fails, 941CompileAndVerify(compilation, verify:=Verification.Fails, 975CompileAndVerify(compilation, verify:=Verification.Fails, 1020verify:=Verification.FailsILVerify,
Attributes\AttributeTests_Conditional.vb (1)
803CompileAndVerify(comp, verify:=Verification.Fails).VerifyIL("C.M", "
Attributes\AttributeTests_StructLayout.vb (3)
392CompileAndVerify(unverifiable, validator:=validator, verify:=Verification.FailsPEVerify) 393CompileAndVerify(unloadable, validator:=validator, verify:=Verification.FailsPEVerify) 569CompileAndVerify(source, verify:=Verification.FailsPEVerify)
Attributes\AttributeTests_Synthesized.vb (28)
763verify:=If(outputKind.IsNetModule(), Verification.Skipped, Verification.Passes), 802verify:=If(outputKind.IsNetModule(), Verification.Skipped, Verification.Passes), 844verify:=If(outputKind.IsNetModule(), Verification.Skipped, Verification.Passes), 887verify:=If(outputKind.IsNetModule(), Verification.Skipped, Verification.Passes), 956verify:=If(outputKind.IsNetModule(), Verification.Skipped, Verification.Passes), 1026verify:=If(outputKind.IsNetModule(), Verification.Skipped, Verification.Passes), 1090CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1128CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1165CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1209CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1284CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1336CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1383CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator) 1432CompileAndVerify(comp, verify:=If(outputKind <> OutputKind.NetModule, Verification.Passes, Verification.Skipped), symbolValidator:=validator)
Attributes\AttributeTests_WellKnownAttributes.vb (1)
5737Dim validator = CompileAndVerifyEx(source, sourceSymbolValidator:=sourceValidator, symbolValidator:=metadataValidator, verify:=Verification.Fails, targetFramework:=TargetFramework.Mscorlib461)
Attributes\InternalsVisibleToAndStrongNameTests.vb (1)
2215CompileAndVerify(cb, verify:=Verification.Fails).Diagnostics.Verify()
CodeGen\CodeGenAsyncTests.vb (2)
9922verify:=Verification.FailsILVerify.WithILVerifyMessage("[MoveNext]: Unrecognized arguments for delegate .ctor. { Offset = 0x86 }")) 9925verify:=Verification.FailsILVerify.WithILVerifyMessage("[MoveNext]: Unrecognized arguments for delegate .ctor. { Offset = 0x75 }"))
CodeGen\CodeGenCallTests.vb (4)
3404Dim verifier = CompileAndVerifyEx(comp, targetFramework:=TargetFramework.StandardAndVBRuntime, options:=TestOptions.ReleaseExe, expectedOutput:=expectedOutput, verify:=Verification.Skipped).VerifyDiagnostics() 3629CompileAndVerifyEx(comp, targetFramework:=TargetFramework.StandardAndVBRuntime, options:=TestOptions.DebugExe, expectedOutput:=expectedOutput, verify:=Verification.Skipped).VerifyDiagnostics() 3770Dim verifier = CompileAndVerifyEx(comp, targetFramework:=TargetFramework.StandardAndVBRuntime, options:=TestOptions.ReleaseExe, expectedOutput:=expectedOutput, verify:=Verification.Skipped).VerifyDiagnostics() 4079CompileAndVerifyEx(comp, targetFramework:=TargetFramework.StandardAndVBRuntime, options:=TestOptions.DebugExe, expectedOutput:=expectedOutput, verify:=Verification.Skipped).VerifyDiagnostics()
CodeGen\CodeGenDelegateCreation.vb (1)
2346verify:=Verification.FailsILVerify.WithILVerifyMessage("[Test15]: Unrecognized arguments for delegate .ctor. { Offset = 0x1f }"),
CodeGen\CodeGenIterators.vb (1)
1697Dim verifier = CompileAndVerify(compilation, verify:=Verification.Fails)
CodeGen\CodeGenNullable.vb (1)
3486Dim verifier = CompileAndVerify(source, verify:=Verification.FailsILVerify.WithILVerifyMessage("
CodeGen\CodeGenScriptTests.vb (1)
363Dim verifier = CompileAndVerify(s0, verify:=Verification.FailsPEVerify)
CodeGen\CodeGenTests.vb (3)
53</compilation>, verify:=Verification.FailsILVerify). 6431</compilation>, references:={TestReferences.SymbolsTests.PropertiesWithByRef}, verify:=Verification.FailsILVerify) 11769CompileAndVerify(compilation, sourceSymbolValidator:=validator, symbolValidator:=validator, verify:=Verification.Passes)
CodeGen\CodeGenTryCatchThrow.vb (1)
124verify:=Verification.FailsILVerify,
CodeGen\CodeGenTuples.vb (3)
5011</compilation>, references:={ValueTupleRef, SystemRuntimeFacadeRef, MscorlibRef_v46}, expectedOutput:=<![CDATA[42]]>, verify:=Verification.FailsILVerify) 5130</compilation>, references:={ValueTupleRef, SystemRuntimeFacadeRef, MscorlibRef_v46}, expectedOutput:=<![CDATA[(42, 42)]]>, verify:=Verification.FailsILVerify) 5299</compilation>, references:={ValueTupleRef, SystemRuntimeFacadeRef, MscorlibRef_v46}, expectedOutput:=<![CDATA[42]]>, verify:=Verification.FailsILVerify)
CodeGen\WinRTCollectionTests.vb (17)
515verify:=Verification.Fails) 1587verify:=Verification.Fails) 2495verify:=Verification.Fails) 3702verify:=Verification.Fails) 4037verify:=Verification.Fails) 4210verify:=Verification.FailsPEVerify) 4381verify:=Verification.Fails) 4611verify:=Verification.Fails) 4732verify:=Verification.Fails) 4967verify:=Verification.Fails) 5187verify:=Verification.Fails) 5341verify:=Verification.Fails) 5692verify:=Verification.Fails) 5822verify:=Verification.Fails) 6080verify:=Verification.Fails) 6181verify:=Verification.Fails) 6239verify:=Verification.Fails,
Emit\CompilationEmitTests.vb (16)
678CompileAndVerify(source, emitOptions:=emitRefAssembly, verify:=Verification.Passes, validator:=assemblyValidator) 695CompileAndVerify(comp, emitOptions:=emitRefAssembly, verify:=Verification.FailsILVerify, validator:=assemblyValidator) 720CompileAndVerify(source, emitOptions:=emitRefAssembly, verify:=Verification.Passes, validator:=assemblyValidator) 1471Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes) 1504CompileAndVerify(comp, emitOptions:=emitMetadataOnly, verify:=Verification.Passes) 1538CompileAndVerify(comp, emitOptions:=emitRefOnly, verify:=Verification.Passes) 1588Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes) 1606CompileAndVerify(comp, emitOptions:=emitMetadataOnly, verify:=Verification.Passes) 1625CompileAndVerify(comp, emitOptions:=emitRefOnly, verify:=Verification.Passes) 1666Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes) 1685CompileAndVerify(comp, emitOptions:=emitMetadataOnly, verify:=Verification.Passes) 1705CompileAndVerify(comp, emitOptions:=emitRefOnly, verify:=Verification.Passes) 1733Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes) 1737CompileAndVerify(comp, emitOptions:=emitRefOnly, verify:=Verification.Passes) 3847CompileAndVerify(source2, references:={metadataRef}, options:=TestOptions.ReleaseModule, verify:=Verification.Fails) 4281CompileAndVerify(compilation, verify:=Verification.Fails)
Emit\DeterministicTests.vb (1)
227CompileAndVerify(forwardingCompilation, symbolValidator:=metadataValidator, sourceSymbolValidator:=metadataValidator, verify:=Verification.Skipped)
Emit\EditAndContinue\AssemblyReferencesTests.vb (2)
333Dim v0 = CompileAndVerify(compilation0, verify:=Verification.FailsILVerify) 452Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes)
Emit\EditAndContinue\EditAndContinueStateMachineTests.vb (8)
8856Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes) 8915Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes) 8970Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes) 9033Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes) 9085Dim v0 = CompileAndVerify(compilation0, verify:=Verification.FailsPEVerify) 9124Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes) 9163Dim v0 = CompileAndVerify(compilation0, verify:=Verification.FailsPEVerify) 9204Dim v0 = CompileAndVerify(compilation0, verify:=Verification.Passes)
Emit\EditAndContinue\EditAndContinueTest.vb (1)
29Optional verification As Verification? = Nothing)
Emit\EditAndContinue\EditAndContinueTests.vb (1)
6380Using test = New EditAndContinueTest(verification:=Verification.Skipped)
Emit\EmitMetadata.vb (2)
273dllImage = CompileAndVerify(c2, verify:=Verification.FailsILVerify).EmittedAssemblyData 311Dim manifestModule = CompileAndVerify(c1, verify:=Verification.FailsILVerify).EmittedAssemblyData
Emit\NoPiaEmbedTypes.vb (7)
1537Dim verifier = CompileAndVerify(compilation0, verify:=Verification.FailsPEVerify) 1607verifier = CompileAndVerify(compilation1, symbolValidator:=validator, verify:=Verification.FailsPEVerify) 1613verifier = CompileAndVerify(compilation1, symbolValidator:=validator, verify:=Verification.FailsPEVerify) 3885CompileAndVerify(compilation3, verify:=Verification.FailsPEVerify) 3890CompileAndVerify(compilation4, verify:=Verification.FailsPEVerify) 4306CompileAndVerify(compilation3, verify:=Verification.FailsPEVerify) 4312CompileAndVerify(compilation4, verify:=Verification.FailsPEVerify)
ExpressionTrees\CodeGenExprLambda.vb (2)
1880Optional verify As Verification = Nothing) As CompilationVerifier 1903Optional verify As Verification = Nothing)
PDB\PDBTests.vb (1)
752Dim v = CompileAndVerify(CreateCompilationWithMscorlib40AndVBRuntime(source, TestOptions.DebugExe), verify:=Verification.FailsILVerify)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (8)
Binding\SyncLockTests.vb (1)
546verify:=Verification.FailsPEVerify).VerifyDiagnostics()
Compilation\CompilationAPITests.vb (1)
903CompileAndVerify(assembly, verify:=Verification.FailsILVerify)
Compilation\ReferenceManagerTests.vb (1)
561CompileAndVerify(main, verify:=Verification.Fails, validator:=
Semantics\ConditionalAccessTests.vb (1)
1206Dim verifier = CompileAndVerify(compilation, verify:=Verification.FailsPEVerify, expectedOutput:=
Semantics\FieldInitializerBindingTests.vb (1)
1477verify:=Verification.Fails,
Semantics\IReadOnlyListAndCollection.vb (2)
136]]>, verify:=Verification.FailsILVerify) 352]]>, verify:=Verification.FailsILVerify)
Semantics\UseSiteErrorTests.vb (1)
669CompileAndVerify(compilation5, verify:=Verification.FailsILVerify)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (37)
SymbolsTests\DefaultInterfaceImplementationTests.vb (6)
33Private Shared ReadOnly Property VerifyFailsOnMonoOrCoreClr As Verification 35Return If(ExecutionConditionUtil.IsMonoOrCoreClr, Verification.Fails, Verification.Skipped) 39Private Shared ReadOnly Property VerifyPassesOnMonoOrCoreClr As Verification 41Return If(ExecutionConditionUtil.IsMonoOrCoreClr, Verification.Passes, Verification.Skipped)
SymbolsTests\Metadata\PE\TypeForwarders.vb (2)
1125CompileAndVerify(appCompilation, verify:=Verification.FailsPEVerify, 1303CompileAndVerify(appCompilation, verify:=Verification.FailsPEVerify,
SymbolsTests\Metadata\WinMdEventTest.vb (4)
224verify:=Verification.FailsILVerify) 770CompileAndVerify(compilation, verify:=Verification.FailsILVerify).VerifyIL("abcdef.goo", expectedIL.Value()) 852CompileAndVerify(compilation, verify:=If(OSVersion.IsWin8, Verification.Passes, Verification.Skipped)).VerifyIL("abcdef.goo", expectedIL.Value())
SymbolsTests\MethodImplementationFlagsTests.vb (2)
137CompileAndVerify(src, sourceSymbolValidator:=validator, symbolValidator:=validator, verify:=Verification.Skipped) 161CompileAndVerify(src, sourceSymbolValidator:=validator, symbolValidator:=validator, verify:=Verification.Skipped)
SymbolsTests\RefStructInterfacesTests.vb (3)
99verify:=If(ExecutionConditionUtil.IsMonoOrCoreClr, Verification.Passes, Verification.Skipped), 241CompileAndVerify(compilation1, symbolValidator:=validator, verify:=Verification.Skipped).VerifyDiagnostics()
SymbolsTests\Retargeting\NoPia.vb (1)
1637CompileAndVerify(consumer, verify:=Verification.FailsILVerify)
SymbolsTests\Retargeting\RetargetingTests.vb (8)
944Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify, 1305Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify, 1685Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify, 1882Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify, 2156Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify, 2345Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify, 2664Dim Main_Retarget = CompileAndVerify(sourceMain, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify) 3055Dim Main_Retarget = CompileAndVerify(source, references:={RetargetReference}, options:=TestOptions.ReleaseExe, verify:=Verification.FailsILVerify,
SymbolsTests\Source\ClsComplianceTests.vb (1)
1666CompileAndVerify(source, options:=TestOptions.ReleaseModule, sourceSymbolValidator:=validator(True, True), symbolValidator:=validator(False, True), verify:=Verification.Fails) ' PEVerify doesn't like netmodules
SymbolsTests\Source\TypeTests.vb (1)
3200CompileAndVerify(compilation, verify:=Verification.FailsPEVerify).VerifyDiagnostics()
SymbolsTests\SymbolErrorTests.vb (1)
24349verify:=Verification.FailsILVerify.WithILVerifyMessage("[Main]: Unable to resolve token. { Offset = 0x1, Token = 167772166 }"))
UsedAssembliesTests.vb (8)
30CompileAndVerify(comp1, verify:=Verification.FailsILVerify) 52CompileAndVerify(comp1, verify:=Verification.FailsILVerify) 97CompileAndVerify(comp2, verify:=Verification.Skipped).Diagnostics.AssertTheseDiagnostics(after, suppressInfos:=False) 104CompileAndVerify(comp3, verify:=Verification.Skipped).Diagnostics.AssertTheseDiagnostics(after, suppressInfos:=False) 151CompileAndVerify(comp, verify:=Verification.Skipped, expectedOutput:=expectedOutput).VerifyDiagnostics() 161CompileAndVerify(comp3, verify:=Verification.Skipped, expectedOutput:=expectedOutput).VerifyDiagnostics() 168CompileAndVerify(comp2, verify:=Verification.Skipped, expectedOutput:=expectedOutput).VerifyDiagnostics() 239CompileAndVerify(comp1, verify:=Verification.FailsILVerify)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (11)
BasicTestBase.vb (11)
42Optional verify As Verification = Nothing 76Optional verify As Verification = Nothing) As CompilationVerifier 106Optional verify As Verification = Nothing) As CompilationVerifier 139Optional verify As Verification = Nothing, 179Optional verify As Verification = Nothing 220Optional verify As Verification = Nothing 236verify:=If(OSVersion.IsWin8, verify, Verification.Skipped)) 253Optional verify As Verification = Nothing 283Optional verify As Verification = Nothing, 297verify:=If(OSVersion.IsWin8, verify, Verification.Skipped), 317Optional verify As Verification = Nothing,
Roslyn.Test.PdbUtilities (3)
EditAndContinue\EditAndContinueTest.cs (3)
22internal abstract partial class EditAndContinueTest<TSelf>(ITestOutputHelper? output = null, Verification? verification = null) : IDisposable 25private readonly Verification _verification = verification ?? Verification.Passes;