6636 references to CompileAndVerify
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
LocalizationInfraTests.cs (1)
48_ = CompileAndVerify(source, expectedOutput: expectedOutput);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3154)
BreakingChanges.cs (15)
338CompileAndVerify(source, expectedOutput: "1"); 381CompileAndVerify(source, expectedOutput: "0000"); 536CompileAndVerify(source, expectedOutput: "OV 9"); 564CompileAndVerify(source, expectedOutput: "2, 1 | T, U | x, y"); 679CompileAndVerify(source, expectedOutput: "2"); 713CompileAndVerify(source, expectedOutput: "Implicit"); 1011CompileAndVerify(text, expectedOutput: 1038CompileAndVerify(source, expectedOutput: 1134var verifier = CompileAndVerify(source, expectedOutput: " ++ EX 1"); 1251CompileAndVerify(source, expectedOutput: "1"); // Native print 0 1331CompileAndVerify(source, expectedOutput: "3"); 1383CompileAndVerify(@" 1444CompileAndVerify(@" 1509CompileAndVerify(source, expectedOutput: "Derived.Out"); 1725CompileAndVerify(source, expectedOutput: "Base.op_FalseBase.op_True");
CodeGen\CodeGenAsyncEHTests.cs (4)
29return base.CompileAndVerify(source, targetFramework: TargetFramework.Empty, expectedOutput: expectedOutput, references: references, options: options); 940var v = CompileAndVerify(source, s_asyncRefs, targetFramework: TargetFramework.Empty, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: expected, symbolValidator: module => 2413CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput, 2415CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput,
CodeGen\CodeGenAsyncIteratorTests.cs (17)
9449CompileAndVerify(src, expectedOutput: ExpectedOutput("42"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9476var verifier = CompileAndVerify(src, expectedOutput: ExpectedOutput("value value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9642CompileAndVerify(src, expectedOutput: ExpectedOutput("value value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9675CompileAndVerify(src, expectedOutput: ExpectedOutput("value exception True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9703CompileAndVerify(src, expectedOutput: ExpectedOutput("value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9747CompileAndVerify(src, expectedOutput: ExpectedOutput("value value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9786CompileAndVerify(src, expectedOutput: ExpectedOutput("value value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9832CompileAndVerify(src, expectedOutput: ExpectedOutput("value exception True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9865CompileAndVerify(src, expectedOutput: ExpectedOutput("value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 9915var verifier = CompileAndVerify(src, expectedOutput: ExpectedOutput("4242"), references: [libComp.EmitToImageReference()], 10140CompileAndVerify(src, expectedOutput: ExpectedOutput("exception True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 10171CompileAndVerify(src, expectedOutput: ExpectedOutput("value value True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 10212CompileAndVerify(src, expectedOutput: ExpectedOutput("value value outer True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 10254CompileAndVerify(src, expectedOutput: ExpectedOutput("False 0 False 1 True"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 10296var verifier = CompileAndVerify(src, expectedOutput: ExpectedOutput("False 0 False 1 True"), 10560CompileAndVerify(src, expectedOutput: ExpectedOutput("True one False null"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80).VerifyDiagnostics(); 10680var verifier = CompileAndVerify(
CodeGen\CodeGenAsyncLocalsTests.cs (6)
30return base.CompileAndVerify(source, targetFramework: TargetFramework.Empty, expectedOutput: expectedOutput, references: references, options: options, verify: verify); 236CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 249CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 288CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 306var vd = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1247CompileAndVerify(source, targetFramework: TargetFramework.Empty, references: s_asyncRefs, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
CodeGen\CodeGenAsyncSpillTests.cs (4)
25return base.CompileAndVerify(source, expectedOutput: expectedOutput, references: references, options: options); 945CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 960CompileAndVerify(source, verify: Verification.Passes, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 3278var verifier = CompileAndVerify(source, expectedOutput: "System.Int32",
CodeGen\CodeGenAsyncTests.cs (6)
917CompileAndVerify(source, options: TestOptions.UnsafeDebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: debugSymbolValidator, verify: Verification.Fails) 919CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: releaseSymbolValidator, verify: Verification.Fails) 976CompileAndVerify(source, options: TestOptions.UnsafeDebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: debugSymbolValidator, verify: Verification.Fails) 978CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "10", symbolValidator: releaseSymbolValidator, verify: Verification.Fails) 6093CompileAndVerify(src, expectedOutput: ExpectedOutput("value True"), targetFramework: TargetFramework.Net90, verify: Verification.Skipped).VerifyDiagnostics(); 6135var verifier = CompileAndVerify(src, expectedOutput: ExpectedOutput("4242"), references: [libComp.EmitToImageReference()],
CodeGen\CodeGenAwaitForeachTests.cs (6)
2324CompileAndVerify(source, expectedOutput: "2 4 -1 Done").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(); 2786CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 2787CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics();
CodeGen\CodeGenAwaitUsingTests.cs (10)
3207CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 3208CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13).VerifyDiagnostics(); 3209CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 3251CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, verify: Verification.FailsILVerify).VerifyDiagnostics(); 3252CompileAndVerify(source, expectedOutput: expectedOutput, verify: Verification.FailsILVerify).VerifyDiagnostics(); 3290CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13).VerifyDiagnostics(); 3291CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 3332CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 3333CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13).VerifyDiagnostics(); 3334CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics();
CodeGen\CodeGenCheckedTests.cs (46)
46var verifier = CompileAndVerify(source); 120var verifier = CompileAndVerify(source); 218var verifier = CompileAndVerify(source); 391var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 611var verifier = CompileAndVerify(source); 680var verifier = CompileAndVerify(source); 766var verifier = CompileAndVerify(source); 847var verifier = CompileAndVerify(source); 904var verifier = CompileAndVerify(source); 991var verifier = CompileAndVerify(source); 1045var verifier = CompileAndVerify(source); 1201var verifier = CompileAndVerify(source); 1297var verifier = CompileAndVerify(source); 1338var verifier = CompileAndVerify(@" 1367var verifier = CompileAndVerify(@" 1395var verifier = CompileAndVerify(@" 1420var verifier = CompileAndVerify(@" 1447var verifier = CompileAndVerify(@" 1473var verifier = CompileAndVerify(@" 1499var verifier = CompileAndVerify(@" 1526var verifier = CompileAndVerify(@" 1554var verifier = CompileAndVerify(@" 1582var verifier = CompileAndVerify(@" 1610var verifier = CompileAndVerify(@" 1639var verifier = CompileAndVerify(@" 1667var verifier = CompileAndVerify(@" 1695var verifier = CompileAndVerify(@" 1723var verifier = CompileAndVerify(@" 1751var verifier = CompileAndVerify(@" 1775var verifier = CompileAndVerify(@" 1798var verifier = CompileAndVerify(@" 1821var verifier = CompileAndVerify(@" 1846var verifier = CompileAndVerify(@" 1880CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @" 1889CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(false)).VerifyIL("C.ULong_UInt", @" 1912CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @" 1940CompileAndVerify(source, options: TestOptions.ReleaseDll.WithOverflowChecks(true)).VerifyIL("C.ULong_UInt", @" 1967CompileAndVerify(source); 2026var verifier = CompileAndVerify(source); 2073CompileAndVerify(source, expectedOutput: "0"); 2092CompileAndVerify( 2197CompileAndVerify( 2229CompileAndVerify( 2275CompileAndVerify( 2306CompileAndVerify( 2340var verifier = CompileAndVerify(source);
CodeGen\CodeGenClosureLambdaTests.cs (133)
22var verifier = CompileAndVerify(@" 46CompileAndVerify(@" 72CompileAndVerify(@" 113CompileAndVerify(comp); 131var compilation = CompileAndVerify(source, expectedOutput: @"12"); 188var compilation = CompileAndVerify(source, expectedOutput: @"12 236CompileAndVerify(source, expectedOutput: "1"); 256var compilation = CompileAndVerify(source, expectedOutput: @"12"); 283CompileAndVerify(source, expectedOutput: "12"); 313CompileAndVerify(source, expectedOutput: "12"); 343CompileAndVerify(source, expectedOutput: "12"); 373CompileAndVerify(source, expectedOutput: "12"); 407CompileAndVerify(source, expectedOutput: @" 437CompileAndVerify(source, expectedOutput: @" 468CompileAndVerify(source, expectedOutput: @" 495CompileAndVerify(source, expectedOutput: @"12"); 525CompileAndVerify(source, expectedOutput: @" 555CompileAndVerify(source, expectedOutput: @" 591CompileAndVerify(source, expectedOutput: @" 621CompileAndVerify(source, expectedOutput: @" 657CompileAndVerify(source, expectedOutput: @" 721CompileAndVerify(source, expectedOutput: @" 753CompileAndVerify(source, expectedOutput: "pass"); 777CompileAndVerify(source, expectedOutput: "xxxpass"); 801var verifier = CompileAndVerify(source, expectedOutput: "pass"); 866var verifier = CompileAndVerify(source, expectedOutput: "pass"); 946var verifier = CompileAndVerify(source, expectedOutput: "pass"); 968var verifier = CompileAndVerify(source, expectedOutput: "pass"); 1043var verifier = CompileAndVerify(source, expectedOutput: "pass"); 1115var verifier = CompileAndVerify(source, expectedOutput: "pass_xy"); 1219var verifier = CompileAndVerify(source, expectedOutput: "pass_xy"); 1249CompileAndVerify(source, expectedOutput: "A"); 1274CompileAndVerify(source, expectedOutput: "goo"); 1303CompileAndVerify(source, expectedOutput: "base"); 1338CompileAndVerify(source, expectedOutput: "base"); 1374CompileAndVerify(source, expectedOutput: "base"); 1406CompileAndVerify(source, expectedOutput: "base"); 1461CompileAndVerify(source, expectedOutput: $"this: D::F{Environment.NewLine}base: B1::F"); 1520CompileAndVerify(source, expectedOutput: $"this: D::F{Environment.NewLine}base: B1::F"); 1570CompileAndVerify(source, expectedOutput: "B1::F"). 1633CompileAndVerify(source, expectedOutput: "B1a::F"). 1694CompileAndVerify(source, expectedOutput: $"D::F{Environment.NewLine}B1::F"); 1747CompileAndVerify(source, expectedOutput: $"D::F{Environment.NewLine}B1::F"); 1802CompileAndVerify(source, expectedOutput: $"D::F{Environment.NewLine}B1::F"); 1851CompileAndVerify(source, expectedOutput: "B1::F.Get;F::F.Set;D::F.Get;B1::F.Set;"); 1897CompileAndVerify(source, expectedOutput: "D::F;B1::F;"); 1945CompileAndVerify(source, expectedOutput: "B1::F;D::F;"); 1992CompileAndVerify(source, expectedOutput: "B1::F;D::F;"); 2042CompileAndVerify(source, expectedOutput: "B1::F;D::F;"); 2100CompileAndVerify(source, expectedOutput: "D::F2;B1::F1;D::F2;B1::F2;"); 2157CompileAndVerify(source, expectedOutput: "B1::F;D::F;"); 2198CompileAndVerify(source, 2256CompileAndVerify(source, 2348CompileAndVerify(source, 2396CompileAndVerify(source, 2436CompileAndVerify(source, 2483CompileAndVerify(source, 2526CompileAndVerify(source, 2569CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F", verify: Verification.Passes); 2588CompileAndVerify(source, expectedOutput: "123"); 2609CompileAndVerify(source, expectedOutput: "123"); 2632CompileAndVerify(source, expectedOutput: "123"); 2657CompileAndVerify(source, expectedOutput: "123"); 2677CompileAndVerify(source, expectedOutput: "123"); 2701CompileAndVerify(source, expectedOutput: "123"); 2722CompileAndVerify(source, expectedOutput: "4123"); 2747CompileAndVerify(source, expectedOutput: "4123"); 2777CompileAndVerify(source, expectedOutput: @" 2810CompileAndVerify(source, expectedOutput: @" 2840CompileAndVerify(source, expectedOutput: expectedOutput); 2867CompileAndVerify(source, expectedOutput: expectedOutput); 2892CompileAndVerify(source, expectedOutput: "123123"); 2917CompileAndVerify(source, expectedOutput: "123123"); 2943CompileAndVerify(source, expectedOutput: "41234123"); 2969CompileAndVerify(source, expectedOutput: "41234123"); 2995CompileAndVerify(source, expectedOutput: "000hhh"); 3025CompileAndVerify(source, expectedOutput: "000hhh"); 3059CompileAndVerify(source, expectedOutput: "000hhh"); 3093CompileAndVerify(source, expectedOutput: "000hhh"); 3127CompileAndVerify(source, expectedOutput: "12he"); 3146CompileAndVerify(source, expectedOutput: "15he"); 3169CompileAndVerify(source, expectedOutput: "15he"); 3194CompileAndVerify(source, expectedOutput: "01234"); 3230CompileAndVerify(source, expectedOutput: "7"); 3248var verifier = CompileAndVerify(source, expectedOutput: "42", 3290CompileAndVerify(source, expectedOutput: "Hi42"); 3312CompileAndVerify(source, expectedOutput: "12"); 3338CompileAndVerify(source, expectedOutput: "12"); 3458CompileAndVerify(source, expectedOutput: ""); 3496CompileAndVerify(source, expectedOutput: "13"). 3553CompileAndVerify(source, expectedOutput: "10"). 3651CompileAndVerify(source, expectedOutput: "6"). 3754CompileAndVerify(source, expectedOutput: "True"). 3841CompileAndVerify(source, expectedOutput: "6"). 3901CompileAndVerify(source); 3920CompileAndVerify(source); 3939CompileAndVerify(source); 3970CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: m => 4041CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: m => 4082CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: m => 4119CompileAndVerify(source, expectedOutput: @"3"); 4164CompileAndVerify( 4254CompileAndVerify(source, expectedOutput: "7"); 4283CompileAndVerify(source, 4335CompileAndVerify(source, expectedOutput: "111"); 4372CompileAndVerify(source, expectedOutput: "PASS"); 4409var verifier = CompileAndVerify( 4432var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"True 4454var compilation = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"True 4480var verifier = CompileAndVerify( 4504CompileAndVerify(source, expectedSignatures: new[] 4538var verifier = CompileAndVerify( 4564CompileAndVerify(source, expectedOutput: "(1,-1)").VerifyIL("Test..cctor", @" 4613var verifier = CompileAndVerify( 4640var verifier = CompileAndVerify( 4682var compilation = CompileAndVerify(source, expectedOutput: "0"); 5065var compilation = CompileAndVerify(source, expectedOutput: "success"); 5092CompileAndVerify(source); 5122var compilation = CompileAndVerify(source); 5153var compilation = CompileAndVerify(source); 5237CompileAndVerify(source); 5259CompileAndVerify(source); 5279CompileAndVerify(source); 5312CompileAndVerify(source); 5331CompileAndVerify(source); 5358var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5450CompileAndVerify(source, expectedOutput: @"0-System.String;0-System.Collections.Generic.List`1[System.String];0-System.String[];"); 5500CompileAndVerify(source, expectedOutput: @"0-System.String;0-System.Collections.Generic.List`1[System.String];0-System.String[];"); 5550CompileAndVerify(source, expectedOutput: @"0-System.String;0-System.Collections.Generic.List`1[System.String];0-System.String[];"); 5584var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;"); 5642var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;"); 5724var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;"); 5781var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;");
CodeGen\CodeGenConditionalOperatorTests.cs (71)
41var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 64verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithDebugPlusMode(true), expectedOutput: expectedOutput); 90verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput); 171var verifier = CompileAndVerify(source, 373var verifier = CompileAndVerify(source, 456var verifier = CompileAndVerify(source, 624var verify = CompileAndVerify(src, 661verify = CompileAndVerify(src, 748var verify = CompileAndVerify(src, 798verify = CompileAndVerify(src, 874var verify = CompileAndVerify(src, 924verify = CompileAndVerify(src, 1003var verify = CompileAndVerify(src, 1066verify = CompileAndVerify(src, 1152var verify = CompileAndVerify(src, 1183verify = CompileAndVerify(src, 1236var verify = CompileAndVerify(src, 1269verify = CompileAndVerify(src, 1326var verify = CompileAndVerify(src, 1365verify = CompileAndVerify(src, 1432var verify = CompileAndVerify(src, 1472verify = CompileAndVerify(src, 1519var comp = CompileAndVerify(source, expectedOutput: "1"); 1548var comp = CompileAndVerify(source, expectedOutput: @" 1581var comp = CompileAndVerify(source); 1621var comp = CompileAndVerify(source); 1687var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular10); 1733var comp = CompileAndVerify(source, expectedOutput: "00"); 1782var comp = CompileAndVerify(source, expectedOutput: @" 1842var comp = CompileAndVerify(source); 1888var comp = CompileAndVerify(source); 1930var comp = CompileAndVerify(source); 2008var comp = CompileAndVerify(source); 2053CompileAndVerify(source, expectedOutput: expectedOutput); 2089CompileAndVerify(source, expectedOutput: expectedOutput); 2122CompileAndVerify(source, expectedOutput: expectedOutput); 2142CompileAndVerify(source, expectedOutput: expectedOutput); 2173CompileAndVerify(source, expectedOutput: expectedOutput); 2196CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL); 2228CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL).VerifyDiagnostics(); 2276CompileAndVerify(source).VerifyIL("Program.Main", expectedIL); 2301CompileAndVerify(source, expectedOutput: expectedOutput). 2325CompileAndVerify(source).VerifyIL("Program.Main", expectedIL); 2352CompileAndVerify(source).VerifyIL("Program.Main", expectedIL); 2383CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL); 2428CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL); 2446CompileAndVerify(source, expectedOutput: expectedOutput); 2478CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL); 2523CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL); 2567CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.fun", expectedIL); 2620CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL); 2694CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Program.Main", expectedIL); 2747CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Class1.Main", expectedIL); 2777var verify = CompileAndVerify(src, 2808verify = CompileAndVerify(src, 2879CompileAndVerify(source, expectedOutput: expectedOutput).VerifyIL("Class1.Main", expectedIL); 2906CompileAndVerify(source); 2933CompileAndVerify(source); 2981CompileAndVerify(source, expectedOutput: expectedOutput); 3015CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 3052CompileAndVerify(source, expectedOutput: expectedOutput); 3058var comp = CompileAndVerify(@" 3289var verify = CompileAndVerify(source, expectedOutput: expectedOutput); 3386var verify = CompileAndVerify(source, expectedOutput: @"0 3465var verify = CompileAndVerify(source, expectedOutput: @"0 3540var verify = CompileAndVerify(source, expectedOutput: @"0 3613var verify = CompileAndVerify(source, expectedOutput: @"0 3680var verifier = CompileAndVerify(source, expectedOutput: @"abc 3742var verifier = CompileAndVerify(source, expectedOutput: @"abc 3800var verifier = CompileAndVerify(source, expectedOutput: "11True").VerifyDiagnostics(); 3861var verifier = CompileAndVerify(source, expectedOutput: "11True").VerifyDiagnostics();
CodeGen\CodeGenConstructorInitTests.cs (42)
33CompileAndVerify(source, expectedOutput: string.Empty). 61CompileAndVerify(source, expectedOutput: string.Empty). 89CompileAndVerify(source, expectedOutput: string.Empty). 121CompileAndVerify(source, expectedOutput: string.Empty). 161CompileAndVerify(source, expectedOutput: string.Empty). 198CompileAndVerify(source, expectedOutput: string.Empty). 270CompileAndVerify(source, expectedOutput: @" 307CompileAndVerify(text, expectedOutput: expectedOutput); 330CompileAndVerify(source, expectedOutput: "42"). 367CompileAndVerify(source, expectedOutput: "42"). 408CompileAndVerify(source, expectedOutput: "42"). 455CompileAndVerify(source, expectedOutput: "42"). 490CompileAndVerify(source, expectedOutput: @"123 522CompileAndVerify(source, expectedOutput: @"123 572CompileAndVerify(source, expectedOutput: "3"). 629CompileAndVerify(source1).VerifyIL("C..cctor", expectedIL); 630CompileAndVerify(source2).VerifyIL("C..cctor", expectedIL); 665CompileAndVerify(source1).VerifyIL("C..cctor", expectedIL); 666CompileAndVerify(source2).VerifyIL("C..cctor", expectedIL); 692CompileAndVerify(source1, symbolValidator: validator, options: options); 693CompileAndVerify(source2, symbolValidator: validator, options: options); 715CompileAndVerify(source). 754CompileAndVerify( 776CompileAndVerify( 798CompileAndVerify(source).VerifyIL("C..cctor()", @"{ 825CompileAndVerify(source).VerifyIL("C..cctor()", @" 843CompileAndVerify( 877CompileAndVerify(source).VerifyIL("C..cctor()", @" 895CompileAndVerify(source).VerifyIL("C..cctor()", @" 922CompileAndVerify( 953CompileAndVerify(source).VerifyIL("C..cctor()", @" 980CompileAndVerify(source).VerifyIL("C..cctor()", @" 1004CompileAndVerify(source).VerifyIL("C..cctor()", @" 1034CompileAndVerify(source).VerifyIL("C..cctor()", @" 1064CompileAndVerify(source).VerifyIL("C..cctor()", @" 1094CompileAndVerify(source).VerifyIL("C..cctor()", @" 1129CompileAndVerify(source).VerifyIL("C..cctor()", @" 1151CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, verify: Verification.Skipped).VerifyIL("C..cctor()", @" 1210CompileAndVerify(source1, parseOptions: parseOptions).VerifyTypeIL("C", expectedIL); 1211CompileAndVerify(source2, parseOptions: parseOptions).VerifyTypeIL("C", expectedIL); 1228CompileAndVerify(source).VerifyIL("C..cctor()", @" 1251CompileAndVerify(source).VerifyIL("C..cctor()", @"
CodeGen\CodeGenConversionTests.cs (26)
81var compilationVerifier = CompileAndVerify(source, expectedOutput: @""); 116var compilationVerifier = CompileAndVerify(source, expectedOutput: @"Goo<T>(J<T> x) 150CompileAndVerify(csSource, expectedOutput: "hello"); 174var compilation = CompileAndVerify(text); 281var verifier1 = CompileAndVerify(source1 + source2, expectedOutput: expectedOutput); 379var verifier1 = CompileAndVerify(source1 + source2, expectedOutput: expectedOutput); 404var compilation = CompileAndVerify(text); 450var compilation = CompileAndVerify(text); 498var compilation = CompileAndVerify(text); 542var compilation = CompileAndVerify(text, expectedOutput: "Value is: 1"); 601var compilation = CompileAndVerify(text, expectedOutput: "Value is: 1"); 649var compilation = CompileAndVerify(text, expectedOutput: "Value is: 1"); 711var compilation = CompileAndVerify(source, expectedOutput: "TrueTrue"); 777var compilation = CompileAndVerify(source); 815CompileAndVerify(source, expectedOutput: 842CompileAndVerify(source, expectedOutput: 869var compilation = CompileAndVerify(source); 904var compilation = CompileAndVerify(source); 939var compilation = CompileAndVerify(source); 975var compilation = CompileAndVerify(source); 1012var compilation = CompileAndVerify(source); 1098CompileAndVerify(source, expectedOutput: expectedOutput); 1118var comp = CompileAndVerify(source); 1159var comp = CompileAndVerify(source); 1197CompileAndVerify(source).VerifyDiagnostics(); 1213CompileAndVerify(source).VerifyDiagnostics();
CodeGen\CodeGenDeconstructTests.cs (128)
196var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 250var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 390var comp = CompileAndVerify(source, expectedOutput: expected); 436var comp = CompileAndVerify(source, expectedOutput: expected); 481var comp = CompileAndVerify(source, expectedOutput: expected); 527var comp = CompileAndVerify(source, expectedOutput: expected); 587var comp = CompileAndVerify(source, expectedOutput: expected); 648var comp = CompileAndVerify(source, expectedOutput: expected); 681var comp = CompileAndVerify(source, expectedOutput: "1 hello world"); 709var comp = CompileAndVerify(source, expectedOutput: "1 hello", references: new[] { CSharpRef }); 748var comp = CompileAndVerify(source, expectedOutput: "initial modified 1 hello", references: new[] { CSharpRef }); 781var comp = CompileAndVerify(source, expectedOutput: "2 hello"); 836var comp = CompileAndVerify(source, expectedOutput: "1 hello", references: new[] { CSharpRef }); 868var comp = CompileAndVerify(source, expectedOutput: "1 hello world"); 899var comp = CompileAndVerify(source, expectedOutput: "2 3"); 939var comp = CompileAndVerify(source, expectedOutput: expected); 981var comp = CompileAndVerify(source, expectedOutput: expected); 1029var comp = CompileAndVerify(source, expectedOutput: expected); 1085var comp = CompileAndVerify(source, expectedOutput: expected); 1106var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 1156var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 1177var comp = CompileAndVerify(source, expectedOutput: "4 2"); 1215var comp = CompileAndVerify(source, expectedOutput: "9 10"); 1267var comp = CompileAndVerify(source, expectedOutput: "4 2"); 1288var comp = CompileAndVerify(source, expectedOutput: "hello"); 1324var comp = CompileAndVerify(source); 1372var comp = CompileAndVerify(source, sourceSymbolValidator: validator); 1429var comp = CompileAndVerify(source, 1684var comp = CompileAndVerify(source, 1896var comp = CompileAndVerify(source, expectedOutput: "(1, 2)"); 1931var comp = CompileAndVerify(source, expectedOutput: expected); 1959var comp = CompileAndVerify(source, expectedOutput: expected); 2026var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2084var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2175var comp = CompileAndVerify(source, expectedOutput: "4 2"); 2210var comp = CompileAndVerify(source, expectedOutput: "(1, 1) 2"); 2234var comp = CompileAndVerify(source, expectedOutput: "(1, 1) 2", parseOptions: TestOptions.Regular.WithRefsFeature()); 2260var comp = CompileAndVerify(source, expectedOutput: "1 2", parseOptions: TestOptions.Regular.WithRefsFeature()); 2282var comp = CompileAndVerify(source, expectedOutput: "1 hello world", parseOptions: TestOptions.Regular.WithRefsFeature()); 2374var comp = CompileAndVerify(source, expectedOutput: "override", parseOptions: TestOptions.Regular.WithRefsFeature()); 2402var comp = CompileAndVerify(source, expectedOutput: expected, parseOptions: TestOptions.Regular.WithRefsFeature()); 2432var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 2495var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 2560var comp = CompileAndVerify(source, expectedOutput: "Deconstructed"); 2592var comp = CompileAndVerify(source, expectedOutput: "Deconstructed"); 2661var comp = CompileAndVerify(source, expectedOutput: "2 hello"); 2694var comp = CompileAndVerify(source, expectedOutput: "1 a b", sourceSymbolValidator: validator); 2713var comp = CompileAndVerify(source, expectedOutput: "nothing"); 2749var comp = CompileAndVerify(source, expectedOutput: "1 a b"); 2776var comp = CompileAndVerify(source, expectedOutput: "1 2 3"); 2804var comp = CompileAndVerify(source, expectedOutput: "1 a b"); 2863var comp = CompileAndVerify(source, expectedOutput: expected); 2923var comp = CompileAndVerify(source, expectedOutput: expected); 2971var comp = CompileAndVerify(source, expectedOutput: expected); 3000var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 3034var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 3068var comp = CompileAndVerify(source, expectedOutput: "2 hello"); 3087var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 3153var comp = CompileAndVerify(source, expectedOutput: "1 2 hello", sourceSymbolValidator: validator); 3215var comp = CompileAndVerify(source, expectedOutput: "1 2 3 hello 5", 3254var comp = CompileAndVerify(source, expectedOutput: "1 2 3", 3305var comp = CompileAndVerify(source, expectedOutput: "1 2 hello", sourceSymbolValidator: validator); 3342var comp = CompileAndVerify(source, sourceSymbolValidator: validator, 3381var comp = CompileAndVerify(source, expectedOutput: "1 2 hello", sourceSymbolValidator: validator); 3401var comp = CompileAndVerify(source, expectedOutput: "var"); 3418var comp = CompileAndVerify(source, expectedOutput: " 1 2"); 3454var comp = CompileAndVerify(source, expectedOutput: " 2 3", sourceSymbolValidator: validator); 3496var comp = CompileAndVerify(source, expectedOutput: " (1, 2)", sourceSymbolValidator: validator); 3514var comp = CompileAndVerify(source, expectedOutput: " 2 3 4"); 3557var comp = CompileAndVerify(source, expectedOutput: expected, parseOptions: TestOptions.Regular, 3709var comp = CompileAndVerify(source, expectedOutput: "var 2", sourceSymbolValidator: validator); 3762var comp = CompileAndVerify(source, expectedOutput: "1 2 3 4", sourceSymbolValidator: validator); 3815var comp = CompileAndVerify(source, expectedOutput: "var 2", sourceSymbolValidator: validator); 3856var comp = CompileAndVerify(source, expectedOutput: "1 2", sourceSymbolValidator: validator); 3897var comp = CompileAndVerify(source, expectedOutput: @"1 3951var comp = CompileAndVerify(source, expectedOutput: "1 var", sourceSymbolValidator: validator); 3997var comp = CompileAndVerify(source, expectedOutput: "1 2", sourceSymbolValidator: validator); 4060var comp = CompileAndVerify(source, expectedOutput: "1 2", sourceSymbolValidator: validator); 4063var comp7_1 = CompileAndVerify(source, expectedOutput: "1 2", 4149var comp = CompileAndVerify(source, expectedOutput: "1 2 - 3 4 -", sourceSymbolValidator: validator); 4232var comp = CompileAndVerify(source, expectedOutput: "1 2 - 3 4 - 5 6 - 7 8 -", sourceSymbolValidator: validator); 4343var comp = CompileAndVerify(source, expectedOutput: "1 1 - 2 2 - 3 3 - ", sourceSymbolValidator: validator); 4464var comp = CompileAndVerify(source, expectedOutput: "1 2 3 4 5 - 6 7 8 9 10 -", sourceSymbolValidator: validator); 4485var comp = CompileAndVerify(source, expectedOutput: "1 2 3 4 5 - 6 7 8 9 10 -"); 4506var comp = CompileAndVerify(source, expectedOutput: "1 2 3 4 5 - 6 7 8 9 10 -"); 4535var comp = CompileAndVerify(source, expectedOutput: "1 1 1 - 2 2 2 - "); 4562var comp = CompileAndVerify(source, expectedOutput: "42 hello"); 4618var comp = CompileAndVerify(source, expectedOutput: expected, sourceSymbolValidator: validator); 4702var comp = CompileAndVerify(source, expectedOutput: expected); 4731var comp = CompileAndVerify(source, expectedOutput: expected); 4749var comp = CompileAndVerify(source, expectedOutput: "1 2 - 3 4 -"); 4774var comp = CompileAndVerify(source, expectedOutput: "0 10 "); 4797var comp = CompileAndVerify(source, expectedOutput: "hello world", references: new[] { CSharpRef }); 4820var comp = CompileAndVerify(source, expectedOutput: "3 4", references: new[] { CSharpRef }); 4849var comp = CompileAndVerify(source, expectedOutput: "hello world", references: new[] { CSharpRef }); 4872var comp = CompileAndVerify(source, expectedOutput: "hello world", references: new[] { CSharpRef }); 4901var comp = CompileAndVerify(source, expectedOutput: "hello world", references: new[] { CSharpRef }); 4925var comp = CompileAndVerify(source, expectedOutput: "3 4", references: new[] { CSharpRef }); 4947var comp = CompileAndVerify(source, expectedOutput: "1 2 3"); 6449var comp = CompileAndVerify(source, expectedOutput: @"2", sourceSymbolValidator: validator); 6527var comp = CompileAndVerify(source, expectedOutput: "ctor"); 7618var comp = CompileAndVerify(source, expectedOutput: "5 (Goo, 34983490)"); 7640var comp = CompileAndVerify(source, expectedOutput: "42", verify: Verification.Passes); 7783var comp = CompileAndVerify(source, expectedOutput: 7817var comp = CompileAndVerify(source, expectedOutput: 7862var comp2 = CompileAndVerify(source2, targetFramework: TargetFramework.Empty, expectedOutput: 7921var comp2 = CompileAndVerify(source2, targetFramework: TargetFramework.Empty, expectedOutput: 8007var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 8059var comp = CompileAndVerify(source, expectedOutput: "1 hello"); 8109var comp = CompileAndVerify(source, expectedOutput: "1 hello 2"); 8162var comp = CompileAndVerify(source, expectedOutput: "1 2"); 8522CompileAndVerify(source, expectedOutput: expectedOutput); 8538CompileAndVerify(source, expectedOutput: @"1 2"); 8559CompileAndVerify(source, expectedOutput: @"Convert Convert2 1"); 8583var compilation = CompileAndVerify(source, expectedOutput: @"C Convert D Convert2 A B").Compilation; 8627var compilation = CompileAndVerify(source, expectedOutput: @"1").Compilation; 8692CompileAndVerify(source, expectedOutput: @"3 4"); 9096var comp = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "102030405060"); 9154var comp = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "102030405060"); 9212var comp = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "102030405060"); 9298var comp = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expected); 9389var comp = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 9406var comp = CompileAndVerify(source); 9525var comp = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: @"1 hello 9653var comp = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: @"1 hello True 9817var comp = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: @"1 hello 9902var comp = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: @"1 hello 10067var comp = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: @"1 hello True
CodeGen\CodeGenDisplayClassOptimisationTests.cs (51)
45var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3", options: TestOptions.ReleaseExe); 129var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3", options: TestOptions.DebugExe); 260var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"three 435var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 587var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 733var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"three 952var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"one 1132var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"one 1367var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 1733var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "one"); 1842var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "one"); 1994var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "one"); 2159var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"Program+Disposable 2313var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"Program+Disposable 2516var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"Program+Disposable 2849var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"one 3052var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"two 3255var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"one"); 3451var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"one"); 3588var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"one"); 3732var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"three 3943var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4033var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @""); 4121var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4225var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4328var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4424var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4524var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4617var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4735var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4852var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 4971var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5091var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5221var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5338var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5467var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5567var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5664var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1"); 5798var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"4"); 5941var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"2"); 6094var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3"); 6229var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3"); 6361var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1 6553var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"1 6751var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3 6919var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3 7087var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: @"3 7265var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 7401var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 7603var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 8055var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute());
CodeGen\CodeGenDynamicTests.cs (6)
15857var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "321 123", references: new[] { CSharpRef }); 15879CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "True", references: new[] { CSharpRef }), 15982CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "True", references: new[] { CSharpRef }), 16108CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "True", references: new[] { CSharpRef }), 16219CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "True", references: new[] { CSharpRef }), 16336CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "True", references: new[] { CSharpRef }),
CodeGen\CodeGenExplicitImplementationTests.cs (8)
63CompileAndVerify(source, expectedOutput: @" 435var comp = CompileAndVerify(source, 589var comp = CompileAndVerify(source, 670var comp = CompileAndVerify(source, 748var comp = CompileAndVerify(source, expectedOutput: @" 813var comp = CompileAndVerify(source, expectedOutput: @" 906CompileAndVerify(source, expectedOutput: @" 960var comp = CompileAndVerify(source, expectedSignatures: new[]
CodeGen\CodeGenExprLambdaTests.cs (3)
26Verification verify = default) => CompileAndVerify(source, references, targetFramework: TargetFramework.Standard, expectedOutput: expectedOutput, options: options, parseOptions: parseOptions, verify: verify); 36var verifier = CompileAndVerify(new[] { ExpressionTestLibrary, @" 61var verifier = CompileAndVerify(@"
CodeGen\CodeGenFieldInitTests.cs (9)
69CompileAndVerify(source, expectedOutput: @" 139CompileAndVerify(source, expectedOutput: @" 187CompileAndVerify(source, expectedOutput: @" 236CompileAndVerify(source, expectedOutput: @" 288CompileAndVerify(source, expectedOutput: @" 340CompileAndVerify(source, expectedOutput: @" 408CompileAndVerify(source, expectedOutput: @" 566CompileAndVerify( 639CompileAndVerify(source, expectedOutput: @"
CodeGen\CodeGenForEachTests.cs (86)
39var compilation = CompileAndVerify(source, expectedOutput: @" 107var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @" 216var compilation = CompileAndVerify(source, expectedOutput: @" 381var compilation = CompileAndVerify(source, expectedOutput: @" 442var compilation = CompileAndVerify(source, expectedOutput: @" 510var compilation = CompileAndVerify(source, expectedOutput: @" 577var compilation = CompileAndVerify(source, expectedOutput: @" 640var compilation = CompileAndVerify(source, expectedOutput: @" 702var compilation = CompileAndVerify(source, expectedOutput: @" 844var compilation = CompileAndVerify(source, expectedOutput: @" 889var compilation = CompileAndVerify(source, expectedOutput: @" 954var compilation = CompileAndVerify(source, expectedOutput: @" 1018var compilation = CompileAndVerify(source, expectedOutput: @" 1088var compilation = CompileAndVerify(source, expectedOutput: @" 1149var compilation = CompileAndVerify(source, expectedOutput: @" 1219var compilation = CompileAndVerify(source, expectedOutput: @" 1281var compilation = CompileAndVerify(source, expectedOutput: @" 1357var compilation = CompileAndVerify(source, 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"); 1683var compilation = CompileAndVerify(source, expectedOutput: @" 1716var compilation = CompileAndVerify(source, expectedOutput: @" 1793var compilation = CompileAndVerify(source, expectedOutput: @" 1899var compilation = CompileAndVerify(source, expectedOutput: @" 1943var compilation = CompileAndVerify(source, expectedOutput: @" 1985var compilation = CompileAndVerify(source, expectedOutput: "1"); 2011var compilation = CompileAndVerify(source, expectedOutput: "1"); 2035var compilation = CompileAndVerify(source, expectedOutput: @" 2108var compilation = CompileAndVerify(source, expectedOutput: @" 2173var compilation = CompileAndVerify(source, expectedOutput: @" 2243CompileAndVerify(source).VerifyIL("C<T>.M", @" 2300CompileAndVerify(source).VerifyIL("C<T>.M", @" 2360var compilation = CompileAndVerify(source); 2511CompileAndVerify(source, parseOptions: TestOptions.Regular9) 2573CompileAndVerify(source, parseOptions: TestOptions.Regular9) 2695CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 2722CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 2749CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 2776CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 2987CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3019CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3047CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "System.Char"); 3106CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3134CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3161CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3189CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3216CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3243CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3270CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3359CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3387CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: @"1.1 3557CompileAndVerify(source, parseOptions: TestOptions.Regular9, 3645CompileAndVerify(source, parseOptions: TestOptions.Regular9, 3834CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 3949CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4021CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4088CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "23"); 4116CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4278CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4306CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4355var verifier = CompileAndVerify(source, expectedOutput: "9123"); 4407var verifier = CompileAndVerify(source, expectedOutput: "1235", verify: Verification.FailsILVerify); 4478CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4505CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4611CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4641CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4671CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 4702CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: @"123Disposed") 4761CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: @"123Disposed") 4820CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: @"123") 4869CompileAndVerify(source, parseOptions: TestOptions.Regular9, verify: Verification.FailsILVerify, expectedOutput: @"123Disposed") 4927CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123") 4968CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 5046CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 5092CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 5229CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 5262CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123"); 5328CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "123123"); 5366CompileAndVerify(source, targetFramework: TargetFramework.Net70, 5406CompileAndVerify(source, targetFramework: TargetFramework.Net70, 5452CompileAndVerify(source, targetFramework: TargetFramework.Net70, 5533CompileAndVerify(source, targetFramework: TargetFramework.Net70,
CodeGen\CodeGenFunctionPointersTests.cs (9)
11673var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "True" : null, options: TestOptions.UnsafeDebugExe, symbolValidator: static module => 11736var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "True" : null, options: TestOptions.UnsafeDebugExe, symbolValidator: static module => 11799var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "True" : null, options: TestOptions.UnsafeDebugExe, symbolValidator: static module => 11858var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, expectedOutput: "True", symbolValidator: static module => 11890var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, 12133var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "True" : null, options: TestOptions.UnsafeDebugExe, symbolValidator: static module => 12276var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "True" : null, options: TestOptions.UnsafeDebugExe, symbolValidator: static module => 12315var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "True" : null, options: TestOptions.UnsafeDebugExe, symbolValidator: static module => 12359var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.UnsafeDebugExe, symbolValidator: module =>
CodeGen\CodeGenImplicitImplementationTests.cs (32)
63CompileAndVerify(source, expectedOutput: @" 112CompileAndVerify(source, expectedOutput: @" 149CompileAndVerify(source, expectedOutput: @" 191CompileAndVerify(source, expectedOutput: @" 247CompileAndVerify(source, expectedOutput: @" 305CompileAndVerify(source, expectedOutput: @" 350CompileAndVerify(source, expectedOutput: @" 400CompileAndVerify(source, expectedOutput: @" 689CompileAndVerify(source, expectedOutput: "Y.goo"); 748CompileAndVerify(source, expectedOutput: expectedOutput); 781CompileAndVerify(source, sourceSymbolValidator: validator, symbolValidator: validator, expectedSignatures: new[] 870CompileAndVerify(source, expectedOutput: "ILeft IBase ILeft IBase") 959var comp = CompileAndVerify(source, 1005CompileAndVerify(source, expectedOutput: "C3C3C3C3"); 1037CompileAndVerify(source, expectedOutput: "C3"); 1214var comp = CompileAndVerify(source, expectedOutput: @" 1358var comp = CompileAndVerify(source, expectedOutput: @" 1431var comp = CompileAndVerify(source, 1491var comp = CompileAndVerify(source, 1551var comp = CompileAndVerify(source, expectedOutput: @" 1613var comp = CompileAndVerify(source, expectedOutput: @" 1678var comp = CompileAndVerify(source, expectedOutput: @" 1743var comp = CompileAndVerify(source, expectedOutput: @" 1811var comp = CompileAndVerify(source, expectedOutput: @" 1857var comp = CompileAndVerify(text, 1941CompileAndVerify(source, expectedOutput: @" 2054var comp = CompileAndVerify(source, expectedOutput: @" 2114CompileAndVerify(source, expectedOutput: "Base.ToString").VerifyDiagnostics(); // No errors 2151CompileAndVerify(source, expectedOutput: @" 2194CompileAndVerify(source, expectedOutput: @" 2238CompileAndVerify(source, expectedOutput: @" 2281CompileAndVerify(source, expectedOutput: @"
CodeGen\CodeGenImplicitlyTypeArraysTests.cs (22)
42CompileAndVerify( 69CompileAndVerify( 96CompileAndVerify( 193CompileAndVerify( 224CompileAndVerify( 254var compilation = CompileAndVerify( 285CompileAndVerify(testSrc, new MetadataReference[] { mscorlib17626 }, expectedOutput: "1", targetFramework: TargetFramework.Empty); 329CompileAndVerify( 356CompileAndVerify( 399CompileAndVerify( 435var compilation = CompileAndVerify( 585CompileAndVerify( 618CompileAndVerify( 645CompileAndVerify( 672CompileAndVerify( 713CompileAndVerify( 749CompileAndVerify( 782CompileAndVerify(testSrc, expectedOutput: "1"); 812CompileAndVerify(testSrc, expectedOutput: "1"); 840CompileAndVerify( 873CompileAndVerify( 912CompileAndVerify(
CodeGen\CodeGenIncrementTests.cs (11)
136CompileAndVerify(source, expectedOutput: expectedOutput); 214CompileAndVerify(source, expectedOutput: expectedOutput); 283CompileAndVerify(source, expectedOutput: expectedOutput); 443var compilation = CompileAndVerify(source); 850base.CompileAndVerify(source). 887base.CompileAndVerify(source). 935CompileAndVerify(source, expectedOutput: "1"); 956CompileAndVerify(source, expectedOutput: "11"); 989CompileAndVerify(source, expectedOutput: @" 1013CompileAndVerify(source, expectedOutput: expectedOutput); 1039base.CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: "12").
CodeGen\CodeGenInParametersTests.cs (62)
21var comp = CompileAndVerify(@" 83var comp = CompileAndVerify(@" 147var comp = CompileAndVerify(@" 180var comp = CompileAndVerify(@" 215var comp = CompileAndVerify(@" 254var comp = CompileAndVerify(@" 291var comp = CompileAndVerify(@" 334var comp = CompileAndVerify(@" 367var comp = CompileAndVerify(@" 397var comp = CompileAndVerify(@" 449var comp = CompileAndVerify(@" 502var verifier = CompileAndVerify(@" 561var verifier = CompileAndVerify(@" 643var comp = CompileAndVerify(@" 691var comp = CompileAndVerify(@" 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 918var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 939comp = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "42", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 978var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 999comp = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "42", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 1039var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 1090var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"hi 1127var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1334var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1377var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1447var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"42"); 1480var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"42"); 1617var verifier = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "6"); 2575var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"0"); 2633var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @""); 2653CompileAndVerify(@" 2725var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"4242420"); 2797CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "9"); 2798CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "9"); 2828CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "9"); 2829CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "9"); 2859CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "9"); 2860CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "9"); 2889CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "False"); 2890CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "False"); 2919CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "3"); 2920CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "3"); 2942CompileAndVerify(code, expectedOutput: "5").VerifyIL("Program.Main", @" 2985CompileAndVerify(code, expectedOutput: "10").VerifyIL("Program.Main", @" 3028CompileAndVerify(code, expectedOutput: "(1, 5)").VerifyIL("Program.Main", @" 3079CompileAndVerify(code, expectedOutput: "(2, 5)").VerifyIL("Program.Main", @" 3130CompileAndVerify(code, expectedOutput: "(3, 10)").VerifyIL("Program.Main", @" 3181CompileAndVerify(code, expectedOutput: "(1, 5)").VerifyIL("Program.Main", @" 3232CompileAndVerify(code, expectedOutput: "(2, 10)").VerifyIL("Program.Main", @" 3293CompileAndVerify(code, expectedOutput: @" 3373CompileAndVerify(code, expectedOutput: @" 3453CompileAndVerify(code, expectedOutput: @" 3533CompileAndVerify(code, expectedOutput: @" 3602CompileAndVerify(code, expectedOutput: "test").VerifyIL("Program.Main", @" 3655CompileAndVerify(code, expectedOutput: "6").VerifyIL("Program.Main", @" 4454var verifier = CompileAndVerify(source, expectedOutput: "00"); 4526var verifier = CompileAndVerify(source, expectedOutput: "00"); 4604var verifier = CompileAndVerify(source, expectedOutput: "00", verify: Verification.FailsPEVerify); 4688var verifier = CompileAndVerify(source, expectedOutput: "12"); 4755var comp = CompileAndVerify(text, expectedOutput: "00");
CodeGen\CodeGenInterfaceImplementation.cs (31)
140var comp = CompileAndVerify(source, 253var comp = CompileAndVerify(source, 434var comp = CompileAndVerify(source, 517var comp = CompileAndVerify(source, 594var comp = CompileAndVerify(source, 677var comp = CompileAndVerify(source, 756var comp = CompileAndVerify(source, 854var comp = CompileAndVerify(source, 945var comp = CompileAndVerify(source, 1028var comp = CompileAndVerify(source, 1105var comp = CompileAndVerify(source, 1188var comp = CompileAndVerify(source, 1265var comp = CompileAndVerify(source, 1348var comp = CompileAndVerify(source, 1426var comp = CompileAndVerify(source, 1511var comp = CompileAndVerify(source, 1590var comp = CompileAndVerify(source, 1675var comp = CompileAndVerify(source, 1753var comp = CompileAndVerify(source, 1835var comp = CompileAndVerify(source, 1928var comp = CompileAndVerify(source, 2033var comp = CompileAndVerify(source, 2100var comp = CompileAndVerify(source, 2242var comp = CompileAndVerify(source, expectedOutput: @" 2317CompileAndVerify(source, expectedOutput: ""); 2361var comp = CompileAndVerify(source, expectedOutput: @" 2425var comp = CompileAndVerify(source, expectedOutput: @" 2481var comp = CompileAndVerify(source, expectedOutput: @" 2544CompileAndVerify(source, expectedOutput: @" 2561var comp = CompileAndVerify(source, expectedSignatures: new[] 2595CompileAndVerify(source, expectedOutput: @"Void I<System.Int32[,][]>.Goo()");
CodeGen\CodeGenInterpolatedString.cs (5)
75var comp = CompileAndVerify(source, expectedOutput: @" 123var comp = CompileAndVerify(source, expectedOutput: @"True 165var comp = CompileAndVerify(source, expectedOutput: @"a: a 240var comp = CompileAndVerify(source, expectedOutput: @"a 282var comp = CompileAndVerify(source, expectedOutput: @"a => Format(""a: {0}"", a)");
CodeGen\CodeGenIterators.cs (80)
88var compilation = CompileAndVerify(source, expectedOutput: "123456789X"); 125var compilation = CompileAndVerify(source, expectedOutput: "0123456789"); 305var compilation = CompileAndVerify(source, expectedOutput: "0|01Z|012XZ|012X3Z|012X34YZ|012X34Y5Z|012X34Y5Z6"); 561CompileAndVerify(source, expectedOutput: "Base.Func;Derived.Func;"); 633CompileAndVerify(source, expectedOutput: "B1::F;D::F;B1::F;"); 683CompileAndVerify(source, expectedOutput: "444888"); 722CompileAndVerify(source, expectedOutput: "36"); 762CompileAndVerify(source, expectedOutput: "ab01"); 796CompileAndVerify(source, expectedOutput: "abc"); 872CompileAndVerify(source, expectedOutput: "InnerOuterExInner"); 909CompileAndVerify(source, expectedOutput: "234"); 949CompileAndVerify(source, expectedOutput: "3210"); 981CompileAndVerify(source, expectedOutput: "1").VerifyIL("Program.Main", @" 1159CompileAndVerify(source, expectedOutput: ""); 1180var rel = CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1197var dbg = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1236CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1253CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1285CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1297CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1336CompileAndVerify(source, expectedOutput: "abcdef"). 1440CompileAndVerify(source, expectedOutput: "012"); 1475CompileAndVerify(source, expectedOutput: "012"); 1506CompileAndVerify(source, expectedOutput: "12"); 1583CompileAndVerify(source, expectedOutput: "1TryNestedTryNestedFinally2Finally"); 1675CompileAndVerify(source, expectedOutput: "12345Finally5Finally4Finally3Finally2L1Finally1"); 1774CompileAndVerify(source, expectedOutput: @" 1882CompileAndVerify(source, expectedOutput: @"M"); 1921CompileAndVerify(source, expectedOutput: @"5 2010CompileAndVerify(source, expectedOutput: @"DONE"); 2090CompileAndVerify(source, expectedOutput: @""); 2131CompileAndVerify(source, expectedOutput: @"12"); 2176CompileAndVerify(source, expectedOutput: @"12"); 2214CompileAndVerify(source, expectedOutput: @"12"); 2240CompileAndVerify(source).VerifyIL("C<T>.<F>d__0.System.Collections.IEnumerator.MoveNext()", expectedIL = 2573var v = CompileAndVerify(source, options: TestOptions.ReleaseDll); 2922var compilation = CompileAndVerify(source, expectedOutput: "FalseTrueFalseTrue", options: TestOptions.ReleaseExe); 3029var verifier = CompileAndVerify(src, expectedOutput: "42 42").VerifyDiagnostics(); 3065var verifier = CompileAndVerify(src, expectedOutput: "ran ran True").VerifyDiagnostics(); 3105var verifier = CompileAndVerify(src, expectedOutput: "ran ran True").VerifyDiagnostics(); 3202var verifier = CompileAndVerify(src, expectedOutput: "42 value value True").VerifyDiagnostics(); 3258var verifier = CompileAndVerify(src, expectedOutput: "42 value value True").VerifyDiagnostics(); 3313CompileAndVerify(src, expectedOutput: "42 value True").VerifyDiagnostics(); 3336var verifier = CompileAndVerify(src, expectedOutput: "42 4242").VerifyDiagnostics(); 3369var verifier = CompileAndVerify(src, expectedOutput: "value value value").VerifyDiagnostics(); 3409var verifier = CompileAndVerify(src, expectedOutput: "42 42").VerifyDiagnostics(); 3450var verifier = CompileAndVerify(src, expectedOutput: "42").VerifyDiagnostics(); 3493var verifier = CompileAndVerify(src, expectedOutput: "value value ran True").VerifyDiagnostics(); 3569var verifier = CompileAndVerify(src, expectedOutput: "value value exception True").VerifyDiagnostics(); 3644CompileAndVerify(src, expectedOutput: "exception value").VerifyDiagnostics(); 3677CompileAndVerify(src, expectedOutput: "exception True").VerifyDiagnostics(); 3720var verifier = CompileAndVerify(src, expectedOutput: "10 42 42").VerifyDiagnostics(); 3782var verifier = CompileAndVerify(src, expectedOutput: "10 42 42", references: [libComp.EmitToImageReference()]).VerifyDiagnostics(); 3839CompileAndVerify(src, expectedOutput: "42 4242").VerifyDiagnostics(); 3869CompileAndVerify(src, expectedOutput: "value True").VerifyDiagnostics(); 3902var verifier = CompileAndVerify(src, expectedOutput: "values2 values2 values3 values3 True").VerifyDiagnostics(); 3936var verifier = CompileAndVerify(src, expectedOutput: "ran ran").VerifyDiagnostics(); 3986var verifier = CompileAndVerify(src, expectedOutput: "value value outer True").VerifyDiagnostics(); 4128var verifier = CompileAndVerify(src, expectedOutput: "ran ran True").VerifyDiagnostics(); 4247var verifier = CompileAndVerify(src, expectedOutput: "True two disposing disposed False two").VerifyDiagnostics(); 4289var verifier = CompileAndVerify(src, expectedOutput: "True one disposed False one").VerifyDiagnostics(); 4328CompileAndVerify(src, expectedOutput: "True one disposed False one").VerifyDiagnostics(); 4359CompileAndVerify(src2, expectedOutput: "TrueTrueTrueTrueTrueTrue").VerifyDiagnostics(); 4392var verifier = CompileAndVerify(src, expectedOutput: "True one disposed disposed2 False one").VerifyDiagnostics(); 4434CompileAndVerify(src, expectedOutput: "True one False one False one").VerifyDiagnostics(); 4459CompileAndVerify(src2, expectedOutput: "TrueTrueTrueFalse").VerifyDiagnostics(); 4487CompileAndVerify(src, expectedOutput: "True one done False one False one").VerifyDiagnostics(); 4510CompileAndVerify(src2, expectedOutput: "TrueTrueTrueFalse").VerifyDiagnostics(); 4546CompileAndVerify(src, expectedOutput: "True one exception one False one").VerifyDiagnostics(); 4579CompileAndVerify(src2, expectedOutput: "TrueTrueFalseTrue").VerifyDiagnostics(); 4627var verifier = CompileAndVerify(src, expectedOutput: "True one disposing exception disposed False one").VerifyDiagnostics(); 4706CompileAndVerify(src2, expectedOutput: "TrueTrueFalse").VerifyDiagnostics(); 4744CompileAndVerify(src, expectedOutput: "True one finally False one False one").VerifyDiagnostics(); 4776CompileAndVerify(src2, expectedOutput: "TrueTrue finally TrueFalse").VerifyDiagnostics(); 4824CompileAndVerify(src, expectedOutput: "True one finally exception one False one False one").VerifyDiagnostics(); 4863CompileAndVerify(src2, expectedOutput: "True finally FalseTrue").VerifyDiagnostics(); 4907var verifier = CompileAndVerify(src, expectedOutput: "True one finally exception one False one").VerifyDiagnostics(); 5032CompileAndVerify(src2, expectedOutput: "True finally True").VerifyDiagnostics(); 5070CompileAndVerify(src, expectedOutput: "True one finally True two False two").VerifyDiagnostics(); 5101CompileAndVerify(src2, expectedOutput: "True finally TrueTrue").VerifyDiagnostics();
CodeGen\CodeGenLocalFunctionTests.cs (56)
73var verifier = CompileAndVerify(src, expectedOutput: @" 174CompileAndVerify(@" 274CompileAndVerify(@" 302CompileAndVerify(@" 461var verifier = CompileAndVerify(@" 489verifier = CompileAndVerify(@" 525verifier = CompileAndVerify(@" 562CompileAndVerify( 632CompileAndVerify(@" 667CompileAndVerify(@" 689CompileAndVerify(@" 711CompileAndVerify(@" 733CompileAndVerify(@" 781CompileAndVerify(@" 804CompileAndVerify(@" 827var verifier = CompileAndVerify(@" 950CompileAndVerify(@" 974CompileAndVerify(@" 998CompileAndVerify(@" 1030var comp = CompileAndVerify(@" 1097CompileAndVerify(@" 1123CompileAndVerify(@" 1194CompileAndVerify(src, expectedOutput: "1"); 1225CompileAndVerify(src, expectedOutput: "1"); 1256CompileAndVerify(src, expectedOutput: "1"); 1290CompileAndVerify(src, expectedOutput: "1"); 1325CompileAndVerify(src, expectedOutput: "1"); 1364CompileAndVerify(src, expectedOutput: @"1 1402CompileAndVerify(src, 1468CompileAndVerify(src); 1545var comp = CompileAndVerify(src); 5126CompileAndVerify(src, expectedOutput: "CDBACDBACDBACDBACDBA"); 5133var c = CompileAndVerify(@" 5226CompileAndVerify( 5275CompileAndVerify( 5316var verifier = CompileAndVerify( 5349var verifier = CompileAndVerify( 5383var verifier = CompileAndVerify( 5416var verifier = CompileAndVerify( 5521CompileAndVerify( 5528CompileAndVerify( 5619CompileAndVerify( 5625CompileAndVerify( 5671var verifier = CompileAndVerify( 5737var verifier = CompileAndVerify( 5812var verifier = CompileAndVerify( 5887var verifier = CompileAndVerify( 5955var verifier = CompileAndVerify( 5993var verifier = CompileAndVerify( 6049var verifier = CompileAndVerify( 6106var verifier = CompileAndVerify( 6197CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "44"); 6222CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "44"); 6247CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "44"); 6272CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "44"); 6298CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "44");
CodeGen\CodeGenLockTests.cs (26)
37var verifier = CompileAndVerify(text); 92var verifier = CompileAndVerify(text); 146var verifier = CompileAndVerify(text); 202var verifier = CompileAndVerify(text); 259var verifier = CompileAndVerify(text); 313var verifier = CompileAndVerify(text); 367var verifier = CompileAndVerify(text); 421var verifier = CompileAndVerify(text); 547CompileAndVerify(text, parseOptions: TestOptions.Regular10).VerifyIL("Test.Main", @" 581CompileAndVerify(@" 606CompileAndVerify(@" 726CompileAndVerify(text).VerifyIL("Test.Main", @" 771CompileAndVerify(text).VerifyIL("Test.Main", @" 817CompileAndVerify(text).VerifyIL("Test.Main", @" 863CompileAndVerify(text).VerifyIL("Test.Main", @" 909CompileAndVerify(text).VerifyIL("Test.Main", @" 957CompileAndVerify(text).VerifyIL("Test.Main", @" 1003CompileAndVerify(text).VerifyIL("Test.Main", @" 1051CompileAndVerify(text).VerifyIL("Test.Main", @" 1120CompileAndVerify(text).VerifyIL("Test.goo", @" 1194CompileAndVerify(text).VerifyIL("Test.Values", @" 1226CompileAndVerify(text); 1247CompileAndVerify(text).VerifyIL("Test.Main", @" 1306CompileAndVerify(text).VerifyIL("Test.Main", @" 1819CompileAndVerify(text, expectedOutput: @"Writer wrote 0 1882CompileAndVerify(text, expectedOutput: @"1000000");
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (27)
59var verifier = CompileAndVerify(source, expectedOutput: @" 126CompileAndVerify(source, options: TestOptions.DebugDll).VerifyIL("C.TestObject()", expectedIL: @" 151var verifier = CompileAndVerify(@" 246var verifier = CompileAndVerify(@" 408var verifier = CompileAndVerify(source, expectedOutput: @" 442var verifier = CompileAndVerify(@" 621CompileAndVerify(@" 694CompileAndVerify(@" 771var verifier = CompileAndVerify(@" 996CompileAndVerify(@" 1025var verifier = CompileAndVerify(@" 1234CompileAndVerify(source1, expectedOutput: "F2").VerifyIL("C.Main()", expectedIL: @" 1325var verifier = CompileAndVerify(source, expectedOutput: "Test String"); 1367CompileAndVerify(@" 1411var verifier = CompileAndVerify(@" 1703var verifier = CompileAndVerify(@" 2033CompileAndVerify(@" 2159var verifier = CompileAndVerify(@" 2191CompileAndVerify(@" 2222var verifier = CompileAndVerify(@" 2324CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: ""); 2379var verifier = CompileAndVerify(source, expectedOutput: "1"); 2420CompileAndVerify(source, expectedOutput: @" 2535var verifier = CompileAndVerify(testSource, references: new[] { reference1 }); 2789CompileAndVerify(@" 2808var verifier = CompileAndVerify(@" 2900CompileAndVerify(@"
CodeGen\CodeGenOperators.cs (120)
37var compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe); 48compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.DebugExe); 88var compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe); 105compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.DebugExe); 156var compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe); 173compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.DebugExe); 227var compilation = CompileAndVerify(source, expectedOutput: "False Branch not taken-True Branch taken", options: TestOptions.ReleaseExe); 247compilation = CompileAndVerify(source, expectedOutput: "False Branch not taken-True Branch taken", options: TestOptions.DebugExe); 299var compilation = CompileAndVerify(source, expectedOutput: "True Branch taken", options: TestOptions.ReleaseExe); 310compilation = CompileAndVerify(source, expectedOutput: "True Branch taken", options: TestOptions.DebugExe); 352var compilation = CompileAndVerify(source, expectedOutput: "True Branch taken", options: TestOptions.ReleaseExe); 363compilation = CompileAndVerify(source, expectedOutput: "True Branch taken", options: TestOptions.DebugExe); 427var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 493var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 548var compilation = CompileAndVerify(source); 582var compilation = CompileAndVerify(source); 601var comp = CompileAndVerify(text, expectedOutput: "False"); 634var comp = CompileAndVerify(text, expectedOutput: "False"); 666var comp = CompileAndVerify(text, expectedOutput: "False"); 696var comp = CompileAndVerify(text, expectedOutput: "False"); 729var comp = CompileAndVerify(text, expectedOutput: @"False 817var comp = CompileAndVerify(text, expectedOutput: @"123456"); 906var compilation = CompileAndVerify(source); 953var compilation = CompileAndVerify(source); 1026var comp = CompileAndVerify(source, 1088var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1221var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1295var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1362var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1431var comp = CompileAndVerify(source, expectedOutput: @" 1512var comp = CompileAndVerify(source, expectedOutput: @" 1564var compilation = CompileAndVerify(source, expectedOutput: "Goo"); 1627var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 1674var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 1721var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]System.Collections.Generic.IEnumerable`1[System.Int32]"); 1768var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 1817var comp = CompileAndVerify(source); 1864var verify = CompileAndVerify(src, 1930verify = CompileAndVerify(src, expectedOutput: "C"); 2005var comp = CompileAndVerify(source); 2064var comp = CompileAndVerify(source); 2130var comp = CompileAndVerify(source); 2193var comp = CompileAndVerify(source); 2253CompileAndVerify(source, expectedOutput: "True"); 2290CompileAndVerify(source, expectedOutput: "0", options: TestOptions.ReleaseExe.WithWarningLevel(5)).VerifyDiagnostics( 2321CompileAndVerify(source, expectedOutput: "0"); 2339CompileAndVerify(source). 2385CompileAndVerify(source); 2404CompileAndVerify(source, 2449CompileAndVerify(source, 2514CompileAndVerify(source, 2568var verifier = CompileAndVerify(source, 2660var verifier = CompileAndVerify(source, 2735CompileAndVerify(source, expectedOutput: @" 2767var verifier = CompileAndVerify(source, expectedOutput: @"0"); 2794var verifier = CompileAndVerify(source, expectedOutput: @"PASS"); 2819var verifier = CompileAndVerify(source, expectedOutput: @"0"); 2857var verifier = CompileAndVerify(source, expectedOutput: @"01"); 2892var verifier = CompileAndVerify(source, expectedOutput: @"10"); 2928var verifier = CompileAndVerify(source, expectedOutput: @"0"); 2967CompileAndVerify(source, expectedOutput: "12345"); 3047var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 3097var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 3116var comp = CompileAndVerify(text, expectedOutput: ""); 3161CompileAndVerify(source); 3202CompileAndVerify(source, expectedOutput: 3251var verifier = CompileAndVerify(source: source, expectedOutput: "Pass"); 3314CompileAndVerify(source, expectedOutput: expectedOutput); 3356CompileAndVerify( 3382CompileAndVerify( 3420var comp = CompileAndVerify(text, expectedOutput: @"False 3480var comp = CompileAndVerify(text, options: TestOptions.DebugExe, expectedOutput: @"True 3543var comp = CompileAndVerify(text, expectedOutput: @"one"); 3573comp = CompileAndVerify(text, expectedOutput: @"65539"); 3661var comp = CompileAndVerify(text, expectedOutput: @" 3793var comp = CompileAndVerify(text, expectedOutput: @"ttff"); 3827var comp = CompileAndVerify(text, expectedOutput: expectedOutput); 3861var comp = CompileAndVerify(text).VerifyIL("C.M", @" 3901var comp = CompileAndVerify(text, expectedOutput: @"True 3933var comp = CompileAndVerify(text, expectedOutput: @" 3972var comp = CompileAndVerify(text, expectedOutput: @" 4013var comp = CompileAndVerify(text, expectedOutput: @" 4072CompileAndVerify(text, expectedOutput: @" 4128CompileAndVerify(text).VerifyIL("S.Test", @" 4168var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 4220var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]System.Collections.Generic.IEnumerable`1[System.Int32]"); 4274var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 4321var comp = CompileAndVerify(source); 4369var comp = CompileAndVerify(source); 4430var comp = CompileAndVerify(source); 4501var comp = CompileAndVerify(source); 4567var comp = CompileAndVerify(new string[] { source }, expectedOutput: @""); 4636var comp = CompileAndVerify(source); 4703var comp = CompileAndVerify(source); 4760var comp = CompileAndVerify(source); 4822var comp = CompileAndVerify(source); 4864var comp = CompileAndVerify(source); 4921var comp = CompileAndVerify(source); 4995var comp = CompileAndVerify(source); 5022var comp = CompileAndVerify(source); 5060var comp = CompileAndVerify(source); 5102var comp = CompileAndVerify(source); 5140var comp = CompileAndVerify(source); 5227var compilation = CompileAndVerify(source, expectedOutput: @"3 5304var result = CompileAndVerify(source, options: TestOptions.ReleaseExe); 5359var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "True"); 5407var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "11461640193"); 5559var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"5180801 5764var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 5791CompileAndVerify(source, expectedOutput: expectedOutput); 5864var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 5922var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 5985var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 6057var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 6417var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6499var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6659var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6727var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6801var verifier = CompileAndVerify(code, expectedOutput: "12"); 6884var verifier = CompileAndVerify(code, expectedOutput: "12");
CodeGen\CodeGenOptimizedNullableOperators.cs (136)
66var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 111var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 144var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 177var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 213var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 282var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 316var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 359var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 395var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 437var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 566var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 739var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 783var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 831verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput); 922var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 936verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput); 985var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 1018verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput); 1131var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1176var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1293var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1406CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.ReleaseExe.WithWarningLevel(4)).VerifyDiagnostics( 1420var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1593var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1793var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1919var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1955var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2002var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2131var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2233var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2281var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2356var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2408var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2496var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2526var comp = CompileAndVerify(source, expectedOutput: @" 2682var comp = CompileAndVerify(source, expectedOutput: @" 2753var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 2756verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 2799var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 2802verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 2842var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 2845verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 2879var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 2882verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 2927var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 2930verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 2972var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 2975verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3009var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3012verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3046var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3049verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3083var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3086verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3121var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3124verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3159var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3162verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3199var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3202verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3246var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3249verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3290var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3293verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3337var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3340verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3386var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3389verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3434var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3437verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3482var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3485verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3532var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3535verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3582var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3585verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3638var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3641verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3691var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3694verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3747var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3750verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3800var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3803verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3857var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3860verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3911var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3914verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 3961var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 3964verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4016var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4019verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4076var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4079verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4129var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4132verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4190var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4193verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4251var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4254verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4298var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4301verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4336var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4339verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4396var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4399verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4449var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4452verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4509var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4512verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4562var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4565verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4610var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4613verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4649var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4652verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4697var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4700verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4736var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4739verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4784var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4787verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4823var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4826verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4871var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4874verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4910var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4913verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 4970var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 4973verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 5023var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 5026verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 5072var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 5075verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output); 5112var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: output); 5115verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: output);
CodeGen\CodeGenOverridingAndHiding.cs (46)
109var comp = CompileAndVerify(source, 191var comp = CompileAndVerify(source, 314var comp = CompileAndVerify(source, 388var comp = CompileAndVerify(source, 472var comp = CompileAndVerify(source, 576var comp = CompileAndVerify(source, 671var comp = CompileAndVerify(source, expectedOutput: @" 758var comp = CompileAndVerify(source, expectedOutput: @" 825var comp = CompileAndVerify(source); 936var comp = CompileAndVerify(source, 1028var comp = CompileAndVerify(source, expectedOutput: @" 1115var comp = CompileAndVerify(source, expectedOutput: @"2545571191011111114151617"); 1315var comp = CompileAndVerify(source, 1372var comp = CompileAndVerify(source, 1415var comp = CompileAndVerify(source, 1481var comp = CompileAndVerify(source, 1561var comp = CompileAndVerify(source, 1715var comp = CompileAndVerify(source, expectedOutput: @" 1896var comp = CompileAndVerify(source, expectedOutput: @"Derived2.Method() 1966var comp = CompileAndVerify(text, expectedSignatures: new[] 2007var comp = CompileAndVerify(source, expectedSignatures: new[] 2043var comp = CompileAndVerify(source, expectedSignatures: new[] 2080var comp = CompileAndVerify(source, expectedSignatures: new[] 2114var comp = CompileAndVerify(source, expectedSignatures: new[] 2159var comp = CompileAndVerify(source, expectedSignatures: new[] 2213var comp = CompileAndVerify(source, expectedSignatures: new[] 2260var comp = CompileAndVerify(source2, new[] { new CSharpCompilationReference(compilation1) }, expectedSignatures: new[] 2298var comp = CompileAndVerify(source, expectedSignatures: new[] 2338var comp = CompileAndVerify(source, expectedSignatures: new[] 2378var comp = CompileAndVerify(source, expectedSignatures: new[] 2443var comp = CompileAndVerify(source, 2656var comp = CompileAndVerify( 2761var comp = CompileAndVerify( 3293var comp = CompileAndVerify(source, 3525var verifier = CompileAndVerify( 3559var verifier = CompileAndVerify(text, 3586var verifier = CompileAndVerify(text, 3651var comp = CompileAndVerify(source, 3703var verifier = CompileAndVerify(text, 3749CompileAndVerify(text, expectedOutput: "C1"); 3793CompileAndVerify(text, sourceSymbolValidator: validator, symbolValidator: validator); 3866CompileAndVerify(text, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: 4017var verifier = CompileAndVerify( 4132var verifier = CompileAndVerify(source, symbolValidator: validator(true), sourceSymbolValidator: validator(false), expectedOutput: @"System.Int32[]"); 4181var comp = CompileAndVerify(source2, references: new[] { new CSharpCompilationReference(compref) }, expectedOutput: "M"); 4349var comp = CompileAndVerify(source, expectedOutput:
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (1)
1657CompileAndVerify(source, expectedOutput: "34361843576", verify: Verification.Skipped, targetFramework: TargetFramework.Net70).VerifyIL("Test.Main", @"
CodeGen\CodeGenReadonlyStructTests.cs (35)
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"); 1339CompileAndVerify(csharp, symbolValidator: validate); 1411CompileAndVerify(csharp, symbolValidator: validate); 1477CompileAndVerify(csharp, symbolValidator: validate); 1720var verifier = CompileAndVerify(csharp, expectedOutput: "123"); 1786var verifier = CompileAndVerify(csharp, expectedOutput: "123"); 1860var verifier = CompileAndVerify(csharp, references: new[] { image }, expectedOutput: "1123"); 1936var verifier = CompileAndVerify(csharp, references: new[] { image }, expectedOutput: "1123"); 1984var comp = CompileAndVerify(csharp); 2010var comp = CompileAndVerify(csharp); 2035var comp = CompileAndVerify(csharp); 2061var comp = CompileAndVerify(csharp); 2095var comp = CompileAndVerify(csharp); 2133var comp = CompileAndVerify(csharp); 2168var comp = CompileAndVerify(csharp); 2233var verifier = CompileAndVerify(csharp); 2318var verifier = CompileAndVerify(csharp); 2386var verifier = CompileAndVerify(csharp); 2484var verifier = CompileAndVerify(csharp); 2554CompileAndVerify(csharp, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "42"); 2580var verifier = CompileAndVerify(csharp, parseOptions: parseOptions, verify: verify); 2595CompileAndVerify(csharp, symbolValidator: validate).VerifyDiagnostics();
CodeGen\CodeGenRefConditionalOperatorTests.cs (30)
41var comp = CompileAndVerify(source, expectedOutput: "3344"); 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); 364var comp = CompileAndVerify(source, expectedOutput: "1"); 438var comp = CompileAndVerify(source, expectedOutput: @"False 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); 1000var comp = CompileAndVerify(source, expectedOutput: "1"); 1153var comp = CompileAndVerify(source, expectedOutput: "00", verify: Verification.FailsPEVerify); 1404var comp = CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.ReleaseExe); 1405CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.DebugExe); 1539var comp = CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.ReleaseExe); 1540CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.DebugExe); 1684var comp = CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.ReleaseExe); 1685CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.DebugExe); 1837var comp = CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.ReleaseExe); 1838CompileAndVerify(source, expectedOutput: "0123-1230", options: TestOptions.DebugExe); 2060var comp = CompileAndVerify(source, expectedOutput: "124-123", options: TestOptions.ReleaseExe); 2061CompileAndVerify(source, expectedOutput: "124-123", options: TestOptions.DebugExe); 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 (102)
37var verifier = CompileAndVerify(src, verify: Verification.Fails); 65verifier = CompileAndVerify(src, 74var verifier = CompileAndVerify(@" 138var verifier = CompileAndVerify(@" 163var verifier = CompileAndVerify(@" 204var verifier = CompileAndVerify(@" 245var verifier = CompileAndVerify(@" 278var verifier = CompileAndVerify(@" 378var verifier = CompileAndVerify(@" 431CompileAndVerify(@" 470CompileAndVerify(@" 547var comp = CompileAndVerify(@" 580var comp = CompileAndVerify(@" 610var comp = CompileAndVerify(@" 655var comp = CompileAndVerify(@" 705var comp = CompileAndVerify(@" 794var comp = CompileAndVerify(@" 879var comp = CompileAndVerify(@" 933var comp = CompileAndVerify(@" 956var comp = CompileAndVerify(@" 1040var comp = CompileAndVerify(@" 1069var comp = CompileAndVerify(@" 1121var comp = CompileAndVerify(@" 1149var comp = CompileAndVerify(@" 1186var comp = CompileAndVerify(@" 1260var comp = CompileAndVerify(@" 1331var comp = CompileAndVerify(@" 1376var comp = CompileAndVerify(@" 1429var comp = CompileAndVerify(@" 1478var comp = CompileAndVerify(@" 1519var comp = CompileAndVerify(@" 1614var comp = CompileAndVerify(@" 1668CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M()", @" 1682CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M()", @" 1708CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M", @" 1721CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M", @" 1746CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M", @" 1759CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M", @" 1784CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M", @" 1798CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M", @" 1824CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M<T>", @" 1837CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M<T>", @" 1862CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M<T>", @" 1875CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M<T>", @" 1902CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M<T>", @" 1916CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M<T>", @" 1942CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M<T>", @" 1955CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M<T>", @" 1981CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M", @" 1993CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M", @" 2018CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M", @" 2030CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M", @" 2056CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M<T>", @" 2069CompileAndVerify(text, options: TestOptions.ReleaseDll).VerifyIL("Program.M<T>", @" 2095CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M(ref int)", @" 2121CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M(out int)", @" 2150CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M(ref int)", @" 2181CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M()", @" 2214var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2285var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2375var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2437var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2504var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2586var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2647CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M()", @" 2681var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2722CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M()", @" 2757var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2808var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2852CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M()", @" 2889var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2960var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3057var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3127CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M(ref int, ref int, object)", @" 3167var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3244var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3350var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3430CompileAndVerify(text, options: TestOptions.DebugDll).VerifyIL("Program.M(D)", @" 3459CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M(D, ref int, ref int, object)", @" 3495var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "22" : null, 3535var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "32" : null, 3572var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "2" : null, 3620var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, 3673var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? expectedOutput : null, 3710var verifier = CompileAndVerify(source, expectedOutput: "22"); 3747var verifier = CompileAndVerify(source, expectedOutput: "32"); 3785var verifier = CompileAndVerify(source, expectedOutput: "22"); 3830var verifier = CompileAndVerify(source, expectedOutput: "32"); 3888CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 3961CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Passes).VerifyIL("Program.Main()", @" 4526var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 4543verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: ""); 4579var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 4595verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: ""); 4631var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 4647verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: ""); 4682var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 4698verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: ""); 4731var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 4740verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: ""); 4767var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 4776verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "");
CodeGen\CodeGenRefOutTests.cs (8)
27CompileAndVerify(source, expectedSignatures: new[] 43CompileAndVerify(source, expectedSignatures: new[] 68CompileAndVerify(source, expectedOutput: "2"); 106CompileAndVerify(source, expectedOutput: @" 178CompileAndVerify(source, expectedOutput: @" 232CompileAndVerify(source, expectedOutput: @" 281CompileAndVerify(source, expectedOutput: @" 296CompileAndVerify(@"
CodeGen\CodeGenRefReadonlyReturnTests.cs (22)
62var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails); 87comp = CompileAndVerify(source, verify: Verification.Fails); 116var comp = CompileAndVerify(@" 180comp = CompileAndVerify(@" 238var comp = CompileAndVerify(@" 286var comp = CompileAndVerify(@" 307var comp = CompileAndVerify(@" 358var verifier = CompileAndVerify(@" 385var verifier = CompileAndVerify(@" 412var verifier = CompileAndVerify(@" 466var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular); 915comp = CompileAndVerify(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails, targetFramework: TargetFramework.Mscorlib40); 1201var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular); 1223CompileAndVerify(@" 1252CompileAndVerify(@" 1279CompileAndVerify(@" 1308CompileAndVerify(@" 1336CompileAndVerify(@" 1365CompileAndVerify(@" 1392CompileAndVerify(@" 1421CompileAndVerify(@" 1450CompileAndVerify(@"
CodeGen\CodeGenRefReturnTests.cs (13)
27return CompileAndVerify( 37CompileAndVerify(@" 131CompileAndVerify(text, parseOptions: TestOptions.Regular10, verify: Verification.Fails).VerifyIL("Program.M(out int)", @" 1595CompileAndVerify(text, parseOptions: TestOptions.Regular).VerifyIL("Program.M()", @" 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()", @" 2589var v = CompileAndVerify(text, expectedOutput: "12345"); 2709var v = CompileAndVerify(source, expectedOutput: "2"); 2787var v = CompileAndVerify(source, expectedOutput: "23"); 3455CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: "Base", verify: Verification.Passes); 3548CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: "Program+RefFunc1`2[Derived2,Derived1]", verify: Verification.Passes); 3588CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: @"System.Func`2[Derived1,Base] 3633CompileAndVerify(text, expectedOutput: "37", parseOptions: TestOptions.Regular10, verify: Verification.Fails).VerifyIL("Program.Main()", @"
CodeGen\CodeGenShortCircuitOperatorTests.cs (93)
57var compilation = CompileAndVerify(source, expectedOutput: @" 209var compilation = CompileAndVerify(source, expectedOutput: @" 376var compilation = CompileAndVerify(source, expectedOutput: @" 964var comp = CompileAndVerify(source, expectedOutput: "NULL#System.Int32[]"); 1013var comp = CompileAndVerify(source, expectedOutput: "NULL#System.Int32[]"); 1057var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: "NULL#System.Int32[]"); 1203var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: "NULL#y"); 1226var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: "NULL#-1"); 1250var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: "NULL#y"); 1274var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: "NULL#3"); 1298var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: "NULL#3"); 1316var comp = CompileAndVerify(source, expectedOutput: ""); 1356var comp = CompileAndVerify(source, expectedOutput: ""); 1406var comp = CompileAndVerify(source, expectedOutput: ""); 1452var comp = CompileAndVerify(source, expectedOutput: @"3 1516var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: ""); 1573var comp = CompileAndVerify(source, expectedOutput: ""); 1634var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @"3 1709var comp = CompileAndVerify(source, expectedOutput: @"3 1777var comp = CompileAndVerify(source, expectedOutput: @"System.Exception: a 1847var comp = CompileAndVerify(source, expectedOutput: @"print0 1914var comp = CompileAndVerify(source, expectedOutput: @"print0 2016var comp = CompileAndVerify(source, targetFramework: TargetFramework.Empty, references: new[] { MscorlibRef_v4_0_30316_17626 }, expectedOutput: @"print0 2073var comp = CompileAndVerify(source, targetFramework: TargetFramework.Empty, references: new[] { MscorlibRef_v4_0_30316_17626 }, expectedOutput: @"print0 2125var comp = CompileAndVerify(source, expectedOutput: @"False 2217var comp = CompileAndVerify(source, expectedOutput: @"False 2313var comp = CompileAndVerify(source, expectedOutput: @"False 2390var comp = CompileAndVerify(source, expectedOutput: @"False 2462var comp = CompileAndVerify(source, expectedOutput: @"False 2544var comp = CompileAndVerify(source, expectedOutput: @"False 2631var comp = CompileAndVerify(source, references: new MetadataReference[] { CSharpRef }, expectedOutput: @"False 2690var comp = CompileAndVerify(source, references: new MetadataReference[] { CSharpRef }, expectedOutput: @"False 3191var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @"System.Nullable`1[System.Int64]"); 3248var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @"System.Nullable`1[System.Int64]"); 3302var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @""); 3459var comp = CompileAndVerify(source, expectedOutput: @"0 3530var comp = CompileAndVerify(source, expectedOutput: @"0 3609var comp = CompileAndVerify(source, expectedOutput: @"0 3684var comp = CompileAndVerify(source, expectedOutput: @"0 3767var comp = CompileAndVerify(source, expectedOutput: @"0 3842var comp = CompileAndVerify(source, expectedOutput: @" 3900var comp = CompileAndVerify(source, expectedOutput: @"False 3998var comp = CompileAndVerify(source, expectedOutput: @"True 4123var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @" > 4234var comp = CompileAndVerify(source, expectedOutput: @""); 4304var comp = CompileAndVerify(source, expectedOutput: @""); 4395var comp = CompileAndVerify(source, expectedOutput: @"Success"); 4468var comp = CompileAndVerify(source, expectedOutput: @"Success"); 4506var comp = CompileAndVerify(source, expectedOutput: @""); 4583var comp = CompileAndVerify(source, expectedOutput: @""); 4666var comp = CompileAndVerify(source, expectedOutput: @"not empty 4895var comp = CompileAndVerify(source, expectedOutput: @"1"); 4952var verifier = CompileAndVerify(source, expectedOutput: @"0 4993var verifier = CompileAndVerify(source, expectedOutput: @"0 5036var verifier = CompileAndVerify(source, expectedOutput: @"01/01/0001 00:00:00 5085var verifier = CompileAndVerify(source, expectedOutput: @"0 5135var verifier = CompileAndVerify(source, expectedOutput: @"--- 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: @"--- 5289var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5416var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5543var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 5669var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @" --- 5718var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5807var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5886var verifier = CompileAndVerify(source, expectedOutput: @"False"); 5923var verifier = CompileAndVerify(source, expectedOutput: @"False"); 5977var verifier = CompileAndVerify(source, expectedOutput: @"False 6045var verifier = CompileAndVerify(source, expectedOutput: @"FalseTrueTrue"); 6085var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalse"); 6128var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalseFalse"); 6441var verifier = CompileAndVerify(source, expectedOutput: @"==True 6520var verifier = CompileAndVerify(source, expectedOutput: @"==True 6598var verifier = CompileAndVerify(source, expectedOutput: @"False 6672var verifier = CompileAndVerify(source, expectedOutput: @"False 6737var comp = CompileAndVerify(source, expectedOutput: @"1 6790var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalse"); 6839var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalseFalse"); 6889var verifier = CompileAndVerify(source, expectedOutput: @"0"); 6947var verifier = CompileAndVerify(source, expectedOutput: @"42"); 6992var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7052var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7119var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7179var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7234var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7278var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, 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); 7392var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @""); 7469CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput); 7470CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7520CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput); 7521CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput);
CodeGen\CodeGenStackAllocInitializerTests.cs (34)
49CompileAndVerify(text, 122CompileAndVerify(text, 312CompileAndVerify(text, 368CompileAndVerify(text, 409CompileAndVerify(text, 428CompileAndVerify(text, 492CompileAndVerify(text, 527CompileAndVerify(text, 567CompileAndVerify(text, 612CompileAndVerify(text, 669CompileAndVerify(text, 725CompileAndVerify(text, 913var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "" : null, 951var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, 979CompileAndVerify(source, expectedOutput: expectedOutput, 1004var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "" : null, 1107var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, 1136CompileAndVerify(source, expectedOutput: expectedOutput, 1161var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "123" : null, 1206var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, 1235CompileAndVerify(source, expectedOutput: expectedOutput, 1263var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, 1291CompileAndVerify(source, expectedOutput: expectedOutput, 1318var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, 1346CompileAndVerify(source, expectedOutput: expectedOutput, 1371var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "12" : null, 1418var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "" : null, 1456var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "" : null, 1497var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? output : null, 1523CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? output : null, 1579var verifier = CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsCoreClr ? "123" : null, 1636var verifier = CompileAndVerify(source, expectedOutput: expectedOutput, 1673CompileAndVerify(source, expectedOutput: expectedOutput, 1698=> CompileAndVerify(GetSource(pointerType),
CodeGen\CodeGenStringConcat.cs (35)
41var comp = CompileAndVerify(source, expectedOutput: @"AB 99var comp = CompileAndVerify(source, expectedOutput: "A"); 117var comp = CompileAndVerify(source); 147var comp = CompileAndVerify(source, expectedOutput: @"AB 204var comp = CompileAndVerify(source, expectedOutput: @"qqqqqqqq" 243var comp = CompileAndVerify(source, expectedOutput: @"FABF 408var comp = CompileAndVerify(source, targetFramework: TargetFramework.NetFramework, expectedOutput: ExecutionConditionUtil.IsWindowsDesktop ? @"test_field: 2" : null); 455var comp = CompileAndVerify(source, expectedOutput: @"FFABFF"); 510var comp = CompileAndVerify(source, expectedOutput: @"O 576var comp = CompileAndVerify(source, expectedOutput: @"Y 642var comp = CompileAndVerify(source, expectedOutput: @"O 687var comp = CompileAndVerify(source, expectedOutput: @"O 738var comp = CompileAndVerify(source, expectedOutput: @"Start 786var comp = CompileAndVerify(source); 830var comp = CompileAndVerify(source, expectedOutput: @"A0 971var comp = CompileAndVerify(source, expectedOutput: @"A 1062var comp = CompileAndVerify(source, expectedOutput: @"PPFF 1152var comp = CompileAndVerify(source, expectedOutput: @"PPFF 1236var comp = CompileAndVerify(source, expectedOutput: @"1111 1296var comp = CompileAndVerify(source, expectedOutput: @"abcdefbye"); 1338var comp = CompileAndVerify(source, expectedOutput: "\"\""); 1376var comp = CompileAndVerify(source, expectedOutput: "\"\""); 1418var comp = CompileAndVerify(source, expectedOutput: @"1111"); 1491CompileAndVerify(source, expectedOutput: "(0)(0)(0)(1)(2)(0)(0)(0)(1)(2)"); 1517var comp = CompileAndVerify(source, expectedOutput: @"RRRR"); 1569var comp = CompileAndVerify(source, expectedOutput: @"RRRR"); 1618var comp = CompileAndVerify(source, expectedOutput: @"SSSS"); 1663var comp = CompileAndVerify(source, expectedOutput: @"ST"); 1696var comp = CompileAndVerify(source, expectedOutput: @"S"); 1752var comp = CompileAndVerify(source, expectedOutput: @"a1 1966var comp = CompileAndVerify(source, expectedOutput: "3+4=7"); 2036var comp = CompileAndVerify(source, expectedOutput: "S13O1S24O2"); 2122var verifier = CompileAndVerify(source, expectedOutput: "ab"); 2156var verifier = CompileAndVerify(source, expectedOutput: "abcd"); 2189var verifier = CompileAndVerify(source, expectedOutput: "a");
CodeGen\CodeGenStructsAndEnum.cs (34)
46var compilation = CompileAndVerify(source, expectedOutput: "0427"); 103var compilation = CompileAndVerify(source, expectedOutput: "042"); 151var compilation = CompileAndVerify(source, expectedOutput: "0708589934592"); 203var compilation = CompileAndVerify(source, expectedOutput: @"0"); 262var compilation = CompileAndVerify(source, expectedOutput: @""); 337var compilation = CompileAndVerify(source, expectedOutput: @"Program+S1"); 383var compilation = CompileAndVerify(source, expectedOutput: @"S::M 451var compilation = CompileAndVerify(source, expectedOutput: @" 525CompileAndVerify(text, options: TestOptions.DebugExe).VerifyIL("Struct.Main()", expectedIL); 572CompileAndVerify(text, expectedOutput: "SundayAA").VerifyIL("A.Main()", expectedIL); 591CompileAndVerify(source, expectedOutput: @"123"); 616CompileAndVerify(text, expectedOutput: "123"); 661var compilation = CompileAndVerify(source, expectedOutput: ""); 742var compilation = CompileAndVerify(source, expectedOutput: ""); 842var compilation = CompileAndVerify(source, expectedOutput: ""); 955var compilation = CompileAndVerify(source, expectedOutput: ""); 1093var compilation = CompileAndVerify(source, expectedOutput: "1111"); 1192var compilation = CompileAndVerify(source, expectedOutput: "1111"); 1284var compilation = CompileAndVerify(source, expectedOutput: "11"); 1371var compilation = CompileAndVerify(source, expectedOutput: ""); 1479var compilation = CompileAndVerify(source, expectedOutput: ""); 1553var compilation = CompileAndVerify(source, expectedOutput: "S1", verify: Verification.Skipped); 1570compilation = CompileAndVerify(source, expectedOutput: "S1", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 1631var compilation = CompileAndVerify(source); 1660var compilation = CompileAndVerify(source, expectedOutput: "B"); 1729var compilation = CompileAndVerify(source, expectedOutput: @"ca761232-ed42-11ce-bacd-00aa0057b223 1828var compilation = CompileAndVerify(source, expectedOutput: "False"); 1884var compilation = CompileAndVerify(source, expectedOutput: "False"); 1952var compilation = CompileAndVerify(source, expectedOutput: "False"); 2006var compilation = CompileAndVerify(source, expectedOutput: "False"); 2099var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: "True"); 2214var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: @"353 2286var compilation = CompileAndVerify(source); 2369var compilation = CompileAndVerify(source, expectedOutput: "0");
CodeGen\CodeGenTests.cs (263)
81var result = CompileAndVerify(source, verify: Verification.FailsILVerify, options: TestOptions.DebugDll); 169var result = CompileAndVerify(source, verify: Verification.FailsILVerify, options: TestOptions.DebugDll); 239var result = CompileAndVerify(source, options: TestOptions.DebugDll); 300var result = CompileAndVerify(source, options: TestOptions.DebugDll); 335var result = CompileAndVerify(source, options: TestOptions.ReleaseDll); 383var result = CompileAndVerify(source, options: TestOptions.ReleaseDll); 436var result = CompileAndVerify(source, options: TestOptions.ReleaseDll); 712var compilation = CompileAndVerify(source, expectedOutput: @" 752var compilation = CompileAndVerify(source, expectedOutput: @" 903var compilation = CompileAndVerify(source); 929CompileAndVerify( 953var compilation = CompileAndVerify(source); 1109var compilation = CompileAndVerify(source); 1510var compilation = CompileAndVerify(source); 1537var compilation = CompileAndVerify(source); 1582var compilation = CompileAndVerify(source); 1621var compilation = CompileAndVerify(source); 1666var compilation = CompileAndVerify(source, expectedOutput: "42"); 1695var compilation = CompileAndVerify(source, expectedOutput: "42"); 1724var compilation = CompileAndVerify(source, expectedOutput: "42"); 1756var compilation = CompileAndVerify(source, expectedOutput: "123"); 1797CompileAndVerify(source, expectedOutput: "42123"). 1814var v = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "42123"); 1865var compilation = CompileAndVerify(source, expectedOutput: ""); 1907var compilation = CompileAndVerify(source, expectedOutput: @" 1954var compilation = CompileAndVerify(source, expectedOutput: @" 1990var compilation = CompileAndVerify(source, expectedOutput: @"System.Exception: hello"); 2028var compilation = CompileAndVerify(source, expectedOutput: @"hi"); 2053var compilation = CompileAndVerify(source); 2087var compilation = CompileAndVerify(source); 2125var compilation = CompileAndVerify(source, expectedOutput: "S"); 2155var compilation = CompileAndVerify(source, expectedOutput: "2"); 2183var compilation = CompileAndVerify(source, expectedOutput: "S"); 2219var compilation = CompileAndVerify(source, expectedOutput: "T2"); 2256var compilation = CompileAndVerify(source, expectedOutput: "C<int>.S;C<string>.S;C<string>.T2"); 2287var compilation = CompileAndVerify(source, expectedOutput: "p, q"); 2347var compilation = CompileAndVerify(source); 2397var compilation = CompileAndVerify(source); 2467CompileAndVerify(source, expectedOutput: "B.M, B.P, A.M, A.P, "). 2536CompileAndVerify(source, expectedOutput: "B.M():B.M(), D.M():B.M()"). 2619CompileAndVerify(source, expectedOutput: $"A.P.get;B.P.set;A.P.get;B.P.set;{Environment.NewLine}A.P.get;B.P.set;D.P.get;B.P.set;"). 2702CompileAndVerify(source, expectedOutput: "C.M():B.M(), D.M():B.M()"). 2790CompileAndVerify(source, expectedOutput: $"A.P.get;C.P.set;C.P.get;B.P.set;{Environment.NewLine}A.P.get;B.P.set;D.P.get;B.P.set;"). 2873CompileAndVerify(source, expectedOutput: "C.M():B.M(), D.M():B.M()"). 2961CompileAndVerify(source, expectedOutput: $"B.P.get;C.P.set;C.P.get;B.P.set;{Environment.NewLine}B.P.get;D.P.set;D.P.get;B.P.set;"). 3006var compilation = CompileAndVerify(source, expectedOutput: "1System.Reflection.Missing"); 3033var compilation = CompileAndVerify(source, expectedOutput: "2147483647"); 3070var compilation = CompileAndVerify(source, expectedOutput: "42"); 3111var compilation = CompileAndVerify(source, expectedOutput: "0427"); 3165var compilation = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: "0427"); 3219var compilation = CompileAndVerify(source, expectedOutput: "042"); 3270var compilation = CompileAndVerify(source, expectedOutput: "123123123123123"); 3335var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: "222333"); 3389var compilation = CompileAndVerify(source, expectedOutput: "222333"); 3482var compilation = CompileAndVerify(source, expectedOutput: "03450"); 3566var compilation = CompileAndVerify(source, expectedOutput: "03450"); 3656var compilation = CompileAndVerify(source, expectedOutput: @" 3837var compilation = CompileAndVerify(source, expectedOutput: "hihi4242123123"); 3956var compilation = CompileAndVerify(source, expectedOutput: "D+BooSystem.Int32123"); 4044var compilation = CompileAndVerify(source, expectedOutput: "B ctor-D ctor"); 4111var compilation = CompileAndVerify(source, expectedOutput: @" 4214var compilation = CompileAndVerify(source, expectedOutput: @" 4272var compilation = CompileAndVerify(source, expectedOutput: @"abcdef"); 4315var verifier = CompileAndVerify(@" 4514var compilation = CompileAndVerify(source, expectedOutput: @"123"); 4570var compilation = CompileAndVerify(source, expectedOutput: @"0123401234"); 4678var compilation = CompileAndVerify(source, expectedOutput: @" 4720var compilation = CompileAndVerify(source, expectedOutput: @"012344321"); 4763var compilation = CompileAndVerify(source, expectedOutput: @"-100-11-1"); 4830var compilation = CompileAndVerify(source, expectedOutput: @"2 8 16 24 576 288"); 4915var compilation = CompileAndVerify(source, expectedOutput: @"True False True True"); 4982var compilation = CompileAndVerify(source, expectedOutput: @"-25 4294967295 1073741823"); 5048var compilation = CompileAndVerify(source, expectedOutput: @" 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()); 5311var compilation = CompileAndVerify(source, expectedOutput: @" 5448CompileAndVerify(source, expectedOutput: @" 5502var compilation = CompileAndVerify(source, expectedOutput: @"42123"); 5541var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5582var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5651CompileAndVerify(source, expectedOutput: @"1"). 5685var v = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"1"); 5789var compilation = CompileAndVerify(source, expectedOutput: @"1"); 5842var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5902var compilation = CompileAndVerify(source, expectedOutput: @"TrueTrueTrueTrueTrue"); 5962var compilation = CompileAndVerify(source, expectedOutput: @"12"); 5999var compilation = CompileAndVerify(source, expectedOutput: @"onetwo"); 6057var compilation = CompileAndVerify(source, expectedOutput: @"23"); 6103var compilation = CompileAndVerify(source, expectedOutput: @"onetwo"); 6142var compilation = CompileAndVerify(source, expectedOutput: @"A#A##"); 6195var compilation = CompileAndVerify(source, expectedOutput: @"12"); 6236var compilation = CompileAndVerify(source, expectedOutput: @"CurrentCultureIgnoreCaseInvariantCulture"); 6275var compilation = CompileAndVerify(source, expectedOutput: @"12"); 6366var compilation = CompileAndVerify(source, expectedOutput: @"BCDE2442"); 6439var compilation = CompileAndVerify(source, expectedOutput: @"hi"); 6576var compilation = CompileAndVerify(source, expectedOutput: @"hi"); 6793var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"3-5"); 6855var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"30"); 7066var compilation = CompileAndVerify(source, expectedOutput: @"0"); 7122var compilation = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: @"0"); 7172var compilation = CompileAndVerify(source, expectedOutput: @"123"); 7211var compilation = CompileAndVerify(source); 7249var compilation = CompileAndVerify(source); 7290var compilation = CompileAndVerify(source); 7328var compilation = CompileAndVerify(source, expectedOutput: @""); 7366var compilation = CompileAndVerify(source, expectedOutput: @"123"); 7406var compilation = CompileAndVerify(source, expectedOutput: @"Program+Shade 7491var compilation = CompileAndVerify(source, expectedOutput: @"2"); 7593var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @" 7692var compilation = CompileAndVerify(source, expectedOutput: "True6False"); 7743var compilation = CompileAndVerify(source, expectedOutput: "6"); 7803var compilation = CompileAndVerify(source, expectedOutput: @" 7876var compilation = CompileAndVerify(source, options: TestOptions.DebugExe.WithModuleName("MODULE")); 7972var compilation = CompileAndVerify(source, expectedOutput: "Hello"); 8033var compilation = CompileAndVerify(source, expectedOutput: @"224"); 8107var compilation = CompileAndVerify(source, expectedOutput: @"result=One,Two"); 8186var compilation = CompileAndVerify(source, expectedOutput: @"6"); 8280CompileAndVerify(source, expectedOutput: @" 8315CompileAndVerify(source).VerifyIL("C.M", @" 8392var compilation = CompileAndVerify(source, expectedOutput: @" 8478CompileAndVerify(source); 8506var compilation = CompileAndVerify(source, expectedOutput: @"first 8552var compilation = CompileAndVerify(source, expectedOutput: @"1 8626var compilation = CompileAndVerify(source, expectedOutput: @"2 8697var compilation = CompileAndVerify(source, expectedOutput: @"2 8743var compilation = CompileAndVerify(source, expectedOutput: @"2 8784var compilation = CompileAndVerify(source, expectedOutput: @"2 8863var compilation = CompileAndVerify(source, expectedOutput: @"2 8937var compilation = CompileAndVerify(source, expectedOutput: @"2 9006var compilation = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: @"2 9078var compilation = CompileAndVerify(source, expectedOutput: @"1"); 9123var compilation = CompileAndVerify(source, expectedOutput: @"42"); 9170var compilation = CompileAndVerify(source, expectedOutput: @"42", options: TestOptions.ReleaseDebugExe); 9220var compilation = CompileAndVerify(source, expectedOutput: @"42"); 9257CompileAndVerify(source). 9281CompileAndVerify(source). 9308CompileAndVerify(source); 9351CompileAndVerify(source, expectedOutput: ""). 9393CompileAndVerify(source, expectedOutput: "1"). 9433CompileAndVerify(source, expectedOutput: "-1"). 9509CompileAndVerify(source); 9546var compilation = CompileAndVerify(source, expectedOutput: @"M() Called!M() Called!"); 9595var compilation = CompileAndVerify(source, expectedOutput: @"123"); 9667var compilation = CompileAndVerify(source, expectedOutput: @"12"); 9786var compilation = CompileAndVerify(source, expectedOutput: @"6"); 9883var compilation = CompileAndVerify(source, expectedOutput: "0"). 10015var compilation = CompileAndVerify(source, expectedOutput: @"1"); 10045var comp = CompileAndVerify(source, expectedOutput: @"False"); 10102CompileAndVerify(source, expectedOutput: string.Empty); 10150CompileAndVerify(source, expectedOutput: string.Empty); 10176CompileAndVerify(source, expectedOutput: "0"); 10229CompileAndVerify(source, expectedOutput: "0"); 10264CompileAndVerify(source, expectedOutput: "0"); 10304CompileAndVerify(source, expectedOutput: "0"); 10337CompileAndVerify(source, expectedOutput: "0"); 10364CompileAndVerify(source, expectedOutput: "0"); 10386CompileAndVerify(source, expectedOutput: "Hello"); 10432CompileAndVerify(source, expectedOutput: expectedOutput); 10549CompileAndVerify(source); 10568var compilation = CompileAndVerify(source); 10610CompileAndVerify(source, expectedOutput: "0"); 10630CompileAndVerify(source); 10648CompileAndVerify(source, expectedOutput: @" 10680CompileAndVerify(source, expectedOutput: "1.00"); 10717var compilation = CompileAndVerify(source, expectedOutput: 10732var compilation = CompileAndVerify(source, expectedOutput: 11119var compilation = CompileAndVerify(source, expectedOutput: "101"); 11155var compilation = CompileAndVerify(source, expectedOutput: "99.9"); 11197var compilation = CompileAndVerify(source); 11220var compilation = CompileAndVerify(source, expectedOutput: "11"); 11253var compilation = CompileAndVerify(source, expectedOutput: @" 11286var compilation = CompileAndVerify(source, expectedOutput: @" 11318var compilation = CompileAndVerify(source, expectedOutput: @" 11337var compilation = CompileAndVerify(source, expectedOutput: "79228162514264337593543950335"); 11366var compilation = CompileAndVerify(source, expectedOutput: "79228162514264337593543950334-1"); 11422var compilation = CompileAndVerify(source, expectedOutput: @" 11489var compilation = CompileAndVerify(source, expectedOutput: @" 11564var compilation = CompileAndVerify(source, expectedOutput: @" 11685var compilation = CompileAndVerify(source, expectedOutput: @" 11716CompileAndVerify(source); 11730CompileAndVerify(source); 11755CompileAndVerify(source).VerifyIL("Test.Main", @" 11797CompileAndVerify(source2, new[] { new CSharpCompilationReference(compilation1) }).VerifyIL("Test.Main", @" 11827CompileAndVerify(source, new[] { TestReferences.SymbolsTests.Methods.CSMethods }).VerifyIL("Test.Main", @" 11868CompileAndVerify(source, expectedOutput: "Goo<System.String>(test3, test2)"); 11895var compilation = CompileAndVerify(source, expectedOutput: @"bye"); 11950var compilation = CompileAndVerify(source, expectedOutput: @"0"); 11987CompileAndVerify(source, expectedOutput: @"0"); 12013var compilation = CompileAndVerify(source, expectedOutput: @"1A"); 12045var compilation = CompileAndVerify(source, expectedOutput: @"1A"); 12086var compilation = CompileAndVerify(source, expectedOutput: "null;null;C1;"); 12117var compilation = CompileAndVerify(source, expectedOutput: @"1A"); 12146var compilation = CompileAndVerify(source, expectedOutput: @"00"); 12182var compilation = CompileAndVerify(source, expectedOutput: @"0"); 12211var compilation = CompileAndVerify(source, expectedOutput: @"0"); 12240CompileAndVerify(source); 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()); 12525var compilation = CompileAndVerify(source, expectedOutput: @"123"); 12583var compilation = CompileAndVerify(source, expectedOutput: @""); 12637var compilation = CompileAndVerify(source, expectedOutput: @"notequal1 12726CompileAndVerify(source).VerifyIL("SinkHelper.OnEvent", @" 12766var compilation = CompileAndVerify(source, expectedOutput: @"True 12851CompileAndVerify(source, expectedOutput: 12890CompileAndVerify(source, expectedOutput: 13007var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 13044var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 13064CompileAndVerify(source, sourceSymbolValidator: validator, symbolValidator: validator); 13115CompileAndVerify(source).VerifyIL("EdmFunction.SetFunctionAttribute", @" 13165CompileAndVerify(source, expectedOutput: @"hello 13223var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 13231CompileAndVerify( 13347var compilation = CompileAndVerify( 13435var comp = CompileAndVerify(code, expectedOutput: "5", options: TestOptions.DebugExe); 13455comp = CompileAndVerify(code, expectedOutput: "5", options: TestOptions.ReleaseExe); 13721CompileAndVerify(source, expectedOutput: "2").VerifyIL("S1.Prop1.get", @" 13777CompileAndVerify(source, expectedOutput: "1234").VerifyIL("Program.Main", @" 13858CompileAndVerify(source, expectedOutput: "IGoo"); 13912CompileAndVerify(source, expectedOutput: "D"); 13962var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"False 14041CompileAndVerify(source, expectedOutput: @"").VerifyIL("A.Main", 14164CompileAndVerify(source, expectedOutput: @"False 14244CompileAndVerify(source, expectedOutput: @"0 14304CompileAndVerify(source, expectedOutput: @"").VerifyIL("A.Main", 14359CompileAndVerify(source, expectedOutput: @"" 14441CompileAndVerify(source, expectedOutput: @"" 14518CompileAndVerify(source, expectedOutput: @"GooGooGoo"). 14686CompileAndVerify(source, expectedOutput: @"" 14729CompileAndVerify(source, expectedOutput: @"hello" 14805CompileAndVerify( 14930CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"" 14985var compilation = CompileAndVerify(source, expectedOutput: @"42 15040var compilation = CompileAndVerify(source, expectedOutput: @"42"); 15089var compilation = CompileAndVerify(source, expectedOutput: @"42"); 15135var compilation = CompileAndVerify(source, references: new[] { testReference }); 15177var compilation = CompileAndVerify(source, expectedOutput: "2"); 15231var compilation = CompileAndVerify(source, expectedOutput: "True"); 15277var compilation = CompileAndVerify(source, expectedOutput: "hi"); 15324var compilation = CompileAndVerify(source, expectedOutput: "o"); 15377var compilation = CompileAndVerify(source, expectedOutput: "hi"); 15462var compilation = CompileAndVerify(source, expectedOutput: ""); 16115var compilation = CompileAndVerify(source, expectedOutput: @" 16236CompileAndVerify(source, targetFramework: TargetFramework.NetFramework, expectedOutput: "0"); 16257var compilation = CompileAndVerify(source); 16796var verifier = CompileAndVerify(source, expectedOutput: "B"); 16835var verifier = CompileAndVerify(source, expectedOutput: "AB"); 16881var verifier = CompileAndVerify(source, expectedOutput: "3"); 16925var verifier = CompileAndVerify(source, expectedOutput: "Object[]AString[]B"); 16975var verifier = CompileAndVerify(source, expectedOutput: "2"); 17014CompileAndVerify(code).VerifyIL("Test2.M", @" 17027CompileAndVerify(@" 17069CompileAndVerify(@" 17097CompileAndVerify(@" 17129CompileAndVerify(@" 17161CompileAndVerify(@" 17241var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Skipped, expectedOutput: @""); 17280CompileAndVerify(source, expectedOutput: @"
CodeGen\CodeGenThrowTests.cs (9)
103var compilation = CompileAndVerify(source); 140var compilation = CompileAndVerify(source); 168var compilation = CompileAndVerify(source); 205var compilation = CompileAndVerify(source); 233var compilation = CompileAndVerify(source); 284CompileAndVerify(source, expectedOutput: "B"); 316CompileAndVerify(source, expectedOutput: "A"); 340var compilation = CompileAndVerify(source); 365var compilation = CompileAndVerify(source);
CodeGen\CodeGenTryFinally.cs (61)
46var compilation = CompileAndVerify(source); 118var compilation = CompileAndVerify(source); 201var compilation = CompileAndVerify(source, expectedOutput: "1, 3, 4, 1, 2, 3, "); 261var compilation = CompileAndVerify(source, expectedOutput: "before, catch, before, after,"); 319var compilation = CompileAndVerify(source, expectedOutput: ""); 387var compilation = CompileAndVerify(source, expectedOutput: ""); 462var compilation = CompileAndVerify(source, expectedOutput: "hellobyebye"); 547var compilation = CompileAndVerify(source); 634var compilation = CompileAndVerify(source); 701var compilation = CompileAndVerify(source); 765var compilation = CompileAndVerify(source); 834CompileAndVerify(source, expectedOutput: "Hi"); 865CompileAndVerify(source, expectedOutput: "Hi"); 901var compilation = CompileAndVerify(source, expectedOutput: ""); 980var compilation = CompileAndVerify(source, expectedOutput: 1072var compilation = CompileAndVerify(source, expectedOutput: @" 1161var compilation = CompileAndVerify(source, expectedOutput: @" 1268var compilation = CompileAndVerify(source, expectedOutput: @" 1387var compilation = CompileAndVerify(source, expectedOutput: @" 1524var compilation = CompileAndVerify(source, expectedOutput: @" 1657var compilation = CompileAndVerify(source, expectedOutput: @" 1791var compilation = CompileAndVerify(source, expectedOutput: @" 1917var compilation = CompileAndVerify(source); 2083var compilation = CompileAndVerify(source); 2290var comp = CompileAndVerify(src, 2384CompileAndVerify(src, expectedOutput: "TryCatch228Finally"). 2496var comp = CompileAndVerify(src, expectedOutput: "TryCatchS1Finally"); 2573var comp = CompileAndVerify(src); 2611var comp = CompileAndVerify(src); 2649var comp = CompileAndVerify(src); 2716var comp = CompileAndVerify(src, expectedOutput: "ExceptionFilter"); 2798var comp = CompileAndVerify(src, expectedOutput: "FinallyOuterCatch"); 2871var compilation = CompileAndVerify(source, expectedOutput: "M(0)=-4, M(1)=11, M(2)=6"); 2956var compilation = CompileAndVerify(source); 3028var compilation = CompileAndVerify(source, expectedOutput: 3067CompileAndVerify(source).VerifyDiagnostics( 3124CompileAndVerify(source); 3151var compilation = CompileAndVerify(source, expectedOutput: ""); 3212var compilation = CompileAndVerify(source, expectedOutput: "0"); 3266var compilation = CompileAndVerify(source, expectedOutput: "hello"); 3321var compilation = CompileAndVerify(source, expectedOutput: "0"); 3393var compilation = CompileAndVerify(source, expectedOutput: "0"); 3476var compilation = CompileAndVerify(source, expectedOutput: "0"); 3552var compilation = CompileAndVerify(source, expectedOutput: @"2 3629var compilation = CompileAndVerify(source, expectedOutput: @"2 3682var compilation = CompileAndVerify(source, expectedOutput: @""); 3730CompileAndVerify(source, expectedOutput: "", options: TestOptions.DebugExe); 3731CompileAndVerify(source, expectedOutput: "", options: TestOptions.ReleaseExe).VerifyIL("Program.Main", 3826var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "M1M4M1M2Catch", 3858verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "M1M4M1M2Catch", 3924var verifier = CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyDiagnostics(); 3956verifier = CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics(); 4085var verifier = CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyDiagnostics( 4103verifier = CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics( 4149var verifier = CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyDiagnostics( 4166verifier = CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics( 4212var verifier = CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyDiagnostics( 4230verifier = CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics( 4287CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyDiagnostics(expectedDiagnostics); 4288CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics(expectedDiagnostics); 4314CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyDiagnostics(
CodeGen\CodeGenTupleEqualityTests.cs (28)
193var comp = CompileAndVerify(source); 239var comp = CompileAndVerify(source); 280var comp = CompileAndVerify(source); 328var comp = CompileAndVerify(source, expectedOutput: "True False False"); 410var comp = CompileAndVerify(source, expectedOutput: "True"); 450var comp = CompileAndVerify(source, expectedOutput: "TrueFalse"); 493var comp = CompileAndVerify(source, expectedOutput: "FalseTrue"); 533var comp = CompileAndVerify(source, expectedOutput: "FalseTrue"); 569var comp = CompileAndVerify(source, expectedOutput: "True"); 629var comp = CompileAndVerify(source, expectedOutput: "1 == 1, 2 == 2, True"); 661var comp = CompileAndVerify(source, expectedOutput: "2 == 2, 2 == 2, True"); 676var comp = CompileAndVerify(source); 707var comp = CompileAndVerify(source); 3440CompileAndVerify(source, options: TestOptions.ReleaseExe).VerifyIL("C.Main", @"{ 3468CompileAndVerify(source, expectedOutput: "TrueFalse", options: TestOptions.ReleaseExe).VerifyIL("C.M", @"{ 3502CompileAndVerify(source, expectedOutput: "FalseTrue", options: TestOptions.ReleaseExe).VerifyIL("C.M", @"{ 3534CompileAndVerify(source, expectedOutput: "TrueFalse", options: TestOptions.ReleaseExe).VerifyIL("C.M", @"{ 3563CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe).VerifyIL("C.Main", @"{ 3591CompileAndVerify(source, expectedOutput: "TrueFalse", options: TestOptions.ReleaseExe).VerifyIL("C.M", @"{ 3620CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe).VerifyIL("C.Main", @"{ 5587var comp = CompileAndVerify(source, expectedOutput: "True"); 5606var comp = CompileAndVerify(source, expectedOutput: "False"); 5634var comp = CompileAndVerify(source, expectedOutput: "True"); 5662var comp = CompileAndVerify(source, expectedOutput: "True"); 5682var comp = CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics(); 5747var comp = CompileAndVerify(source, expectedOutput: "M11").VerifyDiagnostics(); 5799var comp = CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics(); 5879var comp = CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics();
CodeGen\CodeGenTupleTest.cs (181)
540CompileAndVerify(@" 721CompileAndVerify(@" 1032var comp = CompileAndVerify(source, expectedOutput: "{1, 2}"); 1216var comp = CompileAndVerify(source, expectedOutput: "2"); 1249var comp = CompileAndVerify(source, expectedOutput: "{, }"); 1282var comp = CompileAndVerify(source, expectedOutput: "{1, {2, {3, 4}}}"); 1326var comp = CompileAndVerify(source, expectedOutput: @"2 1372var comp = CompileAndVerify(source, expectedOutput: @"2 1418var comp = CompileAndVerify(source, expectedOutput: @"2 1464var comp = CompileAndVerify(source, expectedOutput: @"2 1518var comp = CompileAndVerify(source, expectedOutput: @"{1, hello, 2}"); 1638var comp = CompileAndVerify(source, expectedOutput: @"1 1656var comp = CompileAndVerify(source, expectedOutput: @"1 hello hello 3"); 1716var comp = CompileAndVerify(source, expectedOutput: @"1 hello 3"); 1748var comp = CompileAndVerify(source, expectedOutput: @"4"); 1805var comp = CompileAndVerify(source, expectedOutput: @"42"); 1843var comp = CompileAndVerify(source, expectedOutput: @"{42, 42}"); 1908var comp = CompileAndVerify(source, targetFramework: TargetFramework.Mscorlib46Extended, expectedOutput: @"42"); 1974var comp = CompileAndVerify(source, expectedOutput: @"42"); 2042var comp = CompileAndVerify(source, expectedOutput: @"42"); 2171var comp = CompileAndVerify(source, expectedOutput: 2213var verifier = CompileAndVerify(source, expectedOutput: @"42", options: TestOptions.ReleaseExe); 2333var verifier = CompileAndVerify(source, expectedOutput: @"{42, 42}", options: TestOptions.ReleaseExe); 2480var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Mscorlib46Extended, expectedOutput: @"42", options: TestOptions.ReleaseExe); 2622var verifier = CompileAndVerify(source, expectedOutput: @"42", options: TestOptions.ReleaseExe); 2764var verifier = CompileAndVerify(source, expectedOutput: @"42", options: TestOptions.ReleaseExe); 2881var comp = CompileAndVerify(source, 2925CompileAndVerify(source, expectedOutput: @"42", targetFramework: TargetFramework.Mscorlib46, options: TestOptions.ReleaseExe); 3080var comp = CompileAndVerify(source, expectedOutput: @"0 3194var verifier = CompileAndVerify(source, expectedOutput: @"1 2 3 4 5"); 3227var verifier = CompileAndVerify(source, expectedOutput: @"1 2 3 4 5 6 7 Alice 2 3 4 5", sourceSymbolValidator: validator); 3260var verifier = CompileAndVerify(source, expectedOutput: @"1 2 3 4 5 6 7 Alice 2 3 4 5", sourceSymbolValidator: validator); 3440var comp = CompileAndVerify(source, 3492var comp = CompileAndVerify(source, 3511var comp = CompileAndVerify(source, 3531var comp = CompileAndVerify(source, 3552CompileAndVerify(source, 3590CompileAndVerify(source, 3611var comp = CompileAndVerify(source, 3652var verifier = CompileAndVerify(source, expectedOutput: @"1 2 3 4 5 6 7 Alice 2 3 4 5 6 7 Bob 2 3", sourceSymbolValidator: validator); 3709var verifier = CompileAndVerify(source, sourceSymbolValidator: validator); 3945var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4029var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4050var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4084var verifier7_1 = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4130var verifier = CompileAndVerify(source, expectedOutput: @"1 4 7 Alice 7 Bob 3"); 4160var verifier = CompileAndVerify(source, expectedOutput: @"Alice 1", sourceSymbolValidator: validator); 4182var comp = CompileAndVerify(source, 4229var comp = CompileAndVerify(source, 4743var comp = CompileAndVerify(source, expectedOutput: @"5 3"); 4772var comp = CompileAndVerify(source, expectedOutput: @"1 7 8"); 4801var comp = CompileAndVerify(source, expectedOutput: @"5 3"); 4875var comp = CompileAndVerify(source, expectedOutput: @"5 3"); 4910var comp = CompileAndVerify(source, expectedOutput: @"CB CA CC"); 5240var comp = CompileAndVerify(source, 5296var comp = CompileAndVerify(source, 5322var comp = CompileAndVerify(source, 5349var comp = CompileAndVerify(source, 5374var comp = CompileAndVerify(source, 5397var comp = CompileAndVerify(source, 5590var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 5650var comp = CompileAndVerify(source, expectedOutput: "Item1: 2 Rest: (2, 2)", references: new[] { CSharpRef }); 5672var comp = CompileAndVerify(source, expectedOutput: "a:1, h:8, i:9, Item9:9, Rest:(8, 9)", references: new[] { CSharpRef }); 5696var comp = CompileAndVerify(source, expectedOutput: "done", references: new[] { CSharpRef }); 5731var comp = CompileAndVerify(source, expectedOutput: expectedOutput, references: new[] { CSharpRef }); 5782var comp = CompileAndVerify(source, expectedOutput: "12345678901234567890123456789012345"); 6995var comp = CompileAndVerify(source, expectedOutput: @" 7677var comp = CompileAndVerify(source, 7756var comp = CompileAndVerify(source, 7795var comp = CompileAndVerify(source, 7828var comp = CompileAndVerify(source, 7867var comp = CompileAndVerify(source, expectedOutput: @" 7901var comp = CompileAndVerify(source, 7933var comp = CompileAndVerify(source, expectedOutput: 7975var comp = CompileAndVerify(source, expectedOutput: @" 9397var comp = CompileAndVerify(source, 9436var comp = CompileAndVerify(source, 9473var comp = CompileAndVerify(source, 9510var comp = CompileAndVerify(source, 9544var comp = CompileAndVerify(source, 9582var comp = CompileAndVerify(source, 9618var comp = CompileAndVerify(source, expectedOutput: @" 9653var comp = CompileAndVerify(source, 9697var comp = CompileAndVerify(source, expectedOutput: @" 9748var comp = CompileAndVerify(source, expectedOutput: @" 9781var comp = CompileAndVerify(source, expectedOutput: @" 10163var comp = CompileAndVerify(source, 10200var comp = CompileAndVerify(source, 10299var comp = CompileAndVerify(source, 10332var comp = CompileAndVerify(source, 10792var comp = CompileAndVerify(source, 10825var comp = CompileAndVerify(source, 10855var comp = CompileAndVerify(source, 10885var comp = CompileAndVerify(source, 11009var comp = CompileAndVerify(source, 11343var comp = CompileAndVerify(source, 11723var comp = CompileAndVerify(source, 11862var comp = CompileAndVerify(source, 12139var comp = CompileAndVerify(source, 12674var comp = CompileAndVerify(source, expectedOutput: @"1 13960var comp = CompileAndVerify(source, 14206var comp = CompileAndVerify(source, 15092var comp = CompileAndVerify(source, 15156var comp = CompileAndVerify(source, 15710var comp = CompileAndVerify(source, 15782var comp = CompileAndVerify(source, 15997var comp = CompileAndVerify(source, expectedOutput: 16642var comp = CompileAndVerify(source, 16661var comp = CompileAndVerify(source, 16687var comp = CompileAndVerify(source, expectedOutput: "(1, Alice, 2, Brenda, 3, Chloe, 4, Dylan)"); 16709var comp = CompileAndVerify(source, expectedOutput: "1 1 (8) 8 8"); 17525var comp = CompileAndVerify(source, expectedOutput: @" 17574var comp = CompileAndVerify(source, expectedOutput: @" 17614var comp = CompileAndVerify(source, 17703var comp = CompileAndVerify(source, 17792var comp = CompileAndVerify(source, 17832var comp = CompileAndVerify(source, 17892var comp = CompileAndVerify(source, 18020var comp = CompileAndVerify(source, 18078var comp = CompileAndVerify(source, 18287var comp = CompileAndVerify(source, expectedOutput: @" 18319var comp = CompileAndVerify(source, expectedOutput: @" 18343var comp = CompileAndVerify(source, expectedOutput: @" 18413var comp = CompileAndVerify(source, expectedOutput: @" 18483var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: @" 18598var comp = CompileAndVerify(source, expectedOutput: @" 18706var comp = CompileAndVerify(source, 18739var comp = CompileAndVerify(source, 18777var comp = CompileAndVerify(source, 21451var comp = CompileAndVerify(source, 21478var comp = CompileAndVerify(source, 21502var comp = CompileAndVerify(source, 21544var comp = CompileAndVerify(source, 21586var comp = CompileAndVerify(source, 21628var comp = CompileAndVerify(source, 21670var comp = CompileAndVerify(source, 21705var comp = CompileAndVerify(source, 21750var comp = CompileAndVerify(source, 21788var comp = CompileAndVerify(source, 22141var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Mscorlib46, expectedOutput: @"5", options: TestOptions.ReleaseExe); 22846CompileAndVerify(source, 23297var comp = CompileAndVerify(source); 23335var comp = CompileAndVerify(source, 23446var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libComp.ToMetadataReference() }, options: TestOptions.DebugExe, verify: Verification.Fails); 23544var comp = CompileAndVerify(source, 23584var comp = CompileAndVerify(source, 23628var comp = CompileAndVerify(source, 23663var comp = CompileAndVerify(source, 23694var comp = CompileAndVerify(source, 23740var comp = CompileAndVerify(source, 23901var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libCompRef }, options: TestOptions.DebugExe, verify: Verification.Passes); 23961var comp = CompileAndVerify(source, 25124var comp = CompileAndVerify(source, 25158var comp = CompileAndVerify(source, 25616var comp = CompileAndVerify(source, 25645comp = CompileAndVerify(source, 25941var comp = CompileAndVerify(source, expectedOutput: "24"); 25960var comp = CompileAndVerify(source, expectedOutput: "4"); 25984var comp = CompileAndVerify(source, 26009var comp = CompileAndVerify(source, 26035var comp = CompileAndVerify(source, 26061var comp = CompileAndVerify(source, 26084var comp = CompileAndVerify(source, 26105var comp = CompileAndVerify(source, 26152var comp = CompileAndVerify(source, 26174var comp = CompileAndVerify(source, expectedOutput: "3"); 28958var comp = CompileAndVerify($@" 29096var verifier = CompileAndVerify(source + trivial2uple, expectedOutput: 29179var verifier = CompileAndVerify(source, options: TestOptions.ReleaseDll); 29229var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 29352var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 29457var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 29510CompileAndVerify(source, expectedOutput: "43"); 29521CompileAndVerify(source, expectedOutput: "(1, 2, 3)"); 29532CompileAndVerify(source, expectedOutput: "(2, 3)"); 29573var verifier = CompileAndVerify(source, expectedOutput: "(2, 3, 1)"); 29587verifier = CompileAndVerify(source, expectedOutput: "(2, 3, 1)"); 29666var verifier = CompileAndVerify(source, expectedOutput: "(2, 3, 4, 5, 6, 7, 8, 9, 1)"); 29692verifier = CompileAndVerify(source, expectedOutput: "(2, 3, 4, 5, 6, 7, 8, 9, 1)"); 29746var verifier = CompileAndVerify(source, expectedOutput: """ 29779verifier = CompileAndVerify(source, expectedOutput: """
CodeGen\CodeGenTypeofTests.cs (13)
30var comp = CompileAndVerify(source, expectedOutput: "C"); 77var comp = CompileAndVerify(source, expectedOutput: @" 150var comp = CompileAndVerify(source, expectedOutput: @" 207var comp = CompileAndVerify(source, expectedOutput: @" 259var comp = CompileAndVerify(source, expectedOutput: @" 332var comp = CompileAndVerify(source, expectedOutput: expected); 391var comp = CompileAndVerify(source, expectedOutput: expected); 436var comp = CompileAndVerify(source, expectedOutput: ""); 462var comp = CompileAndVerify(source, expectedOutput: @" 532var comp = CompileAndVerify(source, expectedOutput: @" 618var comp = CompileAndVerify(source, expectedOutput: @" 660CompileAndVerify(source, expectedOutput: @"TestClass`1+TestEnum[System.String]"); 683CompileAndVerify(source, expectedOutput: @"True");
CodeGen\CodeGenUsingDeclarationTests.cs (17)
31CompileAndVerify(source).VerifyIL("C2.Main", @" 77CompileAndVerify(source).VerifyIL("C2.Main", @" 120CompileAndVerify(source).VerifyIL("C2.Main", @" 164CompileAndVerify(source).VerifyIL("C2.Main", @" 207CompileAndVerify(source).VerifyIL("C2.Main", @" 263CompileAndVerify(source).VerifyIL("C2.Main", @" 322CompileAndVerify(source).VerifyIL("C2.Main", @" 383CompileAndVerify(source, expectedOutput: "Dispose; Dispose; Dispose; ").VerifyIL("C2.Main", @" 464CompileAndVerify(source, expectedOutput: "Start; Middle1; Middle2; End; Dispose; Dispose; Dispose; ").VerifyIL("C2.Main", @" 553CompileAndVerify(source, expectedOutput: "Dispose Try; Dispose Catch; Dispose Finally; ").VerifyIL("C2.Main", @" 713CompileAndVerify(source, expectedOutput: output).VerifyIL("Program.Main", @" 768CompileAndVerify(source, expectedOutput: output).VerifyIL("Program.Main", @" 840CompileAndVerify(source).VerifyIL("C2.Main", @" 910CompileAndVerify(source, expectedOutput: output).VerifyIL("C2.Main", @" 985CompileAndVerify(source, expectedOutput: output).VerifyIL("C2.Main", @" 1063CompileAndVerify(source, expectedOutput: output).VerifyIL("C2.Main", @" 1137CompileAndVerify(source, expectedOutput: "Dispose; ");
CodeGen\CodeGenUsingStatementTests.cs (52)
71var verifier = CompileAndVerify(text, expectedOutput: @"Before 108var verifier = CompileAndVerify(text, expectedOutput: @"Before 144var verifier = CompileAndVerify(text, expectedOutput: @"Before 198var verifier = CompileAndVerify(text, expectedOutput: @"Before 274var verifier = CompileAndVerify(text, expectedOutput: expected); 330var verifier = CompileAndVerify(text, expectedOutput: @"Creating A 382var verifier = CompileAndVerify(text, expectedOutput: @"Before 419var verifier = CompileAndVerify(text, expectedOutput: @"Before 455var verifier = CompileAndVerify(text, expectedOutput: @"Before 509var verifier = CompileAndVerify(text, expectedOutput: @"Before 585var verifier = CompileAndVerify(text, expectedOutput: expected); 641var verifier = CompileAndVerify(text, expectedOutput: @"Creating A 693var verifier = CompileAndVerify(text, expectedOutput: @"Before 781var verifier = CompileAndVerify(text, expectedOutput: @"Before 867var verifier = CompileAndVerify(text, expectedOutput: @"Before 939var verifier = CompileAndVerify(text, expectedOutput: @"Before 980CompileAndVerify(text, expectedOutput: "12"); 1007CompileAndVerify(source).VerifyIL("Program.Main", @" 1060CompileAndVerify(source, expectedOutput: "S1.Dispose()").VerifyIL("C2.Main()", @" 1108CompileAndVerify(source, expectedOutput: "S1.Dispose()").VerifyIL("C2.Main()", @" 1193CompileAndVerify(source, expectedOutput: "S1.Dispose()").VerifyIL("C3.Main()", @" 1299CompileAndVerify(source).VerifyIL("Program.Main", @" 1351CompileAndVerify(source).VerifyIL("Program.Main", @" 1543CompileAndVerify(source).VerifyIL("Program.goo", @" 1587CompileAndVerify(source).VerifyIL("Program.Main", @" 1633CompileAndVerify(source).VerifyIL("Program.goo", @" 1677CompileAndVerify(source).VerifyIL("Program.Main", @" 1724CompileAndVerify(source).VerifyIL("Program.Main", @" 1775CompileAndVerify(source).VerifyIL("Program.Main", @" 1827CompileAndVerify(source, expectedOutput: "InUsing").VerifyIL("Program.Main", @" 1876CompileAndVerify(source, expectedOutput: "").VerifyIL("Program.Main", @" 1926CompileAndVerify(source, expectedOutput: @"InUsing 1975CompileAndVerify(source, expectedOutput: "Dispose").VerifyIL("Program.Main", @" 2041var comp = CompileAndVerify(source, expectedOutput: @"InUsing"); 2097var comp = CompileAndVerify(source, expectedOutput: ""); 2165var comp = CompileAndVerify(source, expectedOutput: expected); 2236CompileAndVerify(source, expectedOutput: @"1:Dispose 2304CompileAndVerify(source).VerifyIL("Program.Main", @" 2354CompileAndVerify(source).VerifyIL("Program.Main", @" 2409CompileAndVerify(source).VerifyIL("Program.Main", @" 2477CompileAndVerify(source).VerifyIL("Program.Main", @" 2601CompileAndVerify(source).VerifyIL("Program.Main", @" 2830var comp = CompileAndVerify(source, expectedOutput: @""); 2890CompileAndVerify(source, expectedOutput: @"Try 2958CompileAndVerify(source, expectedOutput: @"Try 3026CompileAndVerify(source, expectedOutput: "5"); 3059CompileAndVerify(source, expectedOutput: "0"); 3097CompileAndVerify(source, expectedOutput: "0"); 3126var verifier = CompileAndVerify(source, expectedOutput: "12"); 3168CompileAndVerify(source, targetFramework: TargetFramework.Net70, 3200CompileAndVerify(source, targetFramework: TargetFramework.Net70, 3238CompileAndVerify(source, targetFramework: TargetFramework.Net70,
CodeGen\CompoundAssignmentForDelegate.cs (22)
69CompileAndVerify(text, expectedOutput: "5").VerifyIL("C.Main", expectedIL); 100CompileAndVerify(text, expectedOutput: expectedOutput); 141CompileAndVerify(text).VerifyIL("C.Main", expectedIL); 181CompileAndVerify(text, expectedOutput: expectedOutput); 205CompileAndVerify(text, expectedOutput: "10").VerifyIL("C.Main", @" 261CompileAndVerify(text, expectedOutput: "Hello").VerifyIL("C.Main()", @" 322CompileAndVerify(text, expectedOutput: expectedOutPut); 353CompileAndVerify(text, expectedOutput: expectedOutPut); 390CompileAndVerify(text, expectedOutput: expectedOutPut); 436CompileAndVerify(text, expectedOutput: expectedOutPut); 471CompileAndVerify(text, expectedOutput: expectedOutPut); 508CompileAndVerify(text, expectedOutput: expectedOutPut); 542CompileAndVerify(text, expectedOutput: expectedOutPut); 583CompileAndVerify(text, expectedOutput: expectedOutPut); 613CompileAndVerify(text, expectedOutput: expectedOutPut); 667CompileAndVerify(text, expectedOutput: expectedOutPut).VerifyIL("C.Main", expectedIL); 714CompileAndVerify(text, expectedOutput: expectedOutPut); 748CompileAndVerify(text, expectedOutput: expectedOutPut); 794CompileAndVerify(text, expectedOutput: expectedOutPut); 851CompileAndVerify(text, expectedOutput: expectedOutPut); 913CompileAndVerify(text, expectedOutput: expectedOutPut); 970CompileAndVerify(text, expectedOutput: expectedOutPut);
CodeGen\DestructorTests.cs (11)
51var compVerifier = CompileAndVerify(text, 105var compVerifier = CompileAndVerify(text, 164var compVerifier = CompileAndVerify(text, 250var compVerifier = CompileAndVerify(text, 351var compVerifier = CompileAndVerify(text, 406var compVerifier = CompileAndVerify(text, 463var compVerifier = CompileAndVerify(text, 498var compVerifier = CompileAndVerify(text); 624CompileAndVerify(text, sourceSymbolValidator: validator, symbolValidator: validator); 740CompileAndVerify(text).VerifyIL("B.Finalize", @" 769CompileAndVerify(text, assemblyValidator: (assembly) =>
CodeGen\EventTests.cs (10)
36var compVerifier = CompileAndVerify(text, 70var compVerifier = CompileAndVerify(text, 100var compVerifier = CompileAndVerify(text, 163var compVerifier = CompileAndVerify(text, 268CompileAndVerify(text).VerifyIL("C.M", @" 336CompileAndVerify(text).VerifyIL("C.M", @" 396CompileAndVerify(text).VerifyIL("D.M", @" 434var compVerifier = CompileAndVerify(text, 515CompileAndVerify(text, expectedOutput: @" 578CompileAndVerify(text, expectedOutput: @"
CodeGen\FixedSizeBufferTests.cs (16)
26var verifier = CompileAndVerify(@" 115CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 176CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Passes) 230CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Passes) 284CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Passes) 448CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 516CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 581var comp1 = CompileAndVerify(s1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).Compilation; 583var comp2 = (CSharpCompilation)CompileAndVerify(s2, 619CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 770CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "133", verify: Verification.Fails) 990CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes, 1022CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes, 1040CompileAndVerify(@" 1091var verifier = CompileAndVerify(@" 1120var verifier = CompileAndVerify(@"
CodeGen\ForeachTest.cs (30)
48CompileAndVerify(text, expectedOutput: expectedOutput); 54CompileAndVerify(@" 123CompileAndVerify(text, expectedOutput: expectedOutput); 162CompileAndVerify(text).VerifyIL("C.Main", expectedIL); 224CompileAndVerify(text).VerifyIL("C.Main", expectedIL); 250CompileAndVerify(text, expectedOutput: expectedOutput); 308CompileAndVerify(text).VerifyIL("Test.Main", expectedIL); 941CompileAndVerify(text, expectedOutput: expectedOutput); 960CompileAndVerify(text, expectedOutput: expectedOutput); 985CompileAndVerify(text, expectedOutput: expectedOutput); 1026CompileAndVerify(text).VerifyIL("Test.Main", expectedIL); 1055CompileAndVerify(text, expectedOutput: expectedOutput); 1084CompileAndVerify(text, expectedOutput: expectedOutput); 1116CompileAndVerify(text, expectedOutput: expectedOutput); 1146CompileAndVerify(text, expectedOutput: expectedOutput); 1173CompileAndVerify(text, expectedOutput: expectedOutput); 1199CompileAndVerify(text, expectedOutput: expectedOutput); 1251CompileAndVerify(text).VerifyIL("Test.Main", expectedIL); 1273CompileAndVerify(text, new[] { CSharpRef }, expectedOutput: expectedOutput); 1298CompileAndVerify(text, expectedOutput: expectedOutput); 1323CompileAndVerify(text, expectedOutput: expectedOutput); 1371CompileAndVerify(text, expectedOutput: expectedOutput); 1443CompileAndVerify(text, expectedOutput: expectedOutput); 1471CompileAndVerify(text, expectedOutput: expectedOutput); 1496CompileAndVerify(text, expectedOutput: expectedOutput); 1528CompileAndVerify(text, expectedOutput: expectedOutput); 1557CompileAndVerify(text, expectedOutput: expectedOutput); 1583CompileAndVerify(source, expectedOutput: "5"); 1618CompileAndVerify(source, expectedOutput: "0"); 1654CompileAndVerify(source, expectedOutput: "0");
CodeGen\ForLoopsTests.cs (44)
35var compilation = CompileAndVerify(source, expectedOutput: "81"); 87var compilation = CompileAndVerify(source, expectedOutput: "1, 1"); 144var compilation = CompileAndVerify(source, expectedOutput: "1, 0"); 188var compilation = CompileAndVerify(source, expectedOutput: "0, 0"); 235var compilation = CompileAndVerify(source, expectedOutput: "5, 3, 4, 4"); 318var compilation = CompileAndVerify(source, expectedOutput: "6"); 363var compilation = CompileAndVerify(source, expectedOutput: "6"); 438CompileAndVerify(text). 475CompileAndVerify(text). 512CompileAndVerify(text). 529CompileAndVerify(text).VerifyIL("C.Main", @"{ 595CompileAndVerify(text). 649CompileAndVerify(text). 702CompileAndVerify(text). 726var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 824CompileAndVerify(text, expectedOutput: "1234"). 882CompileAndVerify(text). 907var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 961var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 1040CompileAndVerify(text). 1085CompileAndVerify(text). 1123CompileAndVerify(text). 1179CompileAndVerify(text). 1221CompileAndVerify(text). 1247CompileAndVerify(text). 1265var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 1309CompileAndVerify(text). 1360CompileAndVerify(text). 1414CompileAndVerify(text). 1450CompileAndVerify(text). 1502CompileAndVerify(text). 1546CompileAndVerify(text, references: new MetadataReference[] { CSharpRef }, expectedOutput: @"Initialize 1591CompileAndVerify(text). 1621var comp = CompileAndVerify(text, expectedOutput: @"1 1657var comp = CompileAndVerify(text, expectedOutput: @"1 1681CompileAndVerify(text, expectedOutput: @"1 1706var comp = CompileAndVerify(text, expectedOutput: @"1 1749CompileAndVerify(text). 1791CompileAndVerify(text). 1813var comp = CompileAndVerify(text, expectedOutput: @"1 1836var comp = CompileAndVerify(text, expectedOutput: @"1 1863var comp = CompileAndVerify(text, expectedOutput: @"-1 1895CompileAndVerify(text). 1916var c = CompileAndVerify(text, options: TestOptions.DebugExe);
CodeGen\GotoTest.cs (21)
41CompileAndVerify(source, expectedOutput: expectedOutput); 66CompileAndVerify(source, expectedOutput: expectedOutput); 96CompileAndVerify(text).VerifyIL("C.Main", @" 148CompileAndVerify(text).VerifyIL("C.Main", @" 187CompileAndVerify(text).VerifyIL("C.Main", @" 223var c = CompileAndVerify(text); 261CompileAndVerify(text).VerifyIL("C.Main", @" 288CompileAndVerify(text).VerifyDiagnostics().VerifyIL("C.Main", @" 319var c = CompileAndVerify(text); 360var c = CompileAndVerify(text); 394var c = CompileAndVerify(text, expectedOutput: @"a 450CompileAndVerify(text).VerifyIL("C.Main", @" 504var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 535CompileAndVerify(text).VerifyIL("C.Main", @" 693CompileAndVerify(text).VerifyIL("C.Main", @" 743CompileAndVerify(text, expectedOutput: @" 773CompileAndVerify(text, expectedOutput: @" 818CompileAndVerify(text, expectedOutput: expectedOutput); 840CompileAndVerify(text); 876CompileAndVerify(text, expectedOutput: "Catch"); 912CompileAndVerify(text, expectedOutput: "Catch");
CodeGen\IndexerTests.cs (21)
32var compVerifier = CompileAndVerify(text, 51var compVerifier = CompileAndVerify(text, 69var compVerifier = CompileAndVerify(text, 87var compVerifier = CompileAndVerify(text, 106var compVerifier = CompileAndVerify(text, 125var compVerifier = CompileAndVerify(text, 171var compVerifier = CompileAndVerify(text, symbolValidator: validator, expectedSignatures: new[] 193var compVerifier = CompileAndVerify(text, 217var compVerifier = CompileAndVerify(text, 241var compVerifier = CompileAndVerify(text, 378CompileAndVerify(text, expectedOutput: @" 423var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 527CompileAndVerify(text, expectedOutput: @" 571var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 675var compVerifier = CompileAndVerify(text, expectedOutput: @" 719var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 888CompileAndVerify(text, expectedOutput: @" 944var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 1091CompileAndVerify(text, expectedOutput: @" 1110var verifier = CompileAndVerify(text, expectedOutput: @"2"); 1178CompileAndVerify(text, expectedOutput:
CodeGen\ObjectAndCollectionInitializerTests.cs (45)
38var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 79var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 134var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 191var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 244var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 289var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 328var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 371var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 434var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 517var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 585var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 668var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 756var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 813var compVerifier = CompileAndVerify(source, expectedOutput: ""); 851var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 894var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 951var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1041var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1326var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1429CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: expectedOutput); 1522var compVerifier = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 1660var compVerifier = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 1873var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1988var compVerifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: expectedOutput); 2044var compVerifier = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 2100var compVerifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: expectedOutput); 2119CompileAndVerify(source, expectedOutput: "1 2").VerifyIL("C.Main", @" 2168CompileAndVerify(source, expectedOutput: "1 2 3 4").VerifyIL("C.Main", @" 2259CompileAndVerify(source, expectedOutput: "1 2").VerifyIL("C.Main", @" 2324CompileAndVerify(source, expectedOutput: "1 2").VerifyIL("C.Main", @" 2397var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2455var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2537var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2641var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2727var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2824var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2909var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3002var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3115var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3210var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3303var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3425var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3483CompileAndVerify(source).VerifyIL("C.Main", @" 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 (15)
54CompileAndVerify(source, expectedOutput: "stringH"); 82CompileAndVerify(source, expectedOutput: @"2"); 2103var verifier = CompileAndVerify(source); 3473var v = CompileAndVerify(source, options: TestOptions.DebugExe); 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: 6195var verifier = CompileAndVerify(source, expectedOutput: "012323", options: TestOptions.DebugExe); 6280var verifier = CompileAndVerify(source, expectedOutput: " 0 1 2 3 2 3", options: TestOptions.DebugExe); 6369var verifier = CompileAndVerify(source, expectedOutput: "0123452345", options: TestOptions.DebugExe); 6465var verifier = CompileAndVerify(source, expectedOutput: "0123233", options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview); 6550var verifier = CompileAndVerify(source, options: TestOptions.DebugDll); 6650var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "012"); 6745var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 6852var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "System.ActionSystem.Action");
CodeGen\SwitchTests.cs (103)
42var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 80var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 118var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 156var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 191var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 240var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 313var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 376var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 429var compVerifier = CompileAndVerify(text, expectedOutput: "1", options: TestOptions.DebugExe); 493var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 543var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 590var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 641var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 705var compVerifier = CompileAndVerify(text, expectedOutput: "4"); 796var compVerifier = CompileAndVerify(text, expectedOutput: "4"); 902var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 955var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 1003var compVerifier = CompileAndVerify(text, expectedOutput: "1"); 1067var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1154var compVerifier = CompileAndVerify(text, expectedOutput: "194"); 1243var compVerifier = CompileAndVerify(text, expectedOutput: "maxminonedefault"); 1312var compVerifier = CompileAndVerify(text, expectedOutput: "42"); 1408var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1512var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1604var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1651var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1700var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1766var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1809var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1863var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 1973var compVerifier = CompileAndVerify(text, expectedOutput: expectedOutput); 2110var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 2197var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 2269CompileAndVerify(text, expectedOutput: ""); 2309var verifier = CompileAndVerify(text, expectedOutput: "null 1"); 2432var verifier = CompileAndVerify(text, expectedOutput: "null default 100 default "); 2582var compVerifier = CompileAndVerify(text, expectedOutput: "True"); 2684var compVerifier = CompileAndVerify(text, expectedOutput: "True"); 2740var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 2801var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 2899var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), 3046compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: "True"); 3348var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), 3673compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: "PASS"); 4032var compVerifier = CompileAndVerify(text, expectedOutput: "1", parseOptions: TestOptions.RegularPreview.WithDisableLengthBasedSwitch()); 4036compVerifier = CompileAndVerify(text, expectedOutput: "1"); 4125var verifier = CompileAndVerify(source, expectedOutput: @"0"); 4166CompileAndVerify(text, expectedOutput: "Pass"); 4216CompileAndVerify(text, expectedOutput: "Pass"); 4258CompileAndVerify(text, expectedOutput: "Pass"); 4300CompileAndVerify(text, expectedOutput: "Pass"); 4337CompileAndVerify(text, expectedOutput: "0"); 4374CompileAndVerify(text, expectedOutput: "1"); 4417CompileAndVerify(text, expectedOutput: "1"); 4460CompileAndVerify(text, expectedOutput: "1"); 5991var compVerifier = CompileAndVerify(text); 7161var compVerifier = CompileAndVerify(text, parseOptions: TestOptions.RegularPreview.WithDisableLengthBasedSwitch(), expectedOutput: "3"); 7330var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7416var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7518var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7578var compVerifier = CompileAndVerify(text); 7622var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7671var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7721var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7760var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 7801var compVerifier = CompileAndVerify(text, expectedOutput: "0"); 8475var compVerifier = CompileAndVerify(text, expectedOutput: ""); 8523var compVerifier = CompileAndVerify(text, expectedOutput: ""); 8569var compVerifier = CompileAndVerify(text, expectedOutput: ""); 8619var compVerifier = CompileAndVerify(text, expectedOutput: ""); 8677var compVerifier = CompileAndVerify(text, expectedOutput: "In DEFAULT case"); 8756var compVerifier = CompileAndVerify(text, expectedOutput: "In DEFAULT case"); 8795var compVerifier = CompileAndVerify(source, 8808compVerifier = CompileAndVerify(source, 8862var compVerifier = CompileAndVerify(source, 8881compVerifier = CompileAndVerify(source, 8938var compVerifier = CompileAndVerify(source, 8951compVerifier = CompileAndVerify(source, 9002var compVerifier = CompileAndVerify(source, 9021compVerifier = CompileAndVerify(source, 9076var compVerifier = CompileAndVerify(source, 9092compVerifier = CompileAndVerify(source, 9149var compVerifier = CompileAndVerify(source, 9166compVerifier = CompileAndVerify(source, 9224var compVerifier = CompileAndVerify(source, 9241compVerifier = CompileAndVerify(source, 9299var compVerifier = CompileAndVerify(source, 9318compVerifier = CompileAndVerify(source, 9368var compVerifier = CompileAndVerify(source, 9384compVerifier = CompileAndVerify(source, 9449var compVerifier = CompileAndVerify(source, 9475compVerifier = CompileAndVerify(source, 9580var compVerifier = CompileAndVerify(source, 9624compVerifier = CompileAndVerify(source, 9722var compVerifier = CompileAndVerify(source, 9773var compVerifier = CompileAndVerify(source, 9828var compVerifier = CompileAndVerify(source, 10169var compVerifier = CompileAndVerify(source, 10243compVerifier = CompileAndVerify(source, 11027var compVerifier = CompileAndVerify(source, 11285var compVerifier = CompileAndVerify(source, 11543var compVerifier = CompileAndVerify(source, 11972var compVerifier = CompileAndVerify(source,
CodeGen\UnsafeTests.cs (205)
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); 552var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"Before: 2 7 599var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"ab", verify: Verification.Fails); 647var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 685CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeDebugDll).VerifyIL("C.M", """ 699CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.M", """ 731CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeDebugDll).VerifyIL("C.M", """ 752CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.M", """ 781CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeDebugDll).VerifyIL("C.M1", """ 797CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.M1", """ 829CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeDebugDll).VerifyIL("C.M1", """ 847CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.M1", """ 876CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeDebugDll).VerifyIL("C.M", """ 891CompileAndVerify(source, verify: Verification.Fails, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.M", """ 921CompileAndVerify(source, options: TestOptions.DebugDll).VerifyIL("C.M", """ 935CompileAndVerify(source, options: TestOptions.ReleaseDll).VerifyIL("C.M", """ 970var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 988compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 1028var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1052compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1103var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1125compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1179var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1202compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1246var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1284compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1360var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1480var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1524var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @" 1553var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "210", verify: Verification.Fails); 1573var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @" 1614var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1672var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1730var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1800var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1862var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 1935var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 2001var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"a", verify: Verification.Fails); 2046var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"a", verify: Verification.Fails); 2090var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"h", verify: Verification.Fails); 2147var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"hTrue", verify: Verification.Fails); 2232var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"hTrue", verify: Verification.Fails); 2303var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2371var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2439var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2510var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"970104", verify: Verification.Fails); 2601CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2663CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2726CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2782CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2843CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2904CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2964CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3040CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3124CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3254CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3305CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3370CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3454CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3534CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3590CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3635CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3689CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3739CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3791CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3845CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3898CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3952CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4002CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4052CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4101CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4141CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4182CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4240CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4304CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4371CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4433var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4493var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4581var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"0", verify: Verification.Fails); 4632var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4694var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4934var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"20", verify: Verification.Fails); 5008var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 5068var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 5160var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2123 5249var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 5309var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"23", verify: Verification.Fails); 5387var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 5815var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @""); 5942var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"00", verify: Verification.Fails); 6144CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6145CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6195CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6196CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6232CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 6322CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 6412CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify).VerifyIL("C.M", @" 6502CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify).VerifyIL("C.M", @" 6643CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6644CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6706CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6707CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6813CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL, sequencePoints: "C.Main"); 6814CompileAndVerify(string.Format(template, "checked "), options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL, sequencePoints: "C.Main"); 6870CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6871CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6912CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6913CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6981CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 6982CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyIL("C.M", expectedIL); 7036CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails).VerifyIL("C.Main", @" 7099CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1234", verify: Verification.FailsPEVerify).VerifyIL("C.Main", @" 7260CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @" 7347CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @" 7389CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes).VerifyIL("C.Main", @" 7432CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7497CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7562CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7627CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7697CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails).VerifyIL("C.Test", @" 7805var comp = CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails); 7973CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2147483651 8059CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @" 8123CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @" 8182CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "I0", verify: Verification.Fails).VerifyIL("S.Main", @" 8250CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "8", verify: Verification.Fails).VerifyIL("S.Main", @" 8357CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("S.Main", @" 8424CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "44", verify: Verification.Fails).VerifyIL("S.Main", @" 8482CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @" 8538CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @" 8597CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "01", verify: Verification.Fails).VerifyIL("S.Main", @" 8652CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "2", verify: Verification.Fails); 9050CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9151CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9186CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: expectedOutput); 9221CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9230CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9257CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9321CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9368CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9398CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Passes, expectedOutput: @" 9448CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Passes); 9486CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9527CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9636CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9737CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9772CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9807CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9864CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9921CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9968CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 10012CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 10060CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "011010011010", verify: Verification.Fails).VerifyIL("S.Main", @" 10140var verifier = CompileAndVerify(@" 10184var verifier = CompileAndVerify(@" 10289CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 10346CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 10383CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify).VerifyIL("C.M", @" 10429CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"123 10470var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 10543CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @" 10566CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @" 10616var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10691CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 10749CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify); 10773CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Passes); 10960CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.Test", @" 11044CompileAndVerify(string.Format(template, "int"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 11045CompileAndVerify(string.Format(template, "int*"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 11046CompileAndVerify(string.Format(template, "int**"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 11047CompileAndVerify(string.Format(template, "int[]"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 11048CompileAndVerify(string.Format(template, "int[][]"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 11049CompileAndVerify(string.Format(template, "int*[]"), options: TestOptions.UnsafeReleaseExe, expectedOutput: @"True", verify: Verification.Passes); 11083CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.FailsPEVerify with 11103var c = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify with 11125var c = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify with 11203CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes).VerifyDiagnostics( 11226var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyDiagnostics(); 11279var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics(); 11346CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "b", verify: Verification.Fails); 11390var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "hello", verify: Verification.Fails); 11459var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 11539var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 11591var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll.WithConcurrentBuild(false), verify: Verification.Passes); 11615var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll.WithConcurrentBuild(false), verify: Verification.FailsPEVerify); 11655var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11701var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11750var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11792var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F654320F", verify: Verification.Fails); 11835var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Passes); 11889var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 11962var v = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 12108CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "OK", verify: Verification.Passes); 12133var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.FailsPEVerify); 12165var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0");
CodeGen\WinMdDelegateTests.cs (2)
52var verifier = CompileAndVerify( 274var comp = CompileAndVerify(
Emit\CompilationEmitTests.cs (23)
923CompileAndVerify("", emitOptions: emitRefAssembly, assemblyValidator: assemblyValidator); 966CompileAndVerify(source, emitOptions: emitRefAssembly, assemblyValidator: assemblyValidator); 2779CompileAndVerify(@" 2797CompileAndVerify(@" 2829CompileAndVerify(source, expectedOutput: "Hello"); 2857CompileAndVerify(source, expectedOutput: "Hello!"); 2884CompileAndVerify(source, expectedOutput: @" 2913CompileAndVerify(source, expectedOutput: "45"); 2942CompileAndVerify(source, expectedOutput: "0"); 2979CompileAndVerify(source, expectedOutput: "-1"); 3025CompileAndVerify(source, expectedOutput: "0"); 3070CompileAndVerify(source, expectedOutput: "0"); 3142CompileAndVerify(source, expectedOutput: "True"); 3186CompileAndVerify(source, expectedOutput: "True"); 3239CompileAndVerify(source, expectedOutput: "True"); 3264CompileAndVerify(source, expectedOutput: "0"); 3323CompileAndVerify(source, expectedOutput: "True"); 3358CompileAndVerify(source, expectedOutput: "1"); 3879CompileAndVerify(source, 3980CompileAndVerify(source, expectedOutput: "0"); 4004CompileAndVerify(source, expectedOutput: "CheckPoint-2"); 4612CompileAndVerify(p2, new[] { MetadataReference.CreateFromStream(c1.EmitToStream()) }, expectedOutput: "0"); 4623CompileAndVerify(source2, references: new[] { metadataRef }, options: TestOptions.ReleaseModule, verify: Verification.Fails);
Emit\DeterministicTests.cs (2)
437var cv = CompileAndVerify(source: new string[] { x1, x2, x3 }, expectedOutput: expectedOutput1); 441CompileAndVerify(source: new string[] { x2, x1, x3 }, expectedOutput: expectedOutput2);
Emit\DynamicAnalysis\DynamicAnalysisResourceTests.cs (2)
981CompileAndVerify(source, emitOptions: emitOptions).VerifyIL("C..cctor()", 1020CompileAndVerify(
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (1)
3701return base.CompileAndVerify(
Emit\EmitCustomModifiers.cs (8)
101CompileAndVerify( 160CompileAndVerify( 212CompileAndVerify( 283CompileAndVerify( 376CompileAndVerify( 458CompileAndVerify( 510CompileAndVerify( 553CompileAndVerify(
Emit\EmitErrorTests.cs (5)
115var compilation2 = CompileAndVerify( 149var compilation2 = CompileAndVerify( 188var compilation2 = CompileAndVerify( 358CompileAndVerify(source, 363CompileAndVerify(source,
Emit\EmitMetadataTests.cs (73)
87CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), symbolValidator: module => 147CompileAndVerify(source, expectedOutput: @" 174CompileAndVerify(source, expectedOutput: @" 228CompileAndVerify( 247CompileAndVerify(source, new[] { netModule1, netModule2 }, verify: Verification.FailsILVerify, assemblyValidator: (assembly) => 310CompileAndVerify(source, symbolValidator: module => 350CompileAndVerify(source, symbolValidator: module => 377CompileAndVerify(@" 422CompileAndVerify(source, options: TestOptions.ReleaseDll, symbolValidator: module => 530CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.ReleaseDll, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 580CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.Internal)); 647CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 674CompileAndVerify(source: source, sourceSymbolValidator: validator(true), symbolValidator: validator(false), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.Internal)); 742CompileAndVerify(source: source, sourceSymbolValidator: validator(true), symbolValidator: validator(false), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.Internal)); 790CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 825CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 889CompileAndVerify(source: source, sourceSymbolValidator: validator(true), symbolValidator: validator(false), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.Internal)); 1141CompileAndVerify(source: source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 1163CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 1250CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 1285CompileAndVerify( 1335CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 1367CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 1459CompileAndVerify(source, expectedOutput: "GenericMethods\r\n"); 1544var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 1719CompileAndVerify(source); 1725CompileAndVerify(@" 1761CompileAndVerify(source, expectedOutput: @"1234"); 1767CompileAndVerify(@" 1776CompileAndVerify(@" 1800CompileAndVerify(source); 1815CompileAndVerify(source); 1832CompileAndVerify(source); 1843CompileAndVerify(source); 1866CompileAndVerify(source); 1881CompileAndVerify(source); 1906CompileAndVerify(source); 1927CompileAndVerify(source); 1933CompileAndVerify(@" 2008CompileAndVerify(source); 2021CompileAndVerify(source, symbolValidator: module => 2042CompileAndVerify(source); 2054CompileAndVerify(source); 2066CompileAndVerify(source, symbolValidator: module => 2124CompileAndVerify(source, 2158CompileAndVerify(sources, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 2194CompileAndVerify(source, expectedOutput: "OK"); 2554CompileAndVerify(text, sourceSymbolValidator: verifier, symbolValidator: verifier); 2578CompileAndVerify(text, sourceSymbolValidator: verifier, symbolValidator: verifier); 2597CompileAndVerify(text, 2643CompileAndVerify(text, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 2675CompileAndVerify(text, sourceSymbolValidator: verifier, symbolValidator: verifier); 2713CompileAndVerify( 2869CompileAndVerify( 2921CompileAndVerify( 3015var verifier = CompileAndVerify(source, expectedOutput: expectedOutput) 3022verifier = CompileAndVerify(source, 3033verifier = CompileAndVerify(source, 3041verifier = CompileAndVerify(source, 3048verifier = CompileAndVerify(source, 3055verifier = CompileAndVerify(source, 3075verifier = CompileAndVerify(source, 3095verifier = CompileAndVerify(source, 3129var verifier = CompileAndVerify( 3243CompileAndVerify(source, 3295var verifier = CompileAndVerify(source, 3396CompileAndVerify(source, 3422CompileAndVerify(source, 3464CompileAndVerify(source, 3634CompileAndVerify(""" 3651CompileAndVerify(""" 3690CompileAndVerify(""" 3712CompileAndVerify("""
Emit\EntryPointTests.cs (2)
530CompileAndVerify(source, options: TestOptions.ReleaseExe.WithMainTypeName("A.B.C"), expectedOutput: "1"); 554CompileAndVerify(source, options: TestOptions.ReleaseExe.WithMainTypeName("A.B.C"), expectedOutput: "1");
Emit\InAttributeModifierTests.cs (118)
42var verifier = CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 45verifier = CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 78CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 79CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 102CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 103CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 129CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 130CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 153CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 154CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 179CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 180CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 206CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 207CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 256CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 309CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 365CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 418CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 478CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 532CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 585CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 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); 2532CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2533CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2579CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2580CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2634CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2635CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2682CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2683CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2729CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2730CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2774CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2775CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2819CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2820CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2864CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2865CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2909CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2910CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2954CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 2955CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 2999CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3000CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3045CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3046CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3091CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3092CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3137CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3138CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3183CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3184CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3231CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3232CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3279CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3280CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3334CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3335CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3382CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3383CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3430CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3431CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3476CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3477CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3522CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3523CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3568CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3569CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3614CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3615CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3660CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5", symbolValidator: validator); 3661CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5", symbolValidator: validator); 3693CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3694CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 3726CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3727CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 3769CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3770CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 3811CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 3812CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 3932CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 3993CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 4069CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 4154CompileAndVerify(code, references: new[] { reference }, expectedOutput: "5"); 4200CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4201CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.EmitToImageReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4247CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4248CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.EmitToImageReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4296CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4297CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.EmitToImageReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4348CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4349CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.EmitToImageReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4401CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.ToMetadataReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4402CompileAndVerify(source: userCode, expectedOutput: "5", references: new[] { testRef.EmitToImageReference() }, options: TestOptions.ReleaseExe, symbolValidator: validator); 4498CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module => 4541CompileAndVerify(code, verify: Verification.Passes, symbolValidator: module =>
Emit\NoPiaEmbedTypes.cs (2)
5883CompileAndVerify(csharp, references: new MetadataReference[] { piaReference }, symbolValidator: module => 5951CompileAndVerify(csharp, references: new MetadataReference[] { piaReference }, symbolValidator: module =>
Perf.cs (1)
32CompileAndVerify(TestResources.PerfTests.CSPerfTest).
PrivateProtected.cs (1)
594var verifier = CompileAndVerify(
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (601)
CodeGen\CodeGenCallTests.cs (357)
78var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 117CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 176var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 192CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 251var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 291CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 350var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 366CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 432var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 626CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 692var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 776CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 844var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1118CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1186var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1310CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1380var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1600CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1668var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1773CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 1853var verifier = CompileAndVerify( 1932CompileAndVerify( 2014var verifier = CompileAndVerify( 2050CompileAndVerify( 2132var verifier = CompileAndVerify( 2212CompileAndVerify( 2294var verifier = CompileAndVerify( 2330CompileAndVerify( 2391var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2439CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2489CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2491CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2550var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2599CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2649CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2651CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2717var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2919CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2976CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 2978CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3046var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3328CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3386CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3388CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3456var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3518CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3587var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3607CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3676var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3739CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3808var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3828CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 3904var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4130CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4206var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4299CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4377var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4683CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4761var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4894CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 4963var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5039CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5108var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5138CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5207var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5284CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5353var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5383CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5459var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5691CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5767var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5863CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 5941var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6253CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6331var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6467CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6536var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6608CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6677var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6705CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6774var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6847CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6916var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 6944CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7020var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7236CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7312var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7403CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7481var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7777CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7855var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 7986CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8055var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8127CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8196var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8224CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8293var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8366CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8435var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8463CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8539var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8761CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8837var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 8931CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9009var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9311CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9389var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9523CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9597var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9673CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9744var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9774CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 9854var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10108CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10186var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10302CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10376var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10452CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10523var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10553CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10633var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10893CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 10971var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11090CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11159var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11259CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11328var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11370CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11439var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11540CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11609var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11651CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11727var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 11971CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12047var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12152CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12230var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12554CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12632var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12777CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12846var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12912CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 12981var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13006CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13075var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13142CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13211var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13236CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13312var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13542CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13618var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13713CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13782var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13856CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13925var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 13954CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14023var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14098CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14167var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14196CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14272var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14520CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14596var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14700CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14776var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 14996CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15072var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15165CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15241var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15562CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15638var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15778CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15847var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 15941CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16010var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16049CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16118var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16213CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16282var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16321CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16397var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16635CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16711var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16813CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16882var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 16984CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17053var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17096CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17165var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17268CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17337var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17380CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17456var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17708CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17784var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17893CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 17969var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 18217CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 18293var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 18400CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 18476var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 18806CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 18882var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19030CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19097var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19151CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19218var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19237CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19304var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19359CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19426var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19445CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19519var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19713CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19787var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19871CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 19950var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20017CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20096var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20120CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20199var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20267CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20346var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20370CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20456var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20670CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20756var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20846CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 20927var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21010CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21091var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21126CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21207var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21291CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21372var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21407CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21495var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21735CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21823var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 21922CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22003var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22080CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22161var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22193CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22274var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22352CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22433var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22465CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22553var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22810CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 22898var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23005CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23086var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23171CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23252var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23288CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23369var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23455CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23536var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23572CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23660var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 23927CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24015var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24127CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24215var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24459CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24547var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24648CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 24736var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25081CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25169var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25317CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25398var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25509CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25590var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25639CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25720var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25832CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25913var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 25962CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26050var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26318CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26406var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26519CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26600var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26705CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26786var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26832CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 26913var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27019CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27100var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27146CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27234var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27500CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27588var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27700CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27781var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27894CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 27975var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28025CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28106var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28220CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28301var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28351CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28439var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28715CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28803var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 28920CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 29008var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 29280CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 29368var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 29483CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 29571var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 29919CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30007var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30160CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30239var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30308CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30387var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30415CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30494var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30564CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30643var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30671CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30757var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 30987CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31073var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31171CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31243var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31312CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31384var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31412CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31484var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31554CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31626var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31654CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31733var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 31949CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32028var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32119CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32191var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32294CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32366var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32411CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32483var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32587CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32659var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32704CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 32783var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33039CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33118var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33229CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33285var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33391var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33498CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: expectedOutput).VerifyDiagnostics(); 33558var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, verify: Verification.Fails, expectedOutput: expectedOutput).VerifyDiagnostics(); 33601CompileAndVerify(source, options: TestOptions.DebugExe, verify: Verification.Fails, expectedOutput: expectedOutput).VerifyDiagnostics();
CodeGen\CodeGenMethodGroupConversionCachingTests.cs (128)
36var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 70var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 108var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 150var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 192var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 234var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 269var verifier = CompileAndVerify(source 346var verifier = CompileAndVerify(source 416var verifier = CompileAndVerify(source, symbolValidator: VerifyNoCacheContainersIn("C")); 446var verifier = CompileAndVerify(source, symbolValidator: VerifyNoCacheContainersIn("C")); 471var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("Program")); 497var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("Program")); 519var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular10, symbolValidator: VerifyNoCacheContainersIn("Program")); 553var verifier = CompileAndVerify(source, expectedOutput: PASS); 596var verifier = CompileAndVerify(source, expectedOutput: PASS); 640var verifier = CompileAndVerify(source, expectedOutput: PASS); 685var verifier = CompileAndVerify(source, expectedOutput: PASS); 731var verifier = CompileAndVerify(source, expectedOutput: PASS); 777var verifier = CompileAndVerify(source, expectedOutput: PASS); 822var verifier = CompileAndVerify(source, expectedOutput: PASS); 865var verifier = CompileAndVerify(source, expectedOutput: PASS); 908var verifier = CompileAndVerify(source, expectedOutput: PASS); 953var verifier = CompileAndVerify(source, expectedOutput: PASS); 998var verifier = CompileAndVerify(source, expectedOutput: PASS); 1043var verifier = CompileAndVerify(source, expectedOutput: PASS); 1089var verifier = CompileAndVerify(source, expectedOutput: PASS); 1135var verifier = CompileAndVerify(source, expectedOutput: PASS); 1183var verifier = CompileAndVerify(source, expectedOutput: PASS); 1228var verifier = CompileAndVerify(source, expectedOutput: PASS); 1273var verifier = CompileAndVerify(source, expectedOutput: PASS); 1323var verifier = CompileAndVerify(source, expectedOutput: PASS); 1368var verifier = CompileAndVerify(source, expectedOutput: PASS); 1406var verifier = CompileAndVerify(source, expectedOutput: PASS); 1450var verifier = CompileAndVerify(source, expectedOutput: PASS); 1494var verifier = CompileAndVerify(source, expectedOutput: PASS); 1538var verifier = CompileAndVerify(source, expectedOutput: PASS); 1585var verifier = CompileAndVerify(source, expectedOutput: PASS); 1632var verifier = CompileAndVerify(source, expectedOutput: PASS); 1679var verifier = CompileAndVerify(source, expectedOutput: PASS); 1727var verifier = CompileAndVerify(source, expectedOutput: PASS); 1779var verifier = CompileAndVerify(source, expectedOutput: PASS); 1822var verifier = CompileAndVerify(source, expectedOutput: PASS); 1867var verifier = CompileAndVerify(source, expectedOutput: PASS); 1912var verifier = CompileAndVerify(source, expectedOutput: PASS); 1961var verifier = CompileAndVerify(source, expectedOutput: PASS); 2017var verifier = CompileAndVerify(source, expectedOutput: PASS); 2081CompileAndVerify(source, symbolValidator: containerValidator, expectedOutput: PASS).VerifyIL("D<T>.Test<M>", @" 2142CompileAndVerify(source, symbolValidator: containerValidator, expectedOutput: PASS).VerifyIL("D.Test<M>", @" 2199CompileAndVerify(source, symbolValidator: containerValidator, expectedOutput: PASS).VerifyIL("D.Test<M>", @" 2237CompileAndVerify(source, expectedOutput: PASS).VerifyIL("C.Main", @" 2275CompileAndVerify(source, expectedOutput: PASS).VerifyIL("C.Main", @" 2310CompileAndVerify(source).VerifyIL("E.Test", @" 2350CompileAndVerify(source, expectedOutput: PASS).VerifyIL("D<T>.Test", @" 2398CompileAndVerify(source, expectedOutput: PASS).VerifyIL("D<K>.Test", @" 2436CompileAndVerify(source).VerifyIL("E.F<T>.Test", @" 2474CompileAndVerify(source, expectedOutput: PASS).VerifyIL("C.Test<T>", @" 2517CompileAndVerify(source, expectedOutput: PASS).VerifyIL("C.Test<T>", @" 2555CompileAndVerify(source).VerifyIL("E.Test<T>", @" 2588var verifier = CompileAndVerify(source, expectedOutput: PASS); 2626var verifier = CompileAndVerify(source, expectedOutput: PASS); 2672var verifier = CompileAndVerify(source, expectedOutput: PASS); 2719var verifier = CompileAndVerify(source, expectedOutput: PASS); 2764var verifier = CompileAndVerify(source, expectedOutput: PASS); 2810var verifier = CompileAndVerify(source, expectedOutput: PASS); 2844var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 2887var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 2931var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 2975var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 3018var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 3064var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 3123var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3165var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3209var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__2_0", arity: 1 3251var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3293var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3393var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("A.B.<>O", arity: 0 3546var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3613var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("E.<Test>O__0_0", arity: 1 3687var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("E.<Test>O__0_0", arity: 1 3768var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyCacheContainer("E.<Owner>O__0_0", arity: 2 3825var verifier = CompileAndVerify(source, symbolValidator: static module => 3875var verifier = CompileAndVerify(source, symbolValidator: static module => 3928var verifier = CompileAndVerify(source, symbolValidator: static module => 3976var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("Program.<>O", arity: 0 4032var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Owner>O__0_0", arity: 1 4090var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Owner>O__0_0", arity: 1 4140var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 4188CompileAndVerify(source).VerifyIL("C.Test", @" 4230CompileAndVerify(source).VerifyIL("C<TEventArgs>.Test", @" 4267CompileAndVerify(source).VerifyIL("C<TEventArgs>.Test", @" 4307CompileAndVerify(source).VerifyIL("C.Test<TEventArgs>", @" 4341CompileAndVerify(source, expectedOutput: "{ x = 0 }").VerifyIL("C.Main", @" 4380CompileAndVerify(source, expectedOutput: "{ x = 0 }").VerifyIL("D<G>.Test", @" 4421CompileAndVerify(source, expectedOutput: "{ x = 0 }").VerifyIL("D<G>.Test", @" 4462CompileAndVerify(source, expectedOutput: "{ x = 0 }").VerifyIL("D<G>.Test", @" 4501CompileAndVerify(source, expectedOutput: "{ x = 0 }").VerifyIL("D.Test<T>", @" 4540CompileAndVerify(source, expectedOutput: "{ x = 0 }").VerifyIL("D.Test<T>", @" 4587CompileAndVerify(source).VerifyIL("D.<Owner>g__Test|0_0<T, NotUsed>", @" 4641CompileAndVerify(source).VerifyIL("D<T>.<Top>g__Test|0_0<N0, N1>", @" 4686CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.Test", @" 4722CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll).VerifyIL("C<T>.Test", @" 4762CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll).VerifyIL("C.Test<T>", @" 4799CompileAndVerify(source).VerifyIL("C.Test", @" 4835CompileAndVerify(source).VerifyIL("C<T>.Test", @" 4875CompileAndVerify(source).VerifyIL("C.Test<T>", @" 4913CompileAndVerify(source).VerifyIL("C.Test<T>", @" 4950CompileAndVerify(source).VerifyIL("C.Test<T>", @" 4986CompileAndVerify(source).VerifyIL("C.Test", @" 5023CompileAndVerify(source).VerifyIL("C.Test", @" 5054CompileAndVerify(source).VerifyIL("C.Test<T>", @" 5094CompileAndVerify(source).VerifyIL("C.<TopLevel>g__Test|0_0<T>", @" 5142CompileAndVerify(source).VerifyIL("C.<>c__DisplayClass0_0<T>.<TopLevel>g__Test|1", @" 5196CompileAndVerify(source).VerifyIL("C.<>c__DisplayClass0_0<T>.<TopLevel>g__Test|3", @" 5245CompileAndVerify(source).VerifyIL("Program.<<Main>$>g__Test|0_3<T>", @" 5295CompileAndVerify(source).VerifyIL("Program.<<Main>$>g__Test|0_3<T>", @" 5323CompileAndVerify(source).VerifyIL("<top-level-statements-entry-point>", @" 5349CompileAndVerify(source).VerifyIL("<top-level-statements-entry-point>", @" 5375CompileAndVerify(source).VerifyIL("Program.<<Main>$>g__Test|0_0<T>", @" 5405CompileAndVerify(source).VerifyIL("Program.<<Main>$>g__Test|0_0<T>", @" 5435CompileAndVerify(source).VerifyIL("Program.<<Main>$>g__Test|0_0<T>", @" 5465CompileAndVerify(source).VerifyIL("Program.<<Main>$>g__Test|0_0<T>", @" 5497CompileAndVerify(source).VerifyIL("C<T>.Test", @" 5525CompileAndVerify(source).VerifyIL("C<T>.Test<G>", @" 5553CompileAndVerify(source).VerifyIL("C<T>.Test<G>", @" 5584CompileAndVerify(source).VerifyIL("M<N>.<F>g__Test|0_0<I, C>", @" 5621var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular11); 5902CompileAndVerify(text, parseOptions: TestOptions.Regular11, expectedOutput: PASS).VerifyIL("Test.Main", @" 5949CompileAndVerify(@"
CodeGen\CodeGenSpanBasedStringConcatTests.cs (18)
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); 875var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1029var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 1312var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2010var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccab" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2473var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 2672var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "cssscsssccsc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 3165var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "scss" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4103var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abccccabcabc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4208var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcdabdccdabdcabcabddabc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 4473var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "abcddabc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5249var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sccs" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5496var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "csssscsssscssssccscsscsccssc" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped); 5796var comp = CompileAndVerify(source, expectedOutput: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? "sscss" : null, targetFramework: TargetFramework.Net80, verify: RuntimeUtilities.IsCoreClr8OrHigherRuntime ? default : Verification.Skipped);
Emit\RuntimeProbing\ModuleCancellationTests.cs (1)
20=> CompileAndVerify(
Emit\RuntimeProbing\StackOverflowProbingTests.cs (1)
19=> CompileAndVerify(
Emit\UnmanagedTypeModifierTests.cs (29)
629var reference = CompileAndVerify(@" 652CompileAndVerify(@" 668var parent = CompileAndVerify(@" 681var child = CompileAndVerify(@" 694CompileAndVerify(@" 710var reference = CompileAndVerify(@" 733CompileAndVerify(@" 746var parent = CompileAndVerify(@" 759var child = CompileAndVerify(@" 772CompileAndVerify(@" 785var reference = CompileAndVerify(@" 808CompileAndVerify(@" 821var parent = CompileAndVerify(@" 834var child = CompileAndVerify(@" 847CompileAndVerify(@" 860var reference = CompileAndVerify(@" 883CompileAndVerify(@" 896var parent = CompileAndVerify(@" 909var child = CompileAndVerify(@" 922CompileAndVerify(@" 935var reference = CompileAndVerify(@" 958CompileAndVerify(@" 972var parent = CompileAndVerify(@" 985var child = CompileAndVerify(@" 998CompileAndVerify(@" 1012CompileAndVerify(@" 1054var reference = CompileAndVerify(@" 1072CompileAndVerify(@" 1474CompileAndVerify(code, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"
PDB\CheckSumTest.cs (3)
103CompileAndVerify(text, options: TestOptions.DebugExe). 138CompileAndVerify(text). 189CompileAndVerify(new string[] { text1, text2 }).
PDB\PDBConstantTests.cs (8)
287CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb("C.M", @" 337var c = CompileAndVerify(text, options: TestOptions.DebugDll); 409var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 487CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb("C.M", @" 609var c = CompileAndVerify(text, options: TestOptions.DebugDll); 666var c = CompileAndVerify(text, options: TestOptions.DebugDll); 726var c = CompileAndVerify(text, options: TestOptions.DebugDll); 781CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb("C.M", @"
PDB\PDBIteratorTests.cs (12)
180var c = CompileAndVerify(text, options: TestOptions.ReleaseDll, symbolValidator: module => 251var c = CompileAndVerify(text, options: TestOptions.DebugDll, symbolValidator: module => 736var v = CompileAndVerify(text, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 807var v = CompileAndVerify(text, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 913CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 931var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1027var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1101var v = CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1225var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1371var v = CompileAndVerify(source, new[] { CSharpRef }, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1457var v = CompileAndVerify(source, new[] { CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1519var v = CompileAndVerify(source, new[] { CSharpRef }, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module =>
PDB\PDBLambdaTests.cs (3)
1759var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1801var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2146var c = CompileAndVerify(source, options: TestOptions.DebugDll);
PDB\PDBTests.cs (28)
1147var c = CompileAndVerify(source); 1567var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1622var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1677var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1699var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1732var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2297var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2393var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2531var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2589var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2671var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2721var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2866var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2978var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithModuleName("MODULE")); 3106var v = CompileAndVerify(source, options: TestOptions.DebugDll); 4079var v = CompileAndVerify(source, options: TestOptions.DebugDll); 4169var v = CompileAndVerify(source, options: TestOptions.DebugDll); 4413var v = CompileAndVerify(source, options: TestOptions.DebugDll); 10082var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.DebugDll); 10291var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.DebugDll); 12116var c = CompileAndVerify(source); 12156var c = CompileAndVerify(source); 12189var c = CompileAndVerify(source, verify: Verification.Skipped); 12260var c = CompileAndVerify(source, verify: Verification.Skipped); 12541var v = CompileAndVerify(source, options: TestOptions.DebugDll); 12625var v = CompileAndVerify(source, options: TestOptions.DebugDll); 12706var v = CompileAndVerify(source, options: TestOptions.DebugDll); 12798var v = CompileAndVerify(source, options: TestOptions.DebugDll);
PDB\PDBUsingTests.cs (13)
60CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 140CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 220CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 300CompileAndVerify(text, options: TestOptions.DebugDll, targetFramework: TargetFramework.NetFramework).VerifyPdb(@" 380CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 467CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.NetFramework).VerifyPdb(@" 2210CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 2259CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 2340CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 2444CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 2502CompileAndVerify(text, options: TestOptions.DebugDll).VerifyPdb(@" 2558var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2611CompileAndVerify(source, new[] { libRef }, options: TestOptions.DebugExe).VerifyPdb("Test.Main", @"
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1197)
Attributes\AttributeTests.cs (48)
1400CompileAndVerify(source); 1836var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 1870var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 1931var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 1994var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2213var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2279var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2350var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2482var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2698CompileAndVerify(source, sourceSymbolValidator: symbolValidator(true), symbolValidator: symbolValidator(false)); 2935CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 3046CompileAndVerify(source, sourceSymbolValidator: symbolValidator(false), symbolValidator: symbolValidator(true)); 3552var compVerifier = CompileAndVerify( 3708CompileAndVerify(source); 3745CompileAndVerify(source, expectedOutput: expectedOutput); 4347CompileAndVerify(source, expectedOutput: ""); 4375CompileAndVerify(source, expectedOutput: ""); 4454CompileAndVerify(source, expectedOutput: ""); 4479CompileAndVerify(source, expectedOutput: "int"); 4642var verifier = CompileAndVerify(source, symbolValidator: static module => 4674var verifier = CompileAndVerify(source, symbolValidator: static module => 4707var verifier = CompileAndVerify(source, symbolValidator: static module => 4739var verifier = CompileAndVerify(source, symbolValidator: static module => 4775var verifier = CompileAndVerify(source, symbolValidator: static module => 4806var verifier = CompileAndVerify(source, symbolValidator: static module => 4832var verifier = CompileAndVerify(source, symbolValidator: static module => 4864var verifier = CompileAndVerify(source, symbolValidator: static module => 5020CompileAndVerify(source, expectedOutput: "1"); 5400CompileAndVerify(source); 5556CompileAndVerify(source, expectedOutput: "True"); 5678CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 5751CompileAndVerify(source, symbolValidator: (m) => 5795CompileAndVerify(source, symbolValidator: (m) => 5823CompileAndVerify(source, symbolValidator: module => 6671var compilation = CompileAndVerify(source, expectedOutput: ""); 7751CompileAndVerify(source); 7793CompileAndVerify(source, expectedOutput: "1"); 8227CompileAndVerify(source, expectedOutput: ""); 8366CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator); 9342CompileAndVerify(source, expectedOutput: @" 10641var verifier = CompileAndVerify(source, expectedOutput: "Attr`1[System.Int32]"); 10693var verifier = CompileAndVerify(source, expectedOutput: "Attr`1[System.Int32] Attr`1[System.Object] Attr`1[System.Int32]"); 11010var verifier = CompileAndVerify(source, symbolValidator: validateMetadata, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)); 11147var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify, expectedOutput: "Prop = a"); 11219var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), sourceSymbolValidator: verify, symbolValidator: verify, expectedOutput: "a"); 11291var verifier = CompileAndVerify(source, symbolValidator: verify, sourceSymbolValidator: verifySource); 11347var verifier = CompileAndVerify(source, expectedOutput: "Attr`1[System.String]"); 11362var verifier = CompileAndVerify(source, symbolValidator: verify, sourceSymbolValidator: verify);
Attributes\AttributeTests_CallerInfoAttributes.cs (3)
3235CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: verify); 5882var verifier = CompileAndVerify(source, expectedOutput: "1"); 5941var verifier = CompileAndVerify(source, expectedOutput: "0", symbolValidator: verify);
Attributes\AttributeTests_Conditional.cs (7)
247CompileAndVerify(testSource, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: ""); 265CompileAndVerify(testSources, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: ""); 269CompileAndVerify(source2, references: new[] { comp1.ToMetadataReference() }, sourceSymbolValidator: CommonSourceValidatorForCondAttrType, symbolValidator: CommonMetadataValidatorForCondAttrType, expectedOutput: ""); 458CompileAndVerify(testSource, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest); 476CompileAndVerify(testSources, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest); 480CompileAndVerify(source2, references: new[] { comp1.ToMetadataReference() }, expectedOutput: s_commonExpectedOutput_ConditionalMethodsTest); 645CompileAndVerify(source, symbolValidator: validator(false), sourceSymbolValidator: validator(true), expectedOutput: "");
Attributes\AttributeTests_Dynamic.cs (4)
1087CompileAndVerify(source, references: new[] { CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1156CompileAndVerify(source, references: new[] { CSharpRef }, expectedSignatures: new[] 1245CompileAndVerify(source, references: new[] { CSharpRef }, expectedSignatures: new[] 1279CompileAndVerify(source, references: new[] { CSharpRef }, expectedSignatures: new[]
Attributes\AttributeTests_Embedded.cs (4)
195CompileAndVerify(code, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), verify: Verification.Passes, expectedOutput: "3"); 235var verifier = CompileAndVerify(code, targetFramework: TargetFramework.NetStandard20, expectedOutput: "M", symbolValidator: module => 345var verifier = CompileAndVerify(code, targetFramework: TargetFramework.NetStandard20, symbolValidator: module => 739CompileAndVerify(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 => 106CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, symbolValidator: validate); 120CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module => 146CompileAndVerify(codeB, verify: Verification.Passes, references: new[] { referenceA }, 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 => 473CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, 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 => 1029CompileAndVerify(new[] { text, GetCompilerFeatureRequiredAttributeText(includeCompilerFeatureRequired) }, verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_IsUnmanaged.cs (18)
38CompileAndVerify(text, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), symbolValidator: module => 62CompileAndVerify(text, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), symbolValidator: module => 92CompileAndVerify(text, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 114CompileAndVerify(text, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 141CompileAndVerify(text, references: new[] { reference }, symbolValidator: module => 167CompileAndVerify(text, references: new[] { reference }, symbolValidator: module => 199CompileAndVerify( 227CompileAndVerify( 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 => 316CompileAndVerify( 345CompileAndVerify( 371CompileAndVerify(text, symbolValidator: module => 390CompileAndVerify(text, symbolValidator: module => 415CompileAndVerify( 435CompileAndVerify( 730var comp1 = CompileAndVerify(code1, options: options, symbolValidator: module => 744CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module =>
Attributes\AttributeTests_LifetimeAnnotation.cs (4)
452CompileAndVerify( 489CompileAndVerify( 516CompileAndVerify( 552CompileAndVerify(
Attributes\AttributeTests_Locations.cs (1)
1237CompileAndVerify(source, expectedOutput: "Attribute Count=1").VerifyDiagnostics(
Attributes\AttributeTests_NativeInteger.cs (6)
1080CompileAndVerify( 1104CompileAndVerify( 1127CompileAndVerify( 1151CompileAndVerify( 1506var comp = CompileAndVerify(@" 1547var comp = CompileAndVerify(@"
Attributes\AttributeTests_Nullable.cs (12)
2164CompileAndVerify( 2190CompileAndVerify( 2217CompileAndVerify( 2270CompileAndVerify( 2294CompileAndVerify( 2502CompileAndVerify( 2528CompileAndVerify( 2554CompileAndVerify( 5299CompileAndVerify(source, options: TestOptions.ReleaseExe, references: new[] { library }, expectedOutput: 5317CompileAndVerify(source, options: TestOptions.ReleaseExe, references: new[] { library }, expectedOutput: 5343CompileAndVerify(source, options: TestOptions.ReleaseExe, references: new[] { library }, expectedOutput: 5367CompileAndVerify(source, options: TestOptions.ReleaseExe, references: new[] { library }, expectedOutput:
Attributes\AttributeTests_NullablePublicOnly.cs (4)
567CompileAndVerify(source, parseOptions: parseOptions, expectedOutput: "<null>"); 568CompileAndVerify(source, parseOptions: parseOptions.WithNullablePublicOnly(), expectedOutput: "False"); 569CompileAndVerify(new[] { source, sourceIVTs }, parseOptions: parseOptions, expectedOutput: "<null>"); 570CompileAndVerify(new[] { source, sourceIVTs }, parseOptions: parseOptions.WithNullablePublicOnly(), expectedOutput: "True");
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 => 432CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 453var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module => 465CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, symbolValidator: module => 486CompileAndVerify(text, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_RefReadOnly.cs (49)
35CompileAndVerify(text, verify: Verification.Fails, symbolValidator: module => 65CompileAndVerify(text, symbolValidator: module => 89CompileAndVerify(text, symbolValidator: module => 117CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, symbolValidator: module => 147CompileAndVerify(text, symbolValidator: module => 170CompileAndVerify(text, symbolValidator: module => 200CompileAndVerify(codeB, references: new[] { referenceA }, symbolValidator: module => 229CompileAndVerify(text, symbolValidator: module => 248CompileAndVerify(text, symbolValidator: module => 273CompileAndVerify(codeB, references: new[] { referenceA }, symbolValidator: module => 301CompileAndVerify(text, symbolValidator: module => 330CompileAndVerify(text, symbolValidator: module => 367CompileAndVerify(codeB, references: new[] { referenceA }, symbolValidator: module => 399CompileAndVerify(text, verify: Verification.Fails, symbolValidator: module => 423CompileAndVerify(text, symbolValidator: module => 443CompileAndVerify(text, symbolValidator: module => 471CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, symbolValidator: module => 498CompileAndVerify(text, symbolValidator: module => 519CompileAndVerify(text, symbolValidator: module => 534CompileAndVerify(text, symbolValidator: module => 558CompileAndVerify(codeB, references: new[] { referenceA }, symbolValidator: module => 595CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 623CompileAndVerify(text, 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 => 754CompileAndVerify(text, options: options, symbolValidator: module => 781CompileAndVerify(text, options: options, symbolValidator: module => 816CompileAndVerify(codeB, verify: Verification.Fails, options: options, references: new[] { referenceA }, 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 => 1190CompileAndVerify(code2, options: options.WithModuleName("Assembly2"), references: new[] { comp1.Compilation.ToMetadataReference() }, 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 => 2340CompileAndVerify( 2364CompileAndVerify( 2387CompileAndVerify( 2411CompileAndVerify(
Attributes\AttributeTests_RefSafetyRules.cs (1)
215CompileAndVerify(sourceB, references: new[] { refA }, expectedOutput: "11");
Attributes\AttributeTests_Security.cs (3)
80CompileAndVerify(source); 279CompileAndVerify(source); 424CompileAndVerify(source);
Attributes\AttributeTests_StructLayout.cs (8)
41CompileAndVerify(source, assemblyValidator: (assembly) => 217CompileAndVerify(verifiable, assemblyValidator: validator); 218CompileAndVerify(unverifiable, assemblyValidator: validator, verify: Verification.FailsPEVerify); 221CompileAndVerify(unloadable, assemblyValidator: validator, verify: Verification.FailsPEVerify); 339CompileAndVerify(source, verify: Verification.FailsPEVerify); 360CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 408CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 682CompileAndVerify(source, assemblyValidator: (assembly) =>
Attributes\AttributeTests_Synthesized.cs (16)
174CompileAndVerify(source, options: options, symbolValidator: module => 223CompileAndVerify(source, options: options, symbolValidator: module => 665CompileAndVerify(source, symbolValidator: validate, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)); 735CompileAndVerify(source, symbolValidator: validate, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)); 795CompileAndVerify(source, 871CompileAndVerify(source, symbolValidator: validate, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)); 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 => 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 =>
Attributes\AttributeTests_WellKnownAttributes.cs (93)
535var comp = CompileAndVerify(source, symbolValidator: verifier); 678var comp = CompileAndVerify(source, expectedOutput: "0"); 709var comp = CompileAndVerify(source, expectedOutput: "0"); 762CompileAndVerify(cssource, expectedOutput: "0", references: new[] { ilReference }); 811CompileAndVerify( 877CompileAndVerify(source, symbolValidator: verifier); 1087CompileAndVerify(source, assemblyValidator: (assembly) => 1142CompileAndVerify(source, assemblyValidator: (assembly) => 1232CompileAndVerify(text); 1253CompileAndVerify(text); 1273CompileAndVerify(source, expectedOutput: @"5"); 1395CompileAndVerify(source, sourceSymbolValidator: sourceValidator); 1413CompileAndVerify(source, expectedOutput: ""); 1613CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: ""); 1948CompileAndVerify(source, expectedOutput: "Evil").VerifyDiagnostics(); 2007CompileAndVerify(source, expectedOutput: @"100200300400"); 2041CompileAndVerify(source, expectedOutput: @"Has DecimalConstantAttribute 2063var comp = CompileAndVerify(source, expectedSignatures: new[] 2089var comp = CompileAndVerify(source, expectedSignatures: new[] 2132CompileAndVerify(source, assemblyValidator: (assembly) => 2313CompileAndVerify(source, assemblyValidator: (assembly) => 2368CompileAndVerify(source, assemblyValidator: (assembly) => 2425CompileAndVerify(source, assemblyValidator: (assembly) => 2634CompileAndVerify(source, assemblyValidator: (assembly) => 2689CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 2780CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 2805CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 2925CompileAndVerify(code, assemblyValidator: (assembly) => 3104CompileAndVerify(source, assemblyValidator: validator); 3279CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 3354CompileAndVerify(source); 3425CompileAndVerify(source, assemblyValidator: (assembly) => 3457CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 3549CompileAndVerify(source, assemblyValidator: (assembly) => 3701CompileAndVerify(source, options: TestOptions.ReleaseDll, verify: Verification.FailsPEVerify, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator); 3787CompileAndVerify(source, sourceSymbolValidator: attributeValidator(true), symbolValidator: attributeValidator(false), expectedOutput: expectedOutput); 3847CompileAndVerify(source2, references: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput); 3849CompileAndVerify(source2, references: new[] { compDll.EmitToImageReference() }, expectedOutput: expectedOutput); 3916CompileAndVerify(source, sourceSymbolValidator: attributeValidator(true), symbolValidator: attributeValidator(false), expectedOutput: expectedOutput); 3955CompileAndVerify(source2, references: new[] { compDll.ToMetadataReference() }, expectedOutput: expectedOutput); 3957CompileAndVerify(source2, references: new[] { compDll.EmitToImageReference() }, expectedOutput: expectedOutput); 4342CompileAndVerify(source); 4703CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 4812CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 5174CompileAndVerify(source, parseOptions: parseOptions, sourceSymbolValidator: attributeValidator, symbolValidator: attributeValidator); 5204CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute()); 5324CompileAndVerify(source, expectedOutput: @"System.Reflection.Missing") 5657var verifier = CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Mscorlib40); 5714CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, expectedOutput: ""); 5757var verifier = CompileAndVerify( 6622CompileAndVerify(source); 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); 10790var comp = CompileAndVerify(source); 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); 11576var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11617var comp1 = CompileAndVerify(source1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11621var comp2 = CompileAndVerify(source2, references: new[] { reference }, verify: Verification.Passes); 11653var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11701var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11735var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11772var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11803var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11848var comp_init = CompileAndVerify(source_init, options: TestOptions.UnsafeReleaseDll); 11849var comp_skip = CompileAndVerify(source_skip, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11886var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll); 11929var comp_init = CompileAndVerify(source_init, options: TestOptions.UnsafeReleaseDll); 11930var comp_skip = CompileAndVerify(source_skip, options: TestOptions.UnsafeReleaseDll); 11972var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12024var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12096var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12131var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12204var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12265var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12294var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll); 12340var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll); 12458var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12508var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12563var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12621var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12668var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12697var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12725var comp = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, verify: Verification.Fails); 12753var comp = CompileAndVerify(source, options: TestOptions.DebugModule.WithAllowUnsafe(true), verify: Verification.Fails); 12784var comp = CompileAndVerify(source, references: new[] { metadata_comp.EmitToImageReference() }); 12838var verifier = CompileAndVerify(src, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 13079var verifier = CompileAndVerify(src, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped); 13125var verifier = CompileAndVerify(src, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped); 13639CompileAndVerify(sourceB, references: new[] { refA }, expectedOutput: "42");
FieldKeywordTests.cs (30)
48var verifier = CompileAndVerify(source, expectedOutput: """ 118var verifier = CompileAndVerify(source, expectedOutput: "(1, 2)"); 179CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(""" 536var verifier = CompileAndVerify(source, expectedOutput: """ 630var verifier = CompileAndVerify(source, expectedOutput: """ 1486var verifier = CompileAndVerify( 1575var verifier = CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: """ 1638var verifier = CompileAndVerify( 1730var verifier = CompileAndVerify( 1794var verifier = CompileAndVerify( 1902var verifier = CompileAndVerify( 2135var verifier = CompileAndVerify( 2345var verifier = CompileAndVerify( 2474var verifier = CompileAndVerify( 3059var verifier = CompileAndVerify( 3209var verifier = CompileAndVerify( 3395var verifier = CompileAndVerify( 3599var verifier = CompileAndVerify( 3972var verifier = CompileAndVerify(source, expectedOutput: "(1, 2, 3, 0)"); 4051var verifier = CompileAndVerify( 4202var verifier = CompileAndVerify( 4334var verifier = CompileAndVerify( 4468var verifier = CompileAndVerify( 4860var verifier = CompileAndVerify( 8018var verifier = CompileAndVerify( 8430var verifier = CompileAndVerify( 8980var verifier = CompileAndVerify( 9220var verifier = CompileAndVerify( 10060var verifier = CompileAndVerify( 10573var verifier = CompileAndVerify(source, expectedOutput: """
FirstClassSpanTests.cs (16)
1836var verifier = CompileAndVerify(source); 1997var verifier = CompileAndVerify([source, TestSources.Span], 2956CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion)) 3163CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3195CompileAndVerify(source, parseOptions: TestOptions.Regular13, verify: Verification.FailsILVerify) 3217CompileAndVerify(source, parseOptions: TestOptions.RegularNext, verify: Verification.FailsILVerify) 3219CompileAndVerify(source, verify: Verification.FailsILVerify) 3277CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3308CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3339CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3422CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify) 3452CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion)) 4487var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion)); 4519var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion), verify: Verification.FailsILVerify); 4550var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion)); 7125var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(langVersion));
FlowAnalysis\FlowDiagnosticTests.cs (3)
1237var verifier = CompileAndVerify(program, parseOptions: TestOptions.Regular11); 1297var verifier = CompileAndVerify(program, parseOptions: TestOptions.Regular11); 2347CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "");
FlowAnalysis\FlowTests.cs (2)
5934CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "c").VerifyDiagnostics(expectedDiagnostic); 5935CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "c").VerifyDiagnostics(expectedDiagnostic);
FlowAnalysis\RegionAnalysisTests.cs (1)
5615var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "42");
OverloadResolutionPriorityTests.cs (51)
52CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1", symbolValidator: validate, sourceSymbolValidator: validate).VerifyDiagnostics(); 55CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "1").VerifyDiagnostics(); 102CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 105CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "1").VerifyDiagnostics(); 138CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 141CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "1").VerifyDiagnostics(); 252CompileAndVerify([executable, @base, derived, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 260CompileAndVerify(executable, references: [baseReference, derivedReference], expectedOutput: "1").VerifyDiagnostics(); 301CompileAndVerify([executable, @base, derived, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "12").VerifyDiagnostics(); 309CompileAndVerify(executable, references: [baseReference, derivedReference], expectedOutput: "12").VerifyDiagnostics(); 333CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 390CompileAndVerify([code, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 524CompileAndVerify(code, references: [assembly1, assembly2], expectedOutput: "1").VerifyDiagnostics(); 654CompileAndVerify(code, references: [assembly1, assembly2], expectedOutput: "12").VerifyDiagnostics(); 883CompileAndVerify(consumingSource, references: [definingComp.ToMetadataReference()], parseOptions: TestOptions.Regular12, expectedOutput: "8765").VerifyDiagnostics(); 884CompileAndVerify(consumingSource, references: [definingComp.ToMetadataReference()], parseOptions: TestOptions.Regular13, expectedOutput: "4321").VerifyDiagnostics(); 903var verifier = CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition]).VerifyDiagnostics(); 929CompileAndVerify(source).VerifyDiagnostics(); 1064CompileAndVerify(source).VerifyDiagnostics(); 1097var verifier = CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], 1140var verifier = CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], 1194CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "12").VerifyDiagnostics(); 1197CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "12").VerifyDiagnostics(); 1286CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 1289CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "1").VerifyDiagnostics(); 1360CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "21").VerifyDiagnostics(); 1363CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "21").VerifyDiagnostics(); 1415CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "4321").VerifyDiagnostics(); 1418CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "4321").VerifyDiagnostics(); 1565var comp = (CSharpCompilation)CompileAndVerify(source, references: [ilRef], expectedOutput: "12").VerifyDiagnostics().Compilation; 1738CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "123").VerifyDiagnostics(); 1825CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], targetFramework: TargetFramework.Mscorlib461AndCSharp, expectedOutput: "1234").VerifyDiagnostics(); 1828CompileAndVerify(executable, references: new[] { AsReference(comp, useMetadataReference) }, targetFramework: TargetFramework.Mscorlib461AndCSharp, expectedOutput: "1234").VerifyDiagnostics(); 1889var verifier = CompileAndVerify(executable, references: [attrRef.EmitToImageReference(), vbRef]).VerifyDiagnostics(); 1978CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 1981CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "1").VerifyDiagnostics(); 2044CompileAndVerify([executable, source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 2047CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "1").VerifyDiagnostics(); 2118var verifier = CompileAndVerify([handler, executable, OverloadResolutionPriorityAttributeDefinition, InterpolatedStringHandlerAttribute], expectedOutput: "12").VerifyDiagnostics(); 2142CompileAndVerify(executable, references: [AsReference(comp, useMetadataReference)], expectedOutput: "12").VerifyDiagnostics(); 2172CompileAndVerify([executable, definition, implementation, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 2211CompileAndVerify([executable, definition, implementation, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "12").VerifyDiagnostics(); 2647CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics(); 2693CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1234"); 2872CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "E1.R(int)").VerifyDiagnostics(); 2892CompileAndVerify([code, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "params").VerifyDiagnostics(); 2912CompileAndVerify([code, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "params").VerifyDiagnostics(); 2966CompileAndVerify(source1, references: [vbRef], expectedOutput: "1"); 3020CompileAndVerify(source1, references: [vbRef], expectedOutput: "1"); 3077CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "3").VerifyDiagnostics(); 3110CompileAndVerify([source, OverloadResolutionPriorityAttributeDefinition], expectedOutput: "1").VerifyDiagnostics();
PartialEventsAndConstructorsTests.cs (20)
36CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: "partial").VerifyDiagnostics(); 75CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: "partial").VerifyDiagnostics(); 108CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: "partial").VerifyDiagnostics(); 1392CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics(); 1479CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics(); 1496CompileAndVerify(source, expectedOutput: "5").VerifyDiagnostics(); 1692CompileAndVerify(source, 1751CompileAndVerify(source, 1919CompileAndVerify(source, 2186CompileAndVerify(source) 2279CompileAndVerify(sources, 2350CompileAndVerify(sources, 2390CompileAndVerify(source, expectedOutput: "53142").VerifyDiagnostics(); 2562CompileAndVerify(source, expectedOutput: "12").VerifyDiagnostics(); 3066CompileAndVerify(source, 3172CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics( 3245CompileAndVerify([source1, source2, source3], 3250CompileAndVerify([source1, source3, source2], 3306CompileAndVerify(source, 3555CompileAndVerify([source1, source2, CallerArgumentExpressionAttributeDefinition],
RefReadonlyParameterTests.cs (158)
122var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 150var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 325var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 542var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 563var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 584var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 633var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 654var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 677var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, 699var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, 800CompileAndVerify(source, expectedOutput: "4445").VerifyDiagnostics( 815var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify); 834var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), 858var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), 884var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify, 911var verifier = CompileAndVerify(new[] { source, RequiresLocationAttributeDefinition }, options: TestOptions.UnsafeReleaseDll, 1396var verifier3v1 = CompileAndVerify(source3, new[] { comp1v1Ref, comp2Ref }, expectedOutput: "F123").VerifyDiagnostics(); 1419var verifier3v2 = CompileAndVerify(source3, new[] { comp1v2Ref, comp2Ref, comp4Ref }, expectedOutput: "True").VerifyDiagnostics(); 1431CompileAndVerify(source3, new[] { comp1v3Ref, comp2Ref, comp4Ref }, expectedOutput: "F123").VerifyDiagnostics(); 1438CompileAndVerify(source3, new[] { comp1v4Ref, comp2Ref, comp4Ref }, expectedOutput: "F123").VerifyDiagnostics(); 1599var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetStandard20); 2307var verifier = CompileAndVerify(source, expectedOutput: "5"); 2340var verifier = CompileAndVerify(source, expectedOutput: "5"); 2370var verifier = CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails); 2420var verifier = CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails); 2446var verifier = CompileAndVerify(source, expectedOutput: "5"); 2531var verifier = CompileAndVerify(source, expectedOutput: "5"); 2581var verifier = CompileAndVerify(source, expectedOutput: "5"); 2612var verifier = CompileAndVerify(source, expectedOutput: "5"); 2667var verifier = CompileAndVerify(source, expectedOutput: "5"); 2698var verifier = CompileAndVerify(source, expectedOutput: "5"); 2756var verifier = CompileAndVerify(source, expectedOutput: "5"); 2999var verifier = CompileAndVerify(source, expectedOutput: """ 3068var verifier = CompileAndVerify(source, expectedOutput: """ 3113var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: """ 3213CompileAndVerify(source, expectedOutput: "555").VerifyDiagnostics( 3264CompileAndVerify(source, expectedOutput: "555").VerifyDiagnostics( 3308var verifier = CompileAndVerify(new[] { source, RequiresLocationAttributeDefinition }, 3359CompileAndVerify(source, expectedOutput: "65655656").VerifyDiagnostics( 3433CompileAndVerify(source, expectedOutput: """ 3470CompileAndVerify(source, expectedOutput: "object5", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 3471CompileAndVerify(source, expectedOutput: "object5").VerifyDiagnostics(expectedDiagnostics); 3489CompileAndVerify(source, expectedOutput: "c5").VerifyDiagnostics(); 3507CompileAndVerify(source, expectedOutput: "c5").VerifyDiagnostics(); 3570CompileAndVerify(new[] { source1, source3 }, expectedOutput: "25 25").VerifyDiagnostics( 3595CompileAndVerify(source, expectedOutput: "25 25 15").VerifyDiagnostics(); 3667CompileAndVerify(new[] { source1, source3 }, expectedOutput: "15").VerifyDiagnostics(); 3689CompileAndVerify(source, expectedOutput: "25 15 15", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 3755CompileAndVerify(new[] { source1, source3 }, expectedOutput: "256 256 156 156", parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersion)).VerifyDiagnostics(); 3905CompileAndVerify(new[] { source1, source2 }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 3906CompileAndVerify(new[] { source1, source2 }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 3907CompileAndVerify(new[] { source1, source2 }, expectedOutput: expectedOutput).VerifyDiagnostics(); 3915CompileAndVerify(new[] { source1, source3 }, expectedOutput: "1", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 3959CompileAndVerify(new[] { source1, source2 }, expectedOutput: "222").VerifyDiagnostics( 3998CompileAndVerify(source, expectedOutput: "ECC", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 4007CompileAndVerify(source, expectedOutput: "CCC", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 4008CompileAndVerify(source, expectedOutput: "CCC").VerifyDiagnostics(expectedDiagnostics); 4039CompileAndVerify(source, expectedOutput: "YCC", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 4051CompileAndVerify(source, expectedOutput: "CCC", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 4052CompileAndVerify(source, expectedOutput: "CCC").VerifyDiagnostics(expectedDiagnostics); 4083CompileAndVerify(source, expectedOutput: "CCC").VerifyDiagnostics( 4152CompileAndVerify(new[] { source1, source3 }, expectedOutput: expectedOutput3, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics3); 4153CompileAndVerify(new[] { source1, source3 }, expectedOutput: expectedOutput3).VerifyDiagnostics(expectedDiagnostics3); 4163CompileAndVerify(new[] { source1, source4 }, expectedOutput: expectedOutput4, parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 4164CompileAndVerify(new[] { source1, source4 }, expectedOutput: expectedOutput4, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 4165CompileAndVerify(new[] { source1, source4 }, expectedOutput: expectedOutput4).VerifyDiagnostics(); 4188CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 4189CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 4190CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 4213CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 4214CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 4215CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 4236CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics( 4260CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics(); 4297CompileAndVerify(source, expectedOutput: "CCC").VerifyDiagnostics( 4321CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics( 4356CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics( 4394CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics( 4424CompileAndVerify(source, expectedOutput: "E", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 4433CompileAndVerify(source, expectedOutput: "C", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 4434CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics(expectedDiagnostics); 4456CompileAndVerify(source, expectedOutput: "C").VerifyDiagnostics( 4481CompileAndVerify(source, expectedOutput: "plain5plain6").VerifyDiagnostics(); 4950var verifier = CompileAndVerify(source, expectedOutput: "111"); 4985var verifier = CompileAndVerify(source, expectedOutput: "C111"); 5016var verifier = CompileAndVerify(source, expectedOutput: "111"); 5054var verifier = CompileAndVerify(source, expectedOutput: "111"); 5087var verifier = CompileAndVerify(new[] { source, RequiresLocationAttributeDefinition }, 5222var verifier = CompileAndVerify(source, expectedOutput: "1"); 5260var verifier = CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: "1"); 5384var verifier = CompileAndVerify(source, expectedOutput: "5"); 5476var verifier = CompileAndVerify(source, expectedOutput: "1", 5527CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails).VerifyDiagnostics(); 5563CompileAndVerify(source, expectedOutput: "10", verify: Verification.Fails).VerifyDiagnostics(); 5582var verifier = CompileAndVerify(source, expectedOutput: "111"); 5636var verifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "exception2"); 5704var verifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "exception2"); 5870var verifier = CompileAndVerify(source, expectedOutput: """ 5910var verifier = CompileAndVerify(source, expectedOutput: """ 5969var verifier = CompileAndVerify(source, expectedOutput: """ 6015var verifier = CompileAndVerify(source, expectedOutput: """ 6118CompileAndVerify(source, expectedOutput: """ 6154CompileAndVerify(source, expectedOutput: """ 6187CompileAndVerify(source, expectedOutput: """ 6226CompileAndVerify(source, expectedOutput: """ 6278CompileAndVerify(source, expectedOutput: """ 6336CompileAndVerify(source, expectedOutput: """ 6375CompileAndVerify(source, expectedOutput: """ 6414CompileAndVerify(source, expectedOutput: """ 6455CompileAndVerify(source, expectedOutput: """ 6508CompileAndVerify(source, expectedOutput: """ 6569CompileAndVerify(source, expectedOutput: "C.M1").VerifyDiagnostics(); 6591CompileAndVerify(source, expectedOutput: "C.M1").VerifyDiagnostics(); 6616CompileAndVerify(source, expectedOutput: """ 6650CompileAndVerify(source, expectedOutput: """ 6762CompileAndVerify(source, expectedOutput: """ 6805CompileAndVerify(source, expectedOutput: """ 7231CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 7256CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedWarnings); 7257CompileAndVerify(source, expectedOutput: expectedOutput, parseOptions: TestOptions.RegularPreview).VerifyDiagnostics(expectedWarnings); 7338CompileAndVerify(new[] { source1, source2 }, expectedOutput: "X1 Y1 Y2").VerifyDiagnostics( 7358CompileAndVerify(new[] { source1, source3 }, expectedOutput: "Y1 X1 X2").VerifyDiagnostics( 7401CompileAndVerify(source, expectedOutput: "XYYX").VerifyDiagnostics( 7442CompileAndVerify(new[] { source1, source2 }, expectedOutput: "XY").VerifyDiagnostics( 7456CompileAndVerify(new[] { source1, source3 }, expectedOutput: "YX").VerifyDiagnostics( 7493CompileAndVerify(new[] { source1, source2 }, expectedOutput: "XY").VerifyDiagnostics( 7507CompileAndVerify(new[] { source1, source3 }, expectedOutput: "YX").VerifyDiagnostics( 7538var verifier = CompileAndVerify(source, expectedOutput: "CC"); 7577var verifier = CompileAndVerify(source, 7619CompileAndVerify(source1, expectedOutput: "1").VerifyDiagnostics(); 7661CompileAndVerify(source1, expectedOutput: "12", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 7670CompileAndVerify(source2, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 7671CompileAndVerify(source2, expectedOutput: expectedOutput).VerifyDiagnostics(); 7761CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 7762CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput).VerifyDiagnostics(expectedDiagnostics); 7787CompileAndVerify(source3, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 7788CompileAndVerify(source3, new[] { comp1Ref }, expectedOutput: expectedOutput).VerifyDiagnostics(expectedDiagnostics); 7840CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 7841CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput).VerifyDiagnostics(expectedDiagnostics); 7945CompileAndVerify(new[] { source, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8180CompileAndVerify(new[] { source1, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8189CompileAndVerify(new[] { source2, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8273CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8275CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8290CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular11, options: TestOptions.UnsafeDebugExe, 8305CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8307CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8353CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8355CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8485CompileAndVerify(source1, expectedOutput: "1232").VerifyDiagnostics( 8493CompileAndVerify(source2, expectedOutput: "1214").VerifyDiagnostics( 8542CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 8543CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput).VerifyDiagnostics(expectedDiagnostics); 8570CompileAndVerify(source3, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular11).VerifyDiagnostics( 8582CompileAndVerify(source3, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 8583CompileAndVerify(source3, new[] { comp1Ref }, expectedOutput: expectedOutput).VerifyDiagnostics(expectedDiagnostics); 8632CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 8633CompileAndVerify(source2, new[] { comp1Ref }, expectedOutput: expectedOutput).VerifyDiagnostics(expectedDiagnostics);
RefStructInterfacesTests.cs (15)
2976var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: (tS1IsClass == ThreeState.True || tS2IsClass == ThreeState.True ? null : "12"), verify: Verification.Fails); 22841var verifier = CompileAndVerify(source, 22865var verifier = CompileAndVerify(source, 22892var verifier = CompileAndVerify(source, 22922var verifier = CompileAndVerify(source, 22953var verifier = CompileAndVerify(source, 22984var verifier = CompileAndVerify(source, 23015var verifier = CompileAndVerify(source, 23047var verifier = CompileAndVerify(source, 23078var verifier = CompileAndVerify(source, 23109var verifier = CompileAndVerify(source, 23134var verifier = CompileAndVerify(source, 23163var verifier = CompileAndVerify(source, 23194var verifier = CompileAndVerify(source, 23219var verifier = CompileAndVerify(source,
RefUnsafeInIteratorAndAsyncTests.cs (19)
357CompileAndVerify(source, expectedOutput: "456").VerifyDiagnostics(); 376CompileAndVerify(source, expectedOutput: "123").VerifyDiagnostics(); 452CompileAndVerify(source, expectedOutput: IfSpans("456"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 472CompileAndVerify(source, expectedOutput: IfSpans("123"), verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 514CompileAndVerify(source, expectedOutput: "0").VerifyDiagnostics(); 533CompileAndVerify(source, expectedOutput: "0").VerifyDiagnostics(); 683CompileAndVerify(source, expectedOutput: "-1 456").VerifyDiagnostics(); 713CompileAndVerify(source, expectedOutput: "-1 456").VerifyDiagnostics(); 768CompileAndVerify(source, expectedOutput: "123-1").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(); 1104CompileAndVerify(source, expectedOutput: "-1 0").VerifyDiagnostics(); 1159CompileAndVerify(source, expectedOutput: "0-1").VerifyDiagnostics(); 1182CompileAndVerify(source, expectedOutput: "123").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(); 1280CompileAndVerify(source, expectedOutput: "123").VerifyDiagnostics();
Semantics\CollectionExpressionTests.cs (357)
505CompileAndVerify( 532CompileAndVerify( 739CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [], (System.Int32[]) [1, 2], "); 763CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Collections.Generic.List<System.Int32>) [], (System.Collections.Generic.List<System.Int32>) [1, 2], "); 837CompileAndVerify([source, s_collectionExtensions], parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput); 838CompileAndVerify([source, s_collectionExtensions], parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput); 932CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1], (System.Int32[]) [2], "); 984CompileAndVerify( 1005CompileAndVerify( 1044CompileAndVerify([source, s_collectionExtensions], parseOptions: TestOptions.Regular13, 1046CompileAndVerify([source, s_collectionExtensions], parseOptions: TestOptions.RegularPreview, 1097CompileAndVerify( 1190CompileAndVerify( 1216CompileAndVerify( 2081CompileAndVerify( 2167CompileAndVerify( 2202CompileAndVerify( 2209CompileAndVerify( 2241CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 2242CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput).VerifyDiagnostics(); 2265CompileAndVerify(source, expectedOutput: "string[]"); 2283CompileAndVerify(source, 2333CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput); 2334CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput); 2362CompileAndVerify(source, 2368CompileAndVerify(source, 2405CompileAndVerify( 2412CompileAndVerify( 2419CompileAndVerify( 2489CompileAndVerify(source, 2495CompileAndVerify(source, 2501CompileAndVerify(source, 2658CompileAndVerify(source, 2664CompileAndVerify(source, 2670CompileAndVerify(source, 2841CompileAndVerify(source, 2847CompileAndVerify(source, 2853CompileAndVerify(source, 3219CompileAndVerify(source, expectedOutput: """ 3240CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[][]) [[], [1, 2, 3]], (System.Int32[][][]) [[[]], [[1, 2, 3]]], "); 3258CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Byte[][]) [[], [1, 2, 3]], (System.Byte[][][]) [[[]], [[1, 2, 3]]], "); 3296CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1, 2, 3], (System.Byte[][]) [[4, 5]], "); 3386CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [4, null], "); 3585CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1, 2, 3], "); 3604CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Object[]) [1], (System.Object[]) [3], "); 3623CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int64[]) [1], (System.Int64[]) [3], "); 3643CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Collections.Generic.HashSet<System.Int64>) [1], (System.Collections.Generic.HashSet<System.Int64>) [3], "); 3660CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1, 2, 3], "); 3710CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [2], (System.Int32[]) [4], "); 3753CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Collections.Generic.List<System.Int32[]>) [[4, 5], []], "); 3792CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1], (System.Object[]) [3], "); 3832CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [0, 2], (System.Nullable<System.Int32>[]) [null, 4], "); 3879CompileAndVerify( 4095CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Action[]) [null, System.Action], (D[]) [D, D], "); 4115CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Func<System.Int32>[]) [null, System.Func`1[System.Int32]], (D[]) [D, D], "); 4139CompileAndVerify( 4162CompileAndVerify( 4223CompileAndVerify( 4271CompileAndVerify( 4302CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Object[]) [1], (System.Object[]) [2], (System.Object[]) [3], (System.Object[]) [3], (System.Object[]) [4], "); 4323CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1], (System.Int32[]) [3], "); 4401CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Int32[]) [1, 2], (System.Object[]) [1, 2, 3], (System.Object[]) [3, 1, 2], "); 4419CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Object[]) [1, 2, 3], "); 4437CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "(System.Object[]) [1, 2, 3], "); 4509CompileAndVerify( 4592CompileAndVerify( 4618CompileAndVerify( 4637var verifier = CompileAndVerify( 4703CompileAndVerify( 4727CompileAndVerify( 5172var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], [3, 4, 5], [null, 7], "); 5258var verifier = CompileAndVerify(source, expectedOutput: """ 5336CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [null, 2], "); 5403var verifier = CompileAndVerify( 5583CompileAndVerify( 5608CompileAndVerify( 6114CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("0, 2, ")); 6185CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("[0, 2], ")); 6207var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("1010")); 6299var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("10200")); 6432var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], [3, 4, 5], [null, 7], "); 6540CompileAndVerify(new[] { sourceA, sourceB1, s_collectionExtensions }, expectedOutput: "[], "); 6640CompileAndVerify(new[] { sourceA, sourceB1, s_collectionExtensions }, expectedOutput: "[], [], "); 6657CompileAndVerify(new[] { sourceA, sourceB2, s_collectionExtensions }, expectedOutput: "[1, 2], [3, 4], "); 6691CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [], [1, 2], [3, 4], "); 6725CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [], [1, 2], [3, 4], "); 6787CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], [], [1, 2], "); 6824var verifier = CompileAndVerify(source); 6984CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [i=1, o=2], "); 7159CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], "); 7186CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], "); 7212CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], "); 7239CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [1, 2], "); 7286var verifier = CompileAndVerify(new[] { sourceA, sourceB2, s_collectionExtensions }, expectedOutput: "[3], "); 7699CompileAndVerify(source, expectedOutput: "1, 3, "); 7791CompileAndVerify(source, expectedOutput: "1, 3, "); 7867CompileAndVerify(source, expectedOutput: "1, 3, "); 7970CompileAndVerify(source, expectedOutput: "1, 3, "); 8003CompileAndVerify(source, expectedOutput: "1, 3, "); 8559CompileAndVerify(new[] { sourceA, sourceB1 }, expectedOutput: "1, null, 3, "); 8610CompileAndVerify(new[] { sourceA, sourceB1 }, expectedOutput: "1, null, 3, "); 8660CompileAndVerify(new[] { sourceA, sourceB1 }, expectedOutput: "1, null, "); 8728CompileAndVerify(new[] { sourceA, sourceB }, verify: Verification.FailsILVerify, expectedOutput: "1, 2, "); 8776CompileAndVerify(new[] { sourceA, sourceB }, verify: Verification.FailsILVerify, expectedOutput: "1, 2, "); 8936CompileAndVerify(new[] { sourceA, sourceB3, s_collectionExtensions }, expectedOutput: "[3], [4], "); 8986var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], [null, 2], "); 9241CompileAndVerify(new[] { sourceC, s_collectionExtensions }, references: new[] { refA, refB }, expectedOutput: "[], [1, 2], [], [3, 4], "); 9281CompileAndVerify(new[] { source, s_collectionExtensions }, parseOptions: parseOptions.WithPreprocessorSymbols("DEBUG"), expectedOutput: "[1, 2, 3], "); 9282CompileAndVerify(new[] { source, s_collectionExtensions }, parseOptions: parseOptions, expectedOutput: "[2], "); 9312CompileAndVerify(new[] { source, s_collectionExtensions }, parseOptions: parseOptions.WithPreprocessorSymbols("DEBUG"), expectedOutput: "[1, 2, 3], "); 9313CompileAndVerify(new[] { source, s_collectionExtensions }, parseOptions: parseOptions, expectedOutput: "[3], "); 9331CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[], "); 9390var verifier = CompileAndVerify( 9508var verifier = CompileAndVerify( 9628var verifier = CompileAndVerify( 9788var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3, 4], "); 9882var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [1, 2, 3], [1, 2, 3], "); 10060CompileAndVerify( 10082CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3, 4], "); 10140var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, references: new[] { CSharpRef }, options: TestOptions.ReleaseExe, expectedOutput: "[1, 2, 3], "); 10368var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, references: new[] { CSharpRef }, options: TestOptions.ReleaseExe, expectedOutput: "[1, 2, 3], "); 10552var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3], "), verify: Verification.Skipped); 10606var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3], "), verify: Verification.Skipped); 10694var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3], "), verify: Verification.Skipped); 10750var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[(1, 1), (2, 2), (3, 3)], "), verify: Verification.Skipped); 10804var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[(1, 1), (2, 2), (3, 3)], "), verify: Verification.Skipped); 10903var verifier = CompileAndVerify([source, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[[1], [2], [3]], "), verify: Verification.Skipped); 10930CompileAndVerify(new[] { source, s_collectionExtensions }, references: new[] { CSharpRef }, expectedOutput: "[1, 2, 3], "); 11264var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [1, 2, 3],", verify: Verification.Skipped); 11317var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 11395var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [1, 2, 3],", verify: Verification.Skipped); 11531var verifier = CompileAndVerify( 11623var verifier = CompileAndVerify( 11918CompileAndVerify( 11943CompileAndVerify( 11969var verifier = CompileAndVerify( 12135CompileAndVerify( 12381var verifier = CompileAndVerify( 12546var verifier = CompileAndVerify( 12926var verifier = CompileAndVerify( 13231CompileAndVerify( 13256CompileAndVerify( 13335var verifier = CompileAndVerify( 13929CompileAndVerify( 13968CompileAndVerify( 14806CompileAndVerify(source, expectedOutput: """ 15223var verifier = CompileAndVerify( 15300verifier = CompileAndVerify( 15712var verifier = CompileAndVerify( 15795CompileAndVerify( 15844CompileAndVerify( 15893CompileAndVerify( 15942CompileAndVerify( 16049CompileAndVerify( 16114CompileAndVerify( 16158CompileAndVerify( 16254CompileAndVerify( 16374CompileAndVerify( 17052CompileAndVerify( 17115CompileAndVerify( 17176var verifier = CompileAndVerify( 17367CompileAndVerify( 17416CompileAndVerify( 17465CompileAndVerify( 17511CompileAndVerify( 17557CompileAndVerify( 17649CompileAndVerify( 17842CompileAndVerify( 17894CompileAndVerify( 18195CompileAndVerify( 18266CompileAndVerify( 18430CompileAndVerify( 18474CompileAndVerify( 19113CompileAndVerify( 19176CompileAndVerify( 19640CompileAndVerify( 20035var verifier = CompileAndVerify( 20395var verifier = CompileAndVerify( 20496var verifier = CompileAndVerify( 20621var verifier = CompileAndVerify( 20831var verifier = CompileAndVerify( 20876var verifier = CompileAndVerify( 21232var verifier = CompileAndVerify( 21365var verifier = CompileAndVerify( 21519var verifier = CompileAndVerify( 21616var verifier = CompileAndVerify( 21730var verifier = CompileAndVerify( 21838var verifier = CompileAndVerify( 21946var verifier = CompileAndVerify( 22118CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[0, 1], "); 22166CompileAndVerify(new[] { source, s_collectionExtensions }, verify: Verification.Skipped, expectedOutput: "[0, 1], "); 22257var verifier = CompileAndVerify( 22357var verifier = CompileAndVerify( 22409var verifier = CompileAndVerify( 22482var verifier = CompileAndVerify( 22764var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 22793verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 22850var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 22893verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 22963var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 23006verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("11")); 23074var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 23103verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("12")); 23156var verifier = CompileAndVerify( 23282var verifier = CompileAndVerify( 23349var verifier = CompileAndVerify( 23460var verifier = CompileAndVerify( 23562var verifier = CompileAndVerify( 23632var verifier = CompileAndVerify( 23697var verifier = CompileAndVerify( 23874var verifier = CompileAndVerify( 23983var verifier = CompileAndVerify( 24043var verifier = CompileAndVerify( 24166var verifier = CompileAndVerify( 24241var verifier = CompileAndVerify( 24296var verifier = CompileAndVerify( 24358var verifier = CompileAndVerify( 24454var verifier = CompileAndVerify( 24528var verifier = CompileAndVerify( 24616var verifier = CompileAndVerify( 24671var verifier = CompileAndVerify( 24755var verifier = CompileAndVerify( 24810var verifier = CompileAndVerify( 24865var verifier = CompileAndVerify( 24932var verifier = CompileAndVerify( 25070var verifier = CompileAndVerify( 25203var verifier = CompileAndVerify( 25291var verifier = CompileAndVerify( 25369var verifier = CompileAndVerify( 25436var verifier = CompileAndVerify( 25500var verifier = CompileAndVerify( 25567var verifier = CompileAndVerify( 25692var verifier = CompileAndVerify( 25778var verifier = CompileAndVerify( 25815var verifier = CompileAndVerify( 25875var verifier = CompileAndVerify( 27926CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2], [3, 4], "); 27956CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[3, 1, 2, 4], "); 29577CompileAndVerify( 29634CompileAndVerify( 30168var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30226var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[[1, 2, 3]],"), verify: Verification.Skipped); 30268var verifier = CompileAndVerify([sourceA, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[],"), verify: Verification.Skipped); 30335var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30374var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30575var verifier = CompileAndVerify( 30703var verifier = CompileAndVerify(new[] { sourceA, s_collectionExtensions }, targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30750var verifier = CompileAndVerify([sourceA, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30781var verifier = CompileAndVerify([sourceA, s_collectionExtensions], targetFramework: TargetFramework.Net80, expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), verify: Verification.Skipped); 30843var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(WithSpanAllocWarning)); 30872verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 33552var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: "[1, 2, 3], [1, 2, 3],"); 33598var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 33662var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 33706var 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); 33803var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[D, D],"), verify: Verification.Skipped, targetFramework: TargetFramework.Net80); 33911var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.Fails, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80); 33995var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe); 34078var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80); 34227var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[Derived], [Derived, Derived],"), targetFramework: TargetFramework.Net80); 34335var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80); 34496var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 34595var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 34899var verifier = CompileAndVerify(source, expectedOutput: "a"); 34936var verifier = CompileAndVerify([source, s_collectionExtensionsWithSpan], expectedOutput: IncludeExpectedOutput("[a], [a], "), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 34981var verifier = CompileAndVerify([source, s_collectionExtensionsWithSpan], expectedOutput: IncludeExpectedOutput("[a], [a], "), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35019var verifier = CompileAndVerify(source, expectedOutput: "a"); 35085var verifier = CompileAndVerify(source, expectedOutput: "a"); 35150var verifier = CompileAndVerify(source, expectedOutput: "1"); 35216var verifier = CompileAndVerify(source, expectedOutput: "a"); 35247var verifier = CompileAndVerify(source, expectedOutput: "a"); 35502var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35559var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 2],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35788var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35836var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35879var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 35991var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], ")); 36063var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], ")); 36138var verifier = CompileAndVerify(new[] { source, s_collectionExtensions }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], ")); 36186var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36217var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c],", verify: Verification.Skipped); 36255var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c], [1, 2, 3], [a, b, c], [1, 2, 3], ", verify: Verification.Skipped); 36369var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c],", verify: Verification.Skipped); 36437var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c],", verify: Verification.Skipped); 36508var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36545var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36577var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: IncludeExpectedOutput("[1, 2, 3],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 36649var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36704var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: expectedOutput, verify: Verification.Skipped); 36757var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36811var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36895var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 36987var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3],", verify: Verification.Skipped); 37069var verifier = CompileAndVerify(source, expectedOutput: IncludeExpectedOutput("1234"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37198var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, 4, 5, 6],", verify: Verification.Skipped); 37303var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], [1, 2, 3], [1, 2, 3], ", verify: Verification.Skipped); 37400var verifier = CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[a, b, c], [a, b, c], [a, b, c], [a, b, c], ", verify: Verification.Skipped); 37514var verifier = CompileAndVerify( 37641var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3, 4],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37692var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[a, b, c], [a, b, c, d],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37758var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[a, b, c], [a, b, c],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37826var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[a, b, c], [a, b, c, a, b, c],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 37864var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, expectedOutput: IncludeExpectedOutput("[1, 2, 3], [1, 2, 3, 4],"), targetFramework: TargetFramework.Net80, verify: Verification.Skipped); 38931CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[Element, null], "); 38962CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[Element, null], "); 38992CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[[a], [b], [c]], "); 39061CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 39095CompileAndVerify([sourceA, sourceB, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 39144CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 39181CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 39195CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 39250CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39322CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39355CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39425CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39519CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39564CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39616CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39674CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 39877CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 39891CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], expectedOutput: "[null], [null], "); 39970CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 40117CompileAndVerify([sourceB, sourceA, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 40176var verifier = CompileAndVerify([sourceB, sourceA, s_collectionExtensions], expectedOutput: "[null], [a], [a, b],"); 40223CompileAndVerify([sourceB1, sourceA, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 40336CompileAndVerify([sourceB1, sourceA, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 40371CompileAndVerify([sourceB1, sourceA, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 40490CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 40584CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 40598CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], expectedOutput: "[null], [null], "); 40633CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3, null], "); 40669CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, null, 2, null, 3, null], "); 40712CompileAndVerify([sourceB, sourceA, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 40763CompileAndVerify([source, s_collectionExtensions], expectedOutput: expectedOutput); 40998CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41048CompileAndVerify([sourceA, sourceB, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41200CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41230CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41282CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41325CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41354CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41460CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41541CompileAndVerify([sourceA, sourceB1, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41586CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41640CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], expectedOutput: "[System.Func`2[System.Object,System.Int32], System.Func`2[System.Object,System.String]], "); 41698CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], expectedOutput: "[System.Func`2[System.Object,System.Int32], System.Func`2[System.Object,System.String]], "); 41732CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41773CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41825CompileAndVerify([sourceA, sourceB, sourceC, s_collectionExtensions], options: TestOptions.UnsafeReleaseExe, expectedOutput: "[1, 2, 3], "); 41893CompileAndVerify([sourceA, sourceB2, s_collectionExtensions], options: TestOptions.UnsafeReleaseExe, expectedOutput: "[1, 2, 3], "); 41926CompileAndVerify([source, s_collectionExtensions], expectedOutput: "[1, 2, 3], "); 41976CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: "1, 2, "); 42020CompileAndVerify([sourceC, s_collectionExtensions], references: [refA, refB], expectedOutput: "[1, 2, 3], "); 42077CompileAndVerify([sourceC, s_collectionExtensions], references: [refA, refB], expectedOutput: "[1, 2, 3], "); 42629var verifier = CompileAndVerify( 42742CompileAndVerify( 43671var verifier = CompileAndVerify(
Semantics\ExpressionOptionalAndNamedArgumentsTests.cs (5)
169var verifier = CompileAndVerify( 210var verifier = CompileAndVerify( 627var verifier = CompileAndVerify( 666var verifier = CompileAndVerify( 799var verifier = CompileAndVerify(
Semantics\ExtensionOperatorsTests.cs (12)
3640var verifier = CompileAndVerify(source).VerifyDiagnostics(); 3705var verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """ 3780var verifier = CompileAndVerify(source).VerifyDiagnostics(); 9860var verifier = CompileAndVerify(source).VerifyDiagnostics(); 9930var verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """ 10010var verifier = CompileAndVerify(source).VerifyDiagnostics(); 18376var verifier = CompileAndVerify(source).VerifyDiagnostics(); 18443var verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """ 18520var verifier = CompileAndVerify(source).VerifyDiagnostics(); 26460var verifier = CompileAndVerify(source).VerifyDiagnostics(); 26533var verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """ 26616var verifier = CompileAndVerify(source).VerifyDiagnostics();
Semantics\ExtensionTests.cs (40)
20666CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 20670var verifier = CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 20814CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 20818CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 20855CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 20859var verifier = CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 20988var verifier = CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 21017CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21053CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 21057CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21148CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 21152CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21237CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 21241CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify); 21284var verifier = CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 21319CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21411CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 21415CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21509var verifier = CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21539CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21590var verifier = CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21625CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 21674var verifier = CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, verify: Verification.Fails).VerifyDiagnostics(); 21695CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, verify: Verification.Fails) 22011var verifier = CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, verify: Verification.Fails).VerifyDiagnostics(); 22041CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, verify: Verification.Fails) 22614CompileAndVerify([exeSource, src], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 22618CompileAndVerify(exeSource, references: [useMetadataRef ? comp1.ToMetadataReference() : comp1.EmitToImageReference()], targetFramework: TargetFramework.Net90, expectedOutput: expectedOutput, verify: Verification.FailsPEVerify) 38578CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 38627CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 38675CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 38718CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 38807var verifier = CompileAndVerify(source, expectedOutput: "23"); 38914var verifier = CompileAndVerify(source, expectedOutput: "23"); 40823var verifier = CompileAndVerify(source).VerifyDiagnostics(); 40928var verifier = CompileAndVerify(source).VerifyDiagnostics(); 41050var verifier = CompileAndVerify(source).VerifyDiagnostics(); 41144var verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """ 41255verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """ 41301var verifier = CompileAndVerify(source, verify: Verification.FailsPEVerify with { PEVerifyMessage = """
Semantics\ExtensionTests2.cs (9)
10754CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """ 10897CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C`1", """ 11199CompileAndVerify(src2, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C`1", """ 11625CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """ 11661CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """ 11697CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """ 11733CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """ 11813CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """ 12070CompileAndVerify(src2, options: TestOptions.UnsafeDebugDll, targetFramework: TargetFramework.Net90, verify: Verification.FailsPEVerify).VerifyTypeIL("C", """
Semantics\InlineArrayTests.cs (13)
20363CompileAndVerify(src, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 20366CompileAndVerify(src, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 20825CompileAndVerify(src, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 20828CompileAndVerify(src, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 21043CompileAndVerify(src, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 21046CompileAndVerify(src, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 21781CompileAndVerify(src, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 21784CompileAndVerify(src, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 22103CompileAndVerify(src, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 22106CompileAndVerify(src, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 22288CompileAndVerify(src, parseOptions: TestOptions.Regular13, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 22291CompileAndVerify(src, targetFramework: TargetFramework.Net80, options: TestOptions.ReleaseExe, 23348var verifier = CompileAndVerify(src, expectedOutput: ExecutionConditionUtil.IsDesktop ? null : "042",
Semantics\LockTests.cs (56)
76var verifier = CompileAndVerify([source, LockTypeDefinition], expectedOutput: "1E2D31E2D3", 132var verifier = CompileAndVerify(source, 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(); 1365CompileAndVerify(source, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "ELD" : null, 1405var verifier = CompileAndVerify(source, expectedOutput: "L", verify: Verification.FailsILVerify); 1473var verifier = CompileAndVerify(source, expectedOutput: "L", verify: Verification.FailsILVerify); 1521var verifier = CompileAndVerify(source, [lib], expectedOutput: "ELD"); 1613var verifier = CompileAndVerify(source, [lib1, lib2], expectedOutput: "E1 L1 D1 E2 L2 D2"); 1637CompileAndVerify(sources, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput, 1639CompileAndVerify(sources, expectedOutput: expectedOutput, 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, 1942var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 2006verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 2082var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 2237verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 2391var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 2503verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 2611var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 2675verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 2750var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 2905verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 3055var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 3119verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 3194var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 3349verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 3543var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 3547verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 3582var verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.ReleaseExe, 3586verifier = CompileAndVerify([source, LockTypeDefinition], options: TestOptions.DebugExe, 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 (7)
20069CompileAndVerify(text, references: new[] { CSharpRef }).VerifyIL("Cls.Main()", 20123CompileAndVerify(text, references: new[] { CSharpRef }).VerifyIL("Cls.Main()", 20383CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 32972var comp = CompileAndVerify(source, expectedOutput: "MMM"); 33035var comp = CompileAndVerify(source, expectedOutput: "MMM"); 36274CompileAndVerify(source, expectedOutput: @"1"); 36296CompileAndVerify(source, expectedOutput: @"1");
Semantics\ParamsCollectionTests.cs (16)
384var verifier = CompileAndVerify( 410verifier = CompileAndVerify( 3017var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringCustomHandlerType("CustomHandler", "struct", useBoolReturns: false, includeOneTimeHelpers: false) }, targetFramework: TargetFramework.Net80, 3121CompileAndVerify([source, InterpolatedStringHandlerAttribute], expectedOutput: """ 5581CompileAndVerify( 5638CompileAndVerify( 5723CompileAndVerify(source, expectedOutput: "string[]"); 5741CompileAndVerify(source, 5787CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: "List<byte>"); 5808CompileAndVerify(source, 12492CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "DisposedDisposed").VerifyDiagnostics(); 16236CompileAndVerify([source, CollectionExpressionTests.s_collectionExtensions], expectedOutput: "[Element, null], "); 16271CompileAndVerify([source, CollectionExpressionTests.s_collectionExtensions], expectedOutput: "[Element, null], "); 16305CompileAndVerify([sourceA, sourceB1, CollectionExpressionTests.s_collectionExtensions], expectedOutput: "[[a], [b], [c]], "); 16495var verifier = CompileAndVerify( 16509verifier = CompileAndVerify(
Semantics\PatternMatchingTests_ListPatterns.cs (12)
281var verifier = CompileAndVerify(new[] { source, TestSources.Index, TestSources.Range }, parseOptions: TestOptions.RegularWithListPatterns, 5715CompileAndVerify(new[] { src, TestSources.Index, TestSources.Range }, expectedOutput: "Index Range (42, 43)"); 5754CompileAndVerify(new[] { src, TestSources.Index, TestSources.Range }, expectedOutput: "(a, bc)"); 7644var verifier = CompileAndVerify(new[] { source, TestSources.Index }, options: TestOptions.DebugDll); 7741var verifier = CompileAndVerify(new[] { source, TestSources.Index }); 9007CompileAndVerify(source, expectedOutput: "012").VerifyDiagnostics( 9051CompileAndVerify(source, expectedOutput: "012").VerifyDiagnostics( 9147CompileAndVerify(source, expectedOutput: "012").VerifyDiagnostics( 9211CompileAndVerify(source, expectedOutput: "112").VerifyDiagnostics( 9254CompileAndVerify(source, expectedOutput: "112").VerifyDiagnostics( 9297CompileAndVerify(source, expectedOutput: "212").VerifyDiagnostics( 9340CompileAndVerify(source, expectedOutput: "212").VerifyDiagnostics(
Semantics\PatternMatchingTests2.cs (8)
3090CompileAndVerify(source, expectedOutput: "8"); 3133CompileAndVerify(source, expectedOutput: @" 3178var verifier = CompileAndVerify(source, expectedOutput: @" 3334var verifier = CompileAndVerify(source, expectedOutput: @" 3484CompileAndVerify(source, expectedOutput: "128"); 3554CompileAndVerify(source, expectedOutput: "128"); 3580CompileAndVerify(source, expectedOutput: expected).VerifyDiagnostics(); 3637CompileAndVerify(source, expectedOutput: expected).VerifyDiagnostics();
Semantics\PatternMatchingTests3.cs (11)
6217var verifier = CompileAndVerify(source, expectedOutput: "42"); 6260var verifier = CompileAndVerify(source, expectedOutput: "42"); 6302var verifier = CompileAndVerify(source, expectedOutput: "42"); 6341var verifier = CompileAndVerify(source, expectedOutput: "42"); 6385var verifier = CompileAndVerify(source, expectedOutput: 6432var verifier = CompileAndVerify(source, expectedOutput: "42"); 6497var verifier = CompileAndVerify(source, expectedOutput: ""); 6530var verifier = CompileAndVerify(source, expectedOutput: 6581var verifier = CompileAndVerify(source, expectedOutput: 6637var verifier = CompileAndVerify(source, expectedOutput: 6770var verifier = CompileAndVerify(source, expectedOutput: "22");
Semantics\PatternMatchingTests5.cs (4)
1850CompileAndVerify(program, parseOptions: TestOptions.RegularWithExtendedPropertyPatterns, expectedOutput: @" 3178var compilation = CompileAndVerify(source, expectedOutput: "True"); 3227var compilation = CompileAndVerify(source, expectedOutput: "True"); 3294var compilation = CompileAndVerify(source, expectedOutput: "True");
Semantics\PrimaryConstructorTests.cs (13)
1047var verifier = CompileAndVerify(src, expectedOutput: @" 1286var verifier = CompileAndVerify(src, expectedOutput: @" 1943var verifier = CompileAndVerify(src, expectedOutput: @" 2005var verifier = CompileAndVerify(src, expectedOutput: @"1").VerifyDiagnostics(); 2635var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 2746var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 2793var verifier = CompileAndVerify(src, expectedOutput: @" 3043var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 3172var comp = CompileAndVerify(source, expectedOutput: "Main"); 7042var verifier = CompileAndVerify(source, expectedOutput: 7091var verifier = CompileAndVerify(source, expectedOutput: 8697var verifier = CompileAndVerify(src, expectedOutput: @"TrueFalse").VerifyDiagnostics( 14094var verifier = CompileAndVerify(source, expectedOutput: " 0 1 2 3 2 3", options: TestOptions.DebugExe);
Semantics\RecordTests.cs (12)
31=> base.CompileAndVerify( 1664var verifier = CompileAndVerify(src, expectedOutput: "True", parseOptions: TestOptions.Regular10); 2481var verifier = CompileAndVerify( 21127var verifier = CompileAndVerify(RuntimeUtilities.IsCoreClrRuntime ? src2 : new[] { src2, IsExternalInitTypeDefinition }, 25201var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25261var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25338var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25395var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25470var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25554var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25624var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25692var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, expectedOutput: "Main",
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (2)
EndToEndTests.cs (2)
363CompileAndVerify(source, options: options).VerifyDiagnostics(); 682var verifier = CompileAndVerify(files.ToArrayAndFree(), parseOptions: TestOptions.Regular.WithFeature("InterceptorsNamespaces", "global"), expectedOutput: makeExpectedOutput());
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (4)
IOperation\IOperationTests_IArgument.cs (4)
1899CompileAndVerify(new[] { source }, expectedOutput: expectedOutput); 2093CompileAndVerify(new[] { csharp }, new[] { ilReference }, expectedOutput: expectedOutput); 2212CompileAndVerify(new[] { csharp }, new[] { ilReference }, expectedOutput: expectedOutput); 2332CompileAndVerify(new[] { csharp }, new[] { ilReference }, expectedOutput: expectedOutput);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1354)
Semantics\AccessCheckTests.cs (5)
1361CompileAndVerify(text).VerifyDiagnostics( 1380CompileAndVerify(text).VerifyDiagnostics( 1399CompileAndVerify(text).VerifyDiagnostics( 1420CompileAndVerify(text).VerifyDiagnostics(); 1436CompileAndVerify(text).VerifyDiagnostics();
Semantics\AmbiguousOverrideTests.cs (2)
68CompileAndVerify(source, expectedOutput: "121314"); 1359var verifier = CompileAndVerify(csharp, new[] { reference }, options: TestOptions.ReleaseExe, expectedOutput: @"
Semantics\AnonymousFunctionTests.cs (7)
23=> CompileAndVerify( 38var verifier = CompileAndVerify( 1187var verifier = CompileAndVerify( 1446CompileAndVerify(source, expectedOutput: "123456", parseOptions: TestOptions.Regular9); 1560CompileAndVerify(source, expectedOutput: "123456", parseOptions: TestOptions.Regular9); 1581CompileAndVerify(source, expectedOutput: "hello world", parseOptions: TestOptions.Regular9); 1612CompileAndVerify(source, expectedOutput: "12", parseOptions: TestOptions.Regular9);
Semantics\ArglistTests.cs (11)
193var verifier = CompileAndVerify(source: text, expectedOutput: "System.Int32", verify: Verification.FailsILVerify); 361var verifier = CompileAndVerify(source: text, expectedOutput: "System.String", verify: Verification.FailsILVerify); 411var verifier = CompileAndVerify(source: text, expectedOutput: ""); 482var verifier = CompileAndVerify(source: text, expectedOutput: expectedOutput); 675var verifier = CompileAndVerify(source: text, expectedOutput: "1123", verify: Verification.FailsILVerify); 792var verifier = CompileAndVerify(source: text, expectedOutput: @"42 905var verifier = CompileAndVerify(source: text, expectedOutput: "4242", verify: Verification.FailsILVerify); 1619CompileAndVerify(@" 1643CompileAndVerify(@" 1679CompileAndVerify(source, expectedOutput: "111", verify: Verification.FailsILVerify).VerifyDiagnostics(); 1698CompileAndVerify(source, expectedOutput: "111", verify: Verification.FailsILVerify).VerifyDiagnostics();
Semantics\AwaitExpressionTests.cs (4)
491CompileAndVerify(text, options: TestOptions.ReleaseExe, expectedOutput: "Passed").VerifyDiagnostics(); 492CompileAndVerify(text, options: TestOptions.DebugExe, expectedOutput: "Passed").VerifyDiagnostics(); 535CompileAndVerify(text, options: TestOptions.ReleaseExe, expectedOutput: "Passed").VerifyDiagnostics(); 536CompileAndVerify(text, options: TestOptions.DebugExe, expectedOutput: "Passed").VerifyDiagnostics();
Semantics\BindingAsyncTasklikeTests.cs (3)
194CompileAndVerify(source, targetFramework: TargetFramework.Empty, references: new[] { MscorlibRef_v4_0_30316_17626 }, expectedOutput: "better"); 516CompileAndVerify(source, targetFramework: TargetFramework.Empty, references: new[] { MscorlibRef_v4_0_30316_17626 }, expectedOutput: "1"); 567CompileAndVerify(source, targetFramework: TargetFramework.Empty, references: new[] { MscorlibRef_v4_0_30316_17626 }, expectedOutput: "bbbb");
Semantics\BindingTests.cs (6)
1965CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1987CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 2080CompileAndVerify(@" 2299CompileAndVerify( 2575CompileAndVerify(source, expectedOutput: "42"); 2687CompileAndVerify(source, expectedOutput: "True");
Semantics\ColorColorTests.cs (5)
1583CompileAndVerify(source2, new[] { ref1 }, expectedOutput: "42").VerifyDiagnostics( 1624CompileAndVerify(source2, new[] { ref1 }, expectedOutput: "42").VerifyDiagnostics( 1662CompileAndVerify(source2, new[] { ref1 }, expectedOutput: "42").VerifyDiagnostics( 1703CompileAndVerify(source2, new[] { ref1 }, expectedOutput: "42").VerifyDiagnostics( 2427CompileAndVerify(source).VerifyDiagnostics();
Semantics\ConditionalOperatorTests.cs (9)
272var verifier = CompileAndVerify(source, expectedOutput: @"B 388var verifier = CompileAndVerify(source, expectedOutput: @"BDBD"); 547var verifier = CompileAndVerify(source, expectedOutput: @"BDBD"); 646var verifier = CompileAndVerify(source, expectedOutput: @"BDBD"); 711var verifier = CompileAndVerify( 783var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1"); 848var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1"); 924var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1"); 1002var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1");
Semantics\ConstantTests.cs (3)
1521CompileAndVerify(source, expectedOutput: 3967CompileAndVerify(@" 3986CompileAndVerify(@"
Semantics\DeconstructionTests.cs (6)
956var comp = CompileAndVerify(source, expectedOutput: "M M 43"); 1688var comp = CompileAndVerify(source, expectedOutput: "(1, hello) (1, hello) (1, hello)"); 1759var comp = CompileAndVerify(source, expectedOutput: "((1, hello), 3)"); 1834var comp = CompileAndVerify(source, expectedOutput: "(1, 1, 1, 1, 1, 1, 1, 1, 9)"); 3244var comp = CompileAndVerify(source, expectedOutput: "42"); 3774var verifier = CompileAndVerify(source, sourceSymbolValidator: validator);
Semantics\DelegateTypeTests.cs (343)
323CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 367CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 402CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 435CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 558CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 600CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 3461CompileAndVerify(new[] { source, s_utils }, parseOptions: TestOptions.RegularPreview, expectedOutput: "System.Func<System.Object>, System.Action<System.Object, System.Int32>"); 3488CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: 3518CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: 3566CompileAndVerify(new[] { source, s_utils }, parseOptions: TestOptions.RegularPreview, expectedOutput: "System.Action<System.Object>"); 3846CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, references: new[] { CSharpRef }, expectedOutput: "Microsoft.CSharp.RuntimeBinder.RuntimeBinderException"); 3871CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 3901CompileAndVerify(source, expectedOutput: 4794CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 4795CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 4796CompileAndVerify(source, expectedOutput: expectedOutput); 4823CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 4829CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: 4859CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 4865CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: 4895CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: @"E.M"); 4898CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: @"C.M"); 4953CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: 4996CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: 5060CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "extension, extension, "); 5061CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: "extension, instance, "); 5062CompileAndVerify(source, expectedOutput: "extension, instance, "); 5088CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "extension, extension, "); 5089CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: "extension, instance, "); 5090CompileAndVerify(source, expectedOutput: "extension, instance, "); 5118CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "extension, extension, "); 5119CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: "extension, instance, "); 5120CompileAndVerify(source, expectedOutput: "extension, instance, "); 5233CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5234CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5235CompileAndVerify(source, expectedOutput: expectedOutput); 5259CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5260CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5261CompileAndVerify(source, expectedOutput: expectedOutput); 5282CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5283CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5284CompileAndVerify(source, expectedOutput: expectedOutput); 5310CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5311CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5312CompileAndVerify(source, expectedOutput: expectedOutput); 5338CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 5526CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5527CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5528CompileAndVerify(source, expectedOutput: expectedOutput); 5555CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5556CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5557CompileAndVerify(source, expectedOutput: expectedOutput); 5576CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5577CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5578CompileAndVerify(source, expectedOutput: expectedOutput); 5599CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5600CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5601CompileAndVerify(source, expectedOutput: expectedOutput); 5622CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5623CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5624CompileAndVerify(source, expectedOutput: expectedOutput); 5645CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5646CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5647CompileAndVerify(source, expectedOutput: expectedOutput); 5669CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5670CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5671CompileAndVerify(source, expectedOutput: expectedOutput); 5712CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5713CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5714CompileAndVerify(source, expectedOutput: expectedOutput); 5743CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5744CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5745CompileAndVerify(source, expectedOutput: expectedOutput); 5806CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5807CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5808CompileAndVerify(source, expectedOutput: expectedOutput); 5838CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 5839CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5840CompileAndVerify(source, expectedOutput: expectedOutput); 5878CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5879CompileAndVerify(source, expectedOutput: expectedOutput); 5914CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5915CompileAndVerify(source, expectedOutput: expectedOutput); 5950CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5951CompileAndVerify(source, expectedOutput: expectedOutput); 5982CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 5983CompileAndVerify(source, expectedOutput: expectedOutput); 6014CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6015CompileAndVerify(source, expectedOutput: expectedOutput); 6116CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6117CompileAndVerify(source, expectedOutput: expectedOutput); 6193CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 6194CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6195CompileAndVerify(source, expectedOutput: expectedOutput); 6224CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 6271CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 6279CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6280CompileAndVerify(source, expectedOutput: expectedOutput); 6313CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 6321CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6322CompileAndVerify(source, expectedOutput: expectedOutput); 6382CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6383CompileAndVerify(source, expectedOutput: expectedOutput); 6433CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 6434CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 6435CompileAndVerify(source, expectedOutput: expectedOutput); 6527CompileAndVerify(source, expectedOutput: "1").VerifyDiagnostics(); 6856CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersion), 6905CompileAndVerify([source1, source3], parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6906CompileAndVerify([source1, source3], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6907CompileAndVerify([source1, source3], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6946CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6947CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6948CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6987CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6988CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 6989CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7028CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7029CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7030CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7079CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7080CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7125CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7126CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7127CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7172CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 7173CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 7174CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 7217CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 7218CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 7253CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 7254CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 7289CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7290CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7338CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 7339CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 7381CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7382CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 7481CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7482CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7511CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7512CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7533CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7556CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7589CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7622CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7692CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7761CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7873CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 7966CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7967CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 7997CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8023CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8078CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8150CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8172CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8290CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8321CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8358CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8397CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8430CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8471CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8516CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8547CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 8548CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 8653CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 8654CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 8755CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 8756CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 8863CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 8939CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 9284CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 9285CompileAndVerify(source, expectedOutput: expectedOutput); 9319CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 9320CompileAndVerify(source, expectedOutput: expectedOutput); 9415CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 9416CompileAndVerify(source, expectedOutput: expectedOutput); 9893CompileAndVerify(source, parseOptions: TestOptions.Regular9); 9894CompileAndVerify(source, parseOptions: TestOptions.Regular10); 9895CompileAndVerify(source); 9922CompileAndVerify(source, parseOptions: TestOptions.Regular9); 9923CompileAndVerify(source, parseOptions: TestOptions.Regular10); 9924CompileAndVerify(source); 10053CompileAndVerify(source, parseOptions: TestOptions.Regular9); 10054CompileAndVerify(source, parseOptions: TestOptions.Regular10); 10055CompileAndVerify(source); 10078CompileAndVerify(source, parseOptions: TestOptions.Regular9); 10079CompileAndVerify(source, parseOptions: TestOptions.Regular10); 10080CompileAndVerify(source); 10104CompileAndVerify(source, parseOptions: TestOptions.Regular9); 10105CompileAndVerify(source, parseOptions: TestOptions.Regular10); 10106CompileAndVerify(source); 10130CompileAndVerify(source, parseOptions: TestOptions.Regular9); 10131CompileAndVerify(source, parseOptions: TestOptions.Regular10); 10132CompileAndVerify(source); 10153CompileAndVerify(source, parseOptions: TestOptions.Regular9); 10154CompileAndVerify(source, parseOptions: TestOptions.Regular10); 10155CompileAndVerify(source); 10180CompileAndVerify(source, parseOptions: TestOptions.Regular9); 10181CompileAndVerify(source, parseOptions: TestOptions.Regular10); 10182CompileAndVerify(source); 10631CompileAndVerify(new[] { source, s_utils }, options: TestOptions.DebugExe, expectedOutput: 10749CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 10750CompileAndVerify(source, expectedOutput: expectedOutput); 10826CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 10827CompileAndVerify(source, expectedOutput: expectedOutput); 10898CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 10899CompileAndVerify(source, expectedOutput: expectedOutput); 10924CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: expectedOutput); 10925CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 10926CompileAndVerify(source, expectedOutput: expectedOutput); 10986CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 10996CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput); 10997CompileAndVerify(source, expectedOutput: expectedOutput); 12234CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12279CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12398CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12455CompileAndVerify(new[] { sourceA, sourceB, sourceC }, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12490CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12527CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12554CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12608CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12674CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12737CompileAndVerify(sourceB, references: new[] { refA }, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12794CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12835CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 12909CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: 12971CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: 13030CompileAndVerify(source, verify: Verification.Skipped, expectedOutput: 13087CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 13131CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 13275CompileAndVerify(source, expectedOutput: $""" 13321CompileAndVerify(source, expectedOutput: $""" 13344CompileAndVerify(source, expectedOutput: $""" 13367CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: $""" 13390CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: $""" 13425CompileAndVerify(source, expectedOutput: $""" 13448CompileAndVerify(source, expectedOutput: $""" 13472CompileAndVerify(source, expectedOutput: $""" 13506CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13507CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13508var verifier = CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13547CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13548CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13549var verifier = CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13580CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 13581CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 13582CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 13610CompileAndVerify(source, parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13611CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13612var verifier = CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13653var verifier = CompileAndVerify(source3, [comp2Ref, comp1aRef], 13677CompileAndVerify(source3, [comp2Ref, comp1b.EmitToImageReference()], parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13678CompileAndVerify(source3, [comp2Ref, comp1b.EmitToImageReference()], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13679verifier = CompileAndVerify(source3, [comp2Ref, comp1b.EmitToImageReference()], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13728CompileAndVerify(source, parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13729var verifier = CompileAndVerify(source, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13795CompileAndVerify(source3, [comp2Ref, comp1bRef], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13796var verifier = CompileAndVerify(source3, [comp2Ref, comp1bRef], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13846CompileAndVerify([source1, source2], parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 13847CompileAndVerify([source1, source2], expectedOutput: expectedOutput).VerifyDiagnostics(); 13860CompileAndVerify([source1, source3], parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13861CompileAndVerify([source1, source3], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13862var verifier = CompileAndVerify([source1, source3], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13927CompileAndVerify(source3, [comp2Ref, comp1bRef], parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 13928CompileAndVerify(source3, [comp2Ref, comp1bRef], expectedOutput: expectedOutput).VerifyDiagnostics(); 13941CompileAndVerify(source4, [comp2Ref, comp1bRef], parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13942CompileAndVerify(source4, [comp2Ref, comp1bRef], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13943var verifier = CompileAndVerify(source4, [comp2Ref, comp1bRef], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 13982CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 13983CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 13984var verifier = CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 14025CompileAndVerify(source3, [comp2Ref, comp1aRef], parseOptions: TestOptions.Regular12, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 14026CompileAndVerify(source3, [comp2Ref, comp1aRef], parseOptions: TestOptions.Regular13, symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 14027var verifier = CompileAndVerify(source3, [comp2Ref, comp1aRef], symbolValidator: validateSymbols, expectedOutput: expectedOutput).VerifyDiagnostics(); 14054CompileAndVerify(source3, [comp2Ref, comp1bRef], parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 14055CompileAndVerify(source3, [comp2Ref, comp1bRef], parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 14056verifier = CompileAndVerify(source3, [comp2Ref, comp1bRef], expectedOutput: expectedOutput).VerifyDiagnostics(); 14165var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 14217var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 14282var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 14492CompileAndVerify(source, expectedOutput: @"1"); 14510CompileAndVerify(source, expectedOutput: @"<>F{00000001}`2[System.Int32,System.Int32]"); 14653CompileAndVerify(source, expectedOutput: 14713CompileAndVerify(source, expectedOutput: 14781CompileAndVerify(source, expectedOutput: 15305CompileAndVerify(source, parseOptions: TestOptions.Regular9, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 15306CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 15722var verifier = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview); 15745CompileAndVerify(source, expectedOutput: "A.M()").VerifyDiagnostics(); 15839var verifier = CompileAndVerify(source, expectedOutput: 15862var verifier = CompileAndVerify(source, expectedOutput: "7 <>f__AnonymousDelegate0`4[System.Int32,System.Int32,System.Int32,System.Int32]"); 15963var verifier = CompileAndVerify(source, expectedOutput: "abc <>f__AnonymousDelegate0`4[System.String,System.String,System.String,System.String]"); 15986CompileAndVerify(source, expectedOutput: 16010CompileAndVerify(source, expectedOutput: 16033CompileAndVerify(source, expectedOutput: 16058CompileAndVerify(source, expectedOutput: 16105CompileAndVerify(source, expectedOutput: "20"); 16124CompileAndVerify(source, expectedOutput: "2"); 16438var verifier = CompileAndVerify(source, expectedOutput: 16505CompileAndVerify(source, expectedOutput: "0.3333333333333333333333333333"); 16524var verifier = CompileAndVerify(source, expectedOutput: "file::member:0"); 16571var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 16642CompileAndVerify(source, expectedOutput: "7"); 16692CompileAndVerify(source, expectedOutput: 16727CompileAndVerify(source, expectedOutput: 16762CompileAndVerify(source, expectedOutput: 16797CompileAndVerify(source, expectedOutput: 16824CompileAndVerify(source, expectedOutput: "defaultstring"); 16849CompileAndVerify(source, expectedOutput: "string1").VerifyDiagnostics(); 16874CompileAndVerify(source, expectedOutput: "my string").VerifyDiagnostics(); 16896CompileAndVerify(source, expectedOutput: "string1").VerifyDiagnostics(); 16946var verifier = CompileAndVerify(source); 17018CompileAndVerify(source, expectedOutput: "-1 a 0").VerifyDiagnostics(); 17041var verifier = CompileAndVerify(source, expectedOutput: @"10 a 0"); 17076CompileAndVerify(source, expectedOutput: 17265CompileAndVerify(source, expectedOutput: "4").VerifyDiagnostics(); 17285CompileAndVerify(source, expectedOutput: "3").VerifyDiagnostics(); 17334CompileAndVerify(source, expectedOutput: expectedOutput); 17529var verifier = CompileAndVerify(source, expectedOutput: 17607CompileAndVerify(source, expectedOutput: """ 17630CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: "True").VerifyDiagnostics(); 17644CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4").VerifyDiagnostics(); 17660var verifier = CompileAndVerify(source, expectedOutput: ""); 17750var verifier = CompileAndVerify(source); 17855CompileAndVerify(source, expectedOutput: 17900CompileAndVerify(source, expectedOutput: 17965var verifier = CompileAndVerify(source, expectedOutput: """ 17985var verifier = CompileAndVerify(source).VerifyDiagnostics(); 18077var verifier = CompileAndVerify(source, expectedOutput: """ 18099var verifier = CompileAndVerify(source).VerifyDiagnostics(); 18206var verifier = CompileAndVerify(source, expectedOutput: """ 18264var verifier = CompileAndVerify(source, expectedOutput: """ 18283var verifier = CompileAndVerify(source).VerifyDiagnostics(); 18364var verifier = CompileAndVerify(source, expectedOutput: """ 18385var verifier = CompileAndVerify(source).VerifyDiagnostics(); 18476var verifier = CompileAndVerify(source, expectedOutput: """ 18511CompileAndVerify(source, expectedOutput: 18533CompileAndVerify(source, expectedOutput: 19361CompileAndVerify(source, expectedOutput: """ 19390var verifier = CompileAndVerify(source, expectedOutput: "<>f__AnonymousDelegate0`2[System.Int32,System.Int32]").VerifyDiagnostics(); 19428var verifier = CompileAndVerify(source, expectedOutput: "<>c").VerifyDiagnostics(); 19487var verifier = CompileAndVerify(source).VerifyDiagnostics(
Semantics\DynamicTests.cs (15)
1009CompileAndVerify(@" 1552CompileAndVerify(source, new[] { CSharpRef }, 1574CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, new[] { CSharpRef }, 1596CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, new[] { CSharpRef }, 1616CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, new[] { CSharpRef }, 1641CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, targetFramework: TargetFramework.Net70, 1669CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, new[] { CSharpRef }, 1695var verifier = CompileAndVerify(source, new[] { CSharpRef }).VerifyDiagnostics(); 3195CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp); 3855var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: "System.Object").VerifyDiagnostics(); 3886CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: "System.Object").VerifyDiagnostics(); 3888var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: "System.Object").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(); 3995var verifier = CompileAndVerify(source, new[] { CSharpRef }, options: TestOptions.DebugDll).VerifyDiagnostics();
Semantics\ExpressionBodiedMemberTests.cs (4)
352CompileAndVerify(source, expectedOutput: "GetAction 1"); 372CompileAndVerify(source, expectedOutput: "12"); 389CompileAndVerify(source, expectedOutput: "1"); 410CompileAndVerify(source, expectedOutput: "12");
Semantics\ForEachTests.cs (1)
2046CompileAndVerify(source, expectedOutput: expectedOutput);
Semantics\FunctionPointerTests.cs (3)
2690var verifier = CompileAndVerify(@" 2715var verifier = CompileAndVerify(@" 2933var verifier = CompileAndVerify(@"
Semantics\GenericConstraintsTests.cs (37)
459CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 478CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 497CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 516CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 674CompileAndVerify(code, expectedOutput: @" 983CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 1018CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 1035CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 1190CompileAndVerify(code, expectedOutput: @" 1468CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 1503CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 1520CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 1675CompileAndVerify(code, expectedOutput: @" 1909CompileAndVerify( 2129CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 2154CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 2175CompileAndVerify(code, sourceSymbolValidator: validator, symbolValidator: validator); 2192CompileAndVerify(code, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 2414CompileAndVerify(@" 2496CompileAndVerify(@" 2546CompileAndVerify(@" 2599CompileAndVerify(@" 2619CompileAndVerify(@" 2644CompileAndVerify(@" 2716CompileAndVerify(@" 2773CompileAndVerify(@" 2794CompileAndVerify(@" 2817CompileAndVerify(@" 2841CompileAndVerify(@" 2952CompileAndVerify( 3016CompileAndVerify(@" 3050CompileAndVerify(@" 3092CompileAndVerify(@" 3929CompileAndVerify(code, options: TestOptions.UnsafeReleaseExe, expectedOutput: "42", verify: Verification.Skipped); 3962CompileAndVerify(code, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped) 4259CompileAndVerify(code, 4315CompileAndVerify(code,
Semantics\ImplicitlyTypedLocalsTests.cs (1)
112var verifier = CompileAndVerify(alias + text, expectedOutput: "1");
Semantics\ImplicitObjectCreationTests.cs (1)
4941var verifier = CompileAndVerify(source, expectedOutput: "0231");
Semantics\InitOnlyMemberTests.cs (5)
4213var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4248var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4288var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4327var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4413var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @"
Semantics\InterceptorsTests.cs (114)
136var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 178var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature("InterceptorsNamespaces", "NS1"), expectedOutput: "1"); 181verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature("InterceptorsNamespaces", "NS1;NS2"), expectedOutput: "1"); 304var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature("InterceptorsNamespaces", featureValue), expectedOutput: "1"); 364var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature("InterceptorsNamespaces", "global"), expectedOutput: "1"); 367verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: TestOptions.Regular.WithFeature("InterceptorsNamespaces", "global"), expectedOutput: "1"); 431var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 463var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor 1"); 532var verifier = CompileAndVerify(new[] { (source1, "Program.cs"), (source2, "Other.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "interceptor 1"); 571var verifier = CompileAndVerify([source, (interceptors, "Interceptors.cs")], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 629var comp2Verifier = CompileAndVerify((source2, "Program.cs"), references: new[] { comp1.ToMetadataReference() }, parseOptions: RegularWithInterceptors, expectedOutput: "1"); 635comp2Verifier = CompileAndVerify((source2, "Program.cs"), references: new[] { comp1.EmitToImageReference() }, parseOptions: RegularWithInterceptors, expectedOutput: "1"); 671var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call site"); 707var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call site"); 743var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call site"); 959var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 1038var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "CD"); 1151var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 1185var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, emitOptions: EmitOptions.Default.WithEmitMetadataOnly(true)); 1276var comp1 = CompileAndVerify(new[] { (source1, "Program.cs") }, new[] { comp0.ToMetadataReference() }, parseOptions: RegularWithInterceptors, expectedOutput: "interceptable 1"); 1282comp1 = CompileAndVerify(new[] { (source1, "Program.cs") }, new[] { comp0.EmitToImageReference() }, parseOptions: RegularWithInterceptors, expectedOutput: "interceptable 1"); 1387var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 1557var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call site"); 1593var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call site"); 1658var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 1732var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor Hello World"); 1766var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 1802var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1234"); 1836var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 1906var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call siteinterceptable call site"); 1947var verifier = CompileAndVerify((source2, "Program.cs"), references: new[] { comp1.ToMetadataReference() }, parseOptions: RegularWithInterceptors, expectedOutput: "interceptor call site"); 2420var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "12"); 2504var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 2584var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "111222"); 2656var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1122"); 2699var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1a1a2b2b"); 2779var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1a2b"); 2825var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1a1a2b2b"); 2872var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "123123456456"); 2916var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "123123456456"); 2978var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 3978var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "111222333"); 4045var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1122"); 4152var verifier = CompileAndVerify(new[] { source, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Original"); 4155verifier = CompileAndVerify(new[] { source, interceptor, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Intercepted"); 4189var verifier = CompileAndVerify(new[] { source, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Original"); 4276var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 4319var verifier = CompileAndVerify([source, interceptor, s_attributesSource, UnscopedRefAttributeDefinition], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 4587var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "123456"); 4686var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "123456"); 4735var verifier = CompileAndVerify([ 4790var verifier = CompileAndVerify([ 4847var verifier = CompileAndVerify([ 4885var verifier = CompileAndVerify(new[] { (source, "Program.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "interceptor 1"); 4954var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 4983var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5013var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5071var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularWithInterceptors, verify: Verification.Skipped); 5115var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5151var verifier = CompileAndVerify([source, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5289var verifier = CompileAndVerify( 5319var verifier = CompileAndVerify( 5355var verifier = CompileAndVerify( 5498var verifier = CompileAndVerify( 5575var verifier = CompileAndVerify( 5610var verifier = CompileAndVerify( 5643var verifier = CompileAndVerify( 5710var verifier = CompileAndVerify(new[] { (source, @"C:\src\Program.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5754var verifier = CompileAndVerify(new[] { (source, @"C:/src\Program.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5800var verifier = CompileAndVerify(new[] { (source, PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"C:\obj\Generated.cs" : "/obj/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "1"); 6016var verifier = CompileAndVerify( 6131var verifier = CompileAndVerify([source2, source3, s_attributesSource], 6242var verifier = CompileAndVerify(new[] { program, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Second"); 6259verifier = CompileAndVerify(new[] { program, interceptor, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Wrong ValueSecond"); 6299var verifier = CompileAndVerify(new[] { program, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "False"); 6318verifier = CompileAndVerify(new[] { program, interceptor, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "True"); 6369var verifier = CompileAndVerify([program, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "False"); 6385verifier = CompileAndVerify([program, interceptor, s_attributesSource], parseOptions: RegularWithInterceptors, expectedOutput: "True"); 6449var verifier = CompileAndVerify(new[] { program, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Original"); 6462verifier = CompileAndVerify(new[] { program, interceptor, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Interceptor"); 6511var verifier = CompileAndVerify(new[] { source, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Original"); 6514verifier = CompileAndVerify(new[] { source, interceptor, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Interceptor"); 6553var verifier = CompileAndVerify(new[] { source, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Original"); 6556verifier = CompileAndVerify(new[] { source, interceptor, s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "Interceptor"); 7349var verifier = CompileAndVerify([source, interceptors, CSharpTestSource.Parse(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1"); 7364verifier = CompileAndVerify([source, interceptors, CSharpTestSource.Parse(s_attributesSource.text, s_attributesSource.path, RegularWithInterceptors)], expectedOutput: "1"); 7761var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 7806var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 7888var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 7930var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 7976var verifier = CompileAndVerify( 8029var verifier = CompileAndVerify( 8074var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 8133var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 8193var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 8248var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 8303var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 8353var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "1"); 8409var verifier = CompileAndVerify([source, interceptors, s_attributesTree], expectedOutput: "12"); 8514CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "42 ran").VerifyDiagnostics(); 8544CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 8698CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "4243").VerifyDiagnostics(); 8729CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran C").VerifyDiagnostics(); 8785CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 8810CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 8844CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran1 ran2").VerifyDiagnostics(); 8894CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran1 ran2 ran3 ran4").VerifyDiagnostics(); 8981CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 9012var verifier = CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 9446CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran0 ran1").VerifyDiagnostics(); 9473CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 9501CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "ran").VerifyDiagnostics(); 9527CompileAndVerify([source, interceptors, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "(System.Object, System.Int32)").VerifyDiagnostics(); 9539CompileAndVerify([(source, "Program.cs"), interceptors2, s_attributesSource], parseOptions: RegularPreviewWithInterceptors, expectedOutput: "(System.Object, System.Int32)").VerifyDiagnostics(
Semantics\InterpolationTests.cs (56)
47CompileAndVerify(source, expectedOutput: expectedOutput); 64CompileAndVerify(source, expectedOutput: expectedOutput); 81CompileAndVerify(source, expectedOutput: expectedOutput); 98CompileAndVerify(source, expectedOutput: expectedOutput); 226CompileAndVerify(source, expectedOutput: expectedOutput); 242var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 268var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 299CompileAndVerify(source, expectedOutput: expectedOutput); 322CompileAndVerify(source, expectedOutput: expectedOutput); 346var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: expectedOutput).VerifyDiagnostics(); 633CompileAndVerify(source, expectedOutput: expectedOutput); 678CompileAndVerify(source, expectedOutput: expectedOutput); 831CompileAndVerify(source + formattableString, expectedOutput: "True"); 866CompileAndVerify(source + formattableString, expectedOutput: "12311211"); 905CompileAndVerify( 920CompileAndVerify(source + formattableString, expectedOutput: "X = 123 ."); 1533CompileAndVerify(source + formattableString, expectedOutput: 1702var verifier = CompileAndVerify(new[] { code, handler }, expectedOutput: @" 1841var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: expectedOutput); 2257var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net50, parseOptions: TestOptions.Regular10); 2652CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2673CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2693var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"base1"); 2867var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2979var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3246var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerAttribute }); 3682var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3766CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"value:1"); 3778var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"value:1"); 3815var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3882var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3965var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, targetFramework: TargetFramework.NetCoreApp, expectedOutput: @" 4148var verifier = CompileAndVerify(source, expectedOutput: @" 4563CompileAndVerify(source, expectedOutput: "value:1"); 4593CompileAndVerify(new[] { source, InterpolatedStringHandlerAttribute }, expectedOutput: "literal:l"); 8325verifier = CompileAndVerify(executableCode, new[] { d }, expectedOutput: @" 8447verifier = CompileAndVerify(executableCode, new[] { d }, expectedOutput: expectedOutput); 9753var verifier = CompileAndVerify( 9862var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: "1literal:literal", symbolValidator: validator, sourceSymbolValidator: validator); 11869var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: @" 16775var verifier = CompileAndVerify(code, expectedOutput: @"123456"); 16793var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringHandlerDefinition(includeSpanOverloads: false, useDefaultParameters: false, useBoolReturns: false) }, expectedOutput: @" 17262var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringCustomHandlerType("CustomHandler", "struct", useBoolReturns: false) }, expectedOutput: @" 17390var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 17454var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @""); 17562var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 17615var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 17656var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 17707var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 17753var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 17869var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1"); 17900var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "2"); 17951var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1"); 18042var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, 18249CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, 18991CompileAndVerify(source, expectedOutput: "C1:dog");
Semantics\IteratorTests.cs (6)
299CompileAndVerify(source, options: TestOptions.ReleaseExe, 411CompileAndVerify(text).VerifyDiagnostics(); 436CompileAndVerify(text).VerifyDiagnostics(); 476CompileAndVerify(text).VerifyDiagnostics(); 534CompileAndVerify(text).VerifyDiagnostics(); 649var comp = CompileAndVerify(source, expectedOutput: "0,1,2,3", options: TestOptions.DebugExe);
Semantics\LambdaTests.cs (7)
913CompileAndVerify(new[] { source }, expectedOutput: expectedOutput); 976CompileAndVerify(source, expectedOutput: "Local = 2, Field = 1"); 5679CompileAndVerify(sourceB, references: new[] { refA }, parseOptions: TestOptions.RegularPreview, expectedOutput: 6071CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: 6149CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: @"System.Int64"); 8280CompileAndVerify(source, expectedOutput: """ 8426CompileAndVerify(source, expectedOutput: """
Semantics\LocalFunctionTests.cs (17)
3789CompileAndVerify(source, expectedOutput: "2"); 3808CompileAndVerify(source, expectedOutput: "2"); 3832CompileAndVerify(source, expectedOutput: "3"); 3867CompileAndVerify(source, expectedOutput: "4"); 4118CompileAndVerify( 4148CompileAndVerify( 4174CompileAndVerify( 4203CompileAndVerify( 4233CompileAndVerify( 4720CompileAndVerify(source, expectedOutput: "23", sourceSymbolValidator: m => 5918CompileAndVerify(source, expectedOutput: 6578CompileAndVerify(source, expectedOutput: 6770CompileAndVerify(source, expectedOutput: 6893CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: m => 6918CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "System.Int32", symbolValidator: m => 6948CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "System.Int32", symbolValidator: m => 6978var verifier = CompileAndVerify(source, expectedOutput:
Semantics\LookupTests.cs (1)
1462CompileAndVerify(source, sourceSymbolValidator: validator, symbolValidator: validator);
Semantics\MethodTypeInferenceTests.cs (2)
542CompileAndVerify(source).VerifyDiagnostics(); 608CompileAndVerify(source).VerifyDiagnostics();
Semantics\MultiDimensionalArrayTests.cs (4)
98var verifier = CompileAndVerify(source: source, expectedOutput: expected); 142var verifier = CompileAndVerify(source: source, expectedOutput: expected); 162var verifier = CompileAndVerify(source: source, expectedOutput: expected); 183var verifier = CompileAndVerify(source: source, expectedOutput: expected);
Semantics\NameCollisionTests.cs (12)
179CompileAndVerify(source).VerifyDiagnostics(); 205CompileAndVerify(source).VerifyDiagnostics(); 315CompileAndVerify(source).VerifyDiagnostics(); 511CompileAndVerify(source).VerifyDiagnostics(); 668CompileAndVerify(source).VerifyDiagnostics(); 694CompileAndVerify(source).VerifyDiagnostics(); 722CompileAndVerify(source).VerifyDiagnostics(); 978CompileAndVerify(source).VerifyDiagnostics(); 1503CompileAndVerify(source).VerifyDiagnostics(); 1591CompileAndVerify(source).VerifyDiagnostics(); 1645CompileAndVerify(source).VerifyDiagnostics(); 1748CompileAndVerify(source).VerifyDiagnostics();
Semantics\NamedAndOptionalTests.cs (20)
76CompileAndVerify(source, expectedOutput: expected); 594CompileAndVerify(source, expectedOutput: expected); 643CompileAndVerify(source, expectedOutput: "123012704256"); 696CompileAndVerify(source, expectedOutput: expected); 718CompileAndVerify(source, expectedOutput: expected); 774var c = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify); 991CompileAndVerify(source, expectedOutput: "0"); 1031CompileAndVerify(source).VerifyDiagnostics(); 1345var verifier = CompileAndVerify(new[] { sourceDefinitions, sourceCalls }, expectedOutput: expected); 1350CompileAndVerify(new[] { sourceCalls }, new[] { assembly.GetReference() }, expectedOutput: expected); 1377CompileAndVerify(source).VerifyDiagnostics(); 1793var verifier = CompileAndVerify(source, expectedOutput: @" 1867var verifier = CompileAndVerify(source, expectedOutput: 1944var verifier = CompileAndVerify(source, expectedOutput: 2013var verifier = CompileAndVerify(source, expectedOutput: "2"); 2103CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 2154CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 2236CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 2319CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 2396CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false));
Semantics\NameOfTests.cs (57)
149var comp = CompileAndVerify(source, expectedOutput: @" 506CompileAndVerify(source, expectedOutput: @" 553CompileAndVerify(source, expectedOutput: 572CompileAndVerify(source, expectedOutput: @"Contains"); 1620CompileAndVerify(@" 1815CompileAndVerify(source, parseOptions: TestOptions.Regular11, expectedOutput: expectedOutput).VerifyDiagnostics(); 1816CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 1817CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput).VerifyDiagnostics(); 1850CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 1851CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput).VerifyDiagnostics(); 1906CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 1907CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput).VerifyDiagnostics(); 1947CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: expectedOutput).VerifyDiagnostics(); 1948CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: expectedOutput).VerifyDiagnostics(); 1967CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "Length").VerifyDiagnostics(); 1968CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "Length").VerifyDiagnostics(); 2011CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "Length").VerifyDiagnostics(); 2012CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "Length").VerifyDiagnostics(); 2037CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "Length").VerifyDiagnostics(); 2038CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "Length").VerifyDiagnostics(); 2056CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "StaticProp").VerifyDiagnostics(); 2057CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "StaticProp").VerifyDiagnostics(); 2075CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "StaticProp").VerifyDiagnostics(); 2076CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "StaticProp").VerifyDiagnostics(); 2096CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "M").VerifyDiagnostics(); 2097CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "M").VerifyDiagnostics(); 2115CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "StaticMethod").VerifyDiagnostics(); 2116CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "StaticMethod").VerifyDiagnostics(); 2228CompileAndVerify(source, parseOptions: TestOptions.Regular11, expectedOutput: "StaticMethod").VerifyDiagnostics(); 2229CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "StaticMethod").VerifyDiagnostics(); 2249CompileAndVerify(source, parseOptions: TestOptions.Regular11, expectedOutput: "Length").VerifyDiagnostics(); 2250CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "Length").VerifyDiagnostics(); 2271CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "StaticMethod").VerifyDiagnostics(); 2272CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "StaticMethod").VerifyDiagnostics(); 2296CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "Prop").VerifyDiagnostics(); 2297CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "Prop").VerifyDiagnostics(); 2321CompileAndVerify(source, parseOptions: TestOptions.Regular12, expectedOutput: "Prop").VerifyDiagnostics(); 2322CompileAndVerify(source, parseOptions: TestOptions.RegularPreview, expectedOutput: "Prop").VerifyDiagnostics(); 2374CompileAndVerify(""" 2401CompileAndVerify(""" 2464CompileAndVerify(""" 2476CompileAndVerify(""" 2489CompileAndVerify(""" 2502CompileAndVerify(""" 2515CompileAndVerify(""" 2627CompileAndVerify(""" 2639CompileAndVerify(""" 2681CompileAndVerify(""" 2693CompileAndVerify(""" 2709CompileAndVerify(""" 2725CompileAndVerify(""" 2741CompileAndVerify(""" 2757CompileAndVerify(""" 2778CompileAndVerify(""" 2961CompileAndVerify(""" 2988CompileAndVerify(""" 3017CompileAndVerify("""
Semantics\NativeIntegerTests.cs (7)
4513var verifier = CompileAndVerify(source, expectedOutput: @"1"); 13798var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 14071CompileAndVerify(new[] { sourceA, sourceB }, parseOptions: TestOptions.Regular9, expectedOutput: 14174var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 14821var verifier = CompileAndVerify(source); 15545CompileAndVerify(""" 15585CompileAndVerify("""
Semantics\NonTrailingNamedArgumentsTests.cs (16)
40var verifier = CompileAndVerify(source, expectedOutput: "First 1 2. Second 3 4.", parseOptions: TestOptions.Regular7_2); 86var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 114var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 138var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 194var verifier = CompileAndVerify(source, expectedOutput: "1 2. 1 2.", parseOptions: TestOptions.Regular7_2); 225var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 261var verifier = CompileAndVerify(source, expectedOutput: "Get 1 2. Set 3 4 5.", parseOptions: TestOptions.Regular7_2); 336var verifier1 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.ToMetadataReference() }); 339var verifier2 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.EmitToImageReference() }); 388var verifier = CompileAndVerify(source, expectedOutput: "1 hi.", parseOptions: TestOptions.Regular7_2); 507var comp = CompileAndVerify(source, expectedOutput: "1 2. 2 3. 3 4,5."); 739var verifier = CompileAndVerify(source, expectedOutput: "Second 3 2."); 771var verifier = CompileAndVerify(source, expectedOutput: "Second 3 2."); 798var comp = CompileAndVerify(source, expectedOutput: "42"); 948var verifier = CompileAndVerify(source, expectedOutput: "1 2 3 4 Length:2"); 1128var comp = CompileAndVerify(source, expectedOutput: "1 2 34. 1 2 56.");
Semantics\NullableConversionTests.cs (9)
36var verifier = CompileAndVerify(source: source, expectedOutput: "AB"); 85var verifier = CompileAndVerify(source: source, expectedOutput: expectedOutput); 148var verifier = CompileAndVerify(source: source, expectedOutput: expectedOutput); 173CompileAndVerify(source, expectedOutput: "Hola"); 217CompileAndVerify(source, expectedOutput: "TrueTrue"); 252CompileAndVerify(source, expectedOutput: "Imp S::int? -> S True"); 284CompileAndVerify(source, expectedOutput: "123t"); 312CompileAndVerify(source, expectedOutput: "implicit C"); 363CompileAndVerify(source, expectedOutput: "2");
Semantics\NullableReferenceTypesTests.cs (17)
2652CompileAndVerify(source1, expectedOutput: @"22"); 115768CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, options: WithNullableEnable()); 116608var verifier = CompileAndVerify( 138322CompileAndVerify(source, symbolValidator: validate).VerifyDiagnostics(); 138362CompileAndVerify(source, symbolValidator: validate).VerifyDiagnostics(); 138410CompileAndVerify(source, symbolValidator: validate).VerifyDiagnostics(); 138474CompileAndVerify(source, symbolValidator: validate).VerifyDiagnostics( 138504CompileAndVerify(source, symbolValidator: validate).VerifyDiagnostics( 138531var verifier1 = CompileAndVerify(source1, symbolValidator: validate, targetFramework: TargetFramework.Mscorlib40); 138584var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 138622var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 138653var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 138687var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 138732var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 138774var verifier = CompileAndVerify(source2, [comp1], 156627CompileAndVerify(source1, references: new[] { ref0 }, expectedOutput: "B`1[A]"); 156677CompileAndVerify(source1, references: new[] { ref0 }, expectedOutput: "C");
Semantics\NullableTests.cs (23)
184var verifier = CompileAndVerify(source: source2, expectedOutput: "0"); 185verifier = CompileAndVerify(source: source2, expectedOutput: "0"); 208verifier = CompileAndVerify(source: source3, expectedOutput: "1", verify: Verification.FailsPEVerify); 209verifier = CompileAndVerify(source: source3, expectedOutput: "1", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 267CompileAndVerify(source: source4.Replace("TYPE", type), expectedOutput: "0", verify: Verification.FailsPEVerify); 268CompileAndVerify(source: source4.Replace("TYPE", type), expectedOutput: "0", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 325var verifier = CompileAndVerify(source: source.Replace("TYPE", type), expectedOutput: expected); 385var verifier = CompileAndVerify(source: source, expectedOutput: "1"); 539var verifier = CompileAndVerify(source: source, expectedOutput: expected); 605var verifier = CompileAndVerify(source: source, expectedOutput: expected); 752var verifier = CompileAndVerify(source: s, expectedOutput: expected); 1310var verifier = CompileAndVerify(source: source.ToString(), expectedOutput: ""); 1405var verifier = CompileAndVerify(source: source, expectedOutput: ""); 1604var verifier = CompileAndVerify(source: source, expectedOutput: ""); 1649var verifier = CompileAndVerify(source: source, expectedOutput: "123"); 1667var verifier = CompileAndVerify(source: source2, expectedOutput: "0"); 1693CompileAndVerify(source: source, expectedOutput: @"S123"); 1733CompileAndVerify(source: source, expectedOutput: @"10203040-10-20-30-40"); 1765var verifier = CompileAndVerify(source, expectedOutput: expected); 1869CompileAndVerify(source, expectedOutput: "tfffttt"); 2029CompileAndVerify(source, expectedOutput: expected); 2047CompileAndVerify(source, expectedOutput: "False").VerifyDiagnostics( 2069CompileAndVerify(source, expectedOutput: "False");
Semantics\NullConditionalAssignmentTests.cs (29)
170var verifier = CompileAndVerify(source, expectedOutput: "12TrueTrue"); 367var verifier = CompileAndVerify(source, expectedOutput: "1234"); 489CompileAndVerify(source, expectedOutput: "3578"); 587var verifier = CompileAndVerify(source, expectedOutput: "1234"); 678var verifier = CompileAndVerify(source, expectedOutput: "12TrueTrue"); 863var verifier = CompileAndVerify(source, expectedOutput: "abbccd"); 933var verifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "ab<null><null>"); 1058var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, verify: Verification.Skipped, expectedOutput: "1324"); 1100var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, verify: Verification.Skipped, expectedOutput: "1324"); 1134var verifier = CompileAndVerify(source, expectedOutput: "1234"); 1215var verifier = CompileAndVerify(source, expectedOutput: "5868"); 1294var verifier = CompileAndVerify(source, expectedOutput: "2848"); 1362var verifier = CompileAndVerify(source, expectedOutput: "22"); 1411var verifier = CompileAndVerify(source, expectedOutput: "True1"); 1497var verifier = CompileAndVerify(source, expectedOutput: """ 1588var verifier = CompileAndVerify(source, expectedOutput: """ 1686var verifier = CompileAndVerify(source, expectedOutput: """ 1788var verifier = CompileAndVerify(source, expectedOutput: """ 1883var verifier = CompileAndVerify(source, expectedOutput: "TrueTrue"); 1952var verifier = CompileAndVerify(source, expectedOutput: "aabb"); 1985var verifier = CompileAndVerify(source, expectedOutput: "bbcc"); 2018var verifier = CompileAndVerify(source, expectedOutput: "GetString()(set b)bc"); 2052var verifier = CompileAndVerify(source, expectedOutput: "GetString()M(a)bc"); 2084var verifier = CompileAndVerify(source, expectedOutput: "ab"); 2115var verifier = CompileAndVerify(source, expectedOutput: "11"); 2207var verifier = CompileAndVerify(source, expectedOutput: """ 2337var verifier = CompileAndVerify(source, expectedOutput: """ 2548var verifier = CompileAndVerify(source, expectedOutput: "4242b"); 2664var verifier = CompileAndVerify(source, expectedOutput: "a<null>");
Semantics\ObjectAndCollectionInitializerTests.cs (12)
68CompileAndVerify(source, expectedOutput: ""); 112CompileAndVerify(source, expectedOutput: ""); 162CompileAndVerify(source, expectedOutput: ""); 190CompileAndVerify(source, expectedOutput: ""); 217CompileAndVerify(source, expectedOutput: ""); 302CompileAndVerify(source, expectedOutput: ""); 384CompileAndVerify(source, expectedOutput: ""); 444CompileAndVerify(source, references: new MetadataReference[] { CSharpRef }). 562CompileAndVerify(source, expectedOutput: expectedOutput); 685CompileAndVerify(source, expectedOutput: expectedOutput); 794CompileAndVerify(source, expectedOutput: "str"); 3986CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: "Initialized");
Semantics\OperatorTests.cs (52)
129CompileAndVerify(source: source, expectedOutput: "TwoZero"); 337CompileAndVerify(source: source, expectedOutput: output); 437CompileAndVerify(source: source, expectedOutput: output); 513CompileAndVerify(source: source, expectedOutput: output); 641CompileAndVerify(source: source, expectedOutput: output); 1174CompileAndVerify(source: source, expectedOutput: output); 1999CompileAndVerify(source: source, expectedOutput: output); 5070CompileAndVerify(source, expectedOutput: "A"); 5196CompileAndVerify(source, expectedOutput: string.Empty); 5216CompileAndVerify(source, expectedOutput: ""); 5237var comp = CompileAndVerify(source); 5317var comp = CompileAndVerify(source); 5341var comp = CompileAndVerify(source); 5360var comp = CompileAndVerify(source); 5379var comp = CompileAndVerify(source); 5848CompileAndVerify(source, expectedOutput: "").VerifyDiagnostics(); 5880var comp = CompileAndVerify(source, expectedOutput: @"False 6064CompileAndVerify(text); 6083CompileAndVerify(text); 6102CompileAndVerify(text); 6164CompileAndVerify(source1, expectedOutput: "1"); 6328CompileAndVerify(source, expectedOutput: expectedOutput); 6452CompileAndVerify(source, expectedOutput: expectedOutput); 6473CompileAndVerify(source, expectedOutput: ""); 6527CompileAndVerify(source, expectedOutput: "1"); 6546CompileAndVerify(source, expectedOutput: ""); 6857CompileAndVerify(source: source, expectedOutput: "ft"); 6897CompileAndVerify(source: source, expectedOutput: output); 8892var verifier = CompileAndVerify(source); 9651CompileAndVerify(source: source); 9683CompileAndVerify(source: source, expectedOutput: "implicit operator E"); 9715CompileAndVerify(source: source, expectedOutput: "implicit operator E"); 9738CompileAndVerify(source: source, expectedOutput: "System.Int16"); 9770CompileAndVerify(source: source, expectedOutput: "implicit operator E"); 9803CompileAndVerify(source: source, expectedOutput: "implicit operator E"); 9826CompileAndVerify(source: source, expectedOutput: "System.Nullable`1[System.Int16]"); 9848CompileAndVerify(source: source, expectedOutput: "System.Nullable`1[System.Base64FormattingOptions]"); 9870CompileAndVerify(source: source, expectedOutput: "System.Nullable`1[System.Int32]"); 9905CompileAndVerify(source: source, expectedOutput: 10130CompileAndVerify(source: source, expectedOutput: 10677CompileAndVerify(source: source, expectedOutput: 11170CompileAndVerify(source: source, expectedOutput: 11329CompileAndVerify(source: source, expectedOutput: 11390CompileAndVerify(source: source, expectedOutput: 11484var verifier = CompileAndVerify(source: source, expectedOutput: 11605CompileAndVerify(source: source, expectedOutput: 11645var verifier = CompileAndVerify(source: source, expectedOutput: 11685CompileAndVerify(source: source, expectedOutput: 11735CompileAndVerify(source: source, expectedOutput: 11791CompileAndVerify(source: source, expectedOutput: "abcdef" + Environment.NewLine + "abcdef" + Environment.NewLine + "abcdef"); 11842CompileAndVerify(source: source, expectedOutput: "3" + Environment.NewLine + "3" + Environment.NewLine); 11904var verifier = CompileAndVerify(source, expectedOutput: "Goo, Bar");
Semantics\OverloadResolutionTests.cs (87)
121CompileAndVerify(source1, expectedOutput: @"232579D"); 236CompileAndVerify(source3, expectedOutput: @"BB"); 283CompileAndVerify(source1, expectedOutput: @"21 221 123334 3333"); 367CompileAndVerify(source1, expectedOutput: @"1"); 387CompileAndVerify(source2, parseOptions: TestOptions.Regular9, expectedOutput: @"2"); 462CompileAndVerify(source1, expectedOutput: @"1"); 1146CompileAndVerify(source1, expectedOutput: @"13"); 1223CompileAndVerify(source1, expectedOutput: 2112CompileAndVerify(source, expectedOutput: @"int 2149CompileAndVerify(source, expectedOutput: @"int 2189CompileAndVerify(source, expectedOutput: @"PASS 2253CompileAndVerify(source, expectedOutput: @"int 2365CompileAndVerify(source, expectedOutput: @"20"); 2403CompileAndVerify(source, expectedOutput: @"12"); 2445CompileAndVerify(source, expectedOutput: @"10 2488CompileAndVerify(source, expectedOutput: @"10 2531CompileAndVerify(source, expectedOutput: @"0 2593CompileAndVerify(source, expectedOutput: @"10 2647CompileAndVerify(source, expectedOutput: @"6"); 2741CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2 3271CompileAndVerify(source); 3488CompileAndVerify(source, expectedOutput: @"1 5590CompileAndVerify(source, expectedOutput: @"1 6841CompileAndVerify(@" 7642CompileAndVerify(source1, expectedOutput: @"2 7668CompileAndVerify(source1, expectedOutput: @"1 7693CompileAndVerify(source1, expectedOutput: @"2"); 8405CompileAndVerify(source, expectedOutput: @"pass 9207CompileAndVerify(source, expectedOutput: @"False"); 9252CompileAndVerify(source, expectedOutput: 9448CompileAndVerify(code, expectedOutput: "5"); 9480CompileAndVerify(code, expectedOutput: "5", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9481var verifier = CompileAndVerify(code, expectedOutput: "5").VerifyDiagnostics(expectedDiagnostics); 9634CompileAndVerify(source, expectedOutput: "555", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9635CompileAndVerify(source, expectedOutput: "555").VerifyDiagnostics(expectedDiagnostics); 9673CompileAndVerify(source, expectedOutput: "555", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9674CompileAndVerify(source, expectedOutput: "555").VerifyDiagnostics(expectedDiagnostics); 9706CompileAndVerify(source, expectedOutput: "555", options: TestOptions.UnsafeReleaseExe, 9709CompileAndVerify(source, expectedOutput: "555", options: TestOptions.UnsafeReleaseExe, 9741CompileAndVerify(source, expectedOutput: "555", verify: Verification.FailsILVerify, parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9742CompileAndVerify(source, expectedOutput: "555", verify: Verification.FailsILVerify).VerifyDiagnostics(expectedDiagnostics); 9767CompileAndVerify(source, expectedOutput: "65655656").VerifyDiagnostics( 9791CompileAndVerify(source, expectedOutput: "string5", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 9792CompileAndVerify(source, expectedOutput: "string5", parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 9793CompileAndVerify(source, expectedOutput: "string5").VerifyDiagnostics(); 9811CompileAndVerify(source, expectedOutput: "string5", parseOptions: TestOptions.Regular11).VerifyDiagnostics(); 9812CompileAndVerify(source, expectedOutput: "string5", parseOptions: TestOptions.Regular12).VerifyDiagnostics(); 9813CompileAndVerify(source, expectedOutput: "string5").VerifyDiagnostics(); 9843CompileAndVerify(source, expectedOutput: "object5", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9844CompileAndVerify(source, expectedOutput: "object5").VerifyDiagnostics(expectedDiagnostics); 9874CompileAndVerify(source, expectedOutput: "object5", parseOptions: TestOptions.Regular12).VerifyDiagnostics(expectedDiagnostics); 9875CompileAndVerify(source, expectedOutput: "object5").VerifyDiagnostics(expectedDiagnostics); 9918CompileAndVerify(code, expectedOutput: "5"); 10025CompileAndVerify(code, expectedOutput: @" 10057CompileAndVerify(code, expectedOutput: @" 10067CompileAndVerify(@" 10090CompileAndVerify(@" 10113CompileAndVerify(@" 10135CompileAndVerify(@" 10179CompileAndVerify(code, expectedOutput: @" 10211CompileAndVerify(code, expectedOutput: @" 10221CompileAndVerify(@" 10244CompileAndVerify(@" 10289CompileAndVerify(code, expectedOutput: @" 10321CompileAndVerify(code, expectedOutput: @" 10331CompileAndVerify(@" 10354CompileAndVerify(@" 10399CompileAndVerify(code, expectedOutput: @" 10430CompileAndVerify(code, expectedOutput: @" 10648CompileAndVerify(code, expectedOutput: @" 10678CompileAndVerify(code, expectedOutput: @" 10719CompileAndVerify(code, expectedOutput: @" 10784CompileAndVerify(code, expectedOutput: @" 10869CompileAndVerify(code, expectedOutput: @" 10953CompileAndVerify(code, expectedOutput: @" 10983CompileAndVerify(code, expectedOutput: 11020CompileAndVerify(code, expectedOutput: 11035CompileAndVerify(@" 11067CompileAndVerify(@" 11095CompileAndVerify(@" 11127CompileAndVerify(@" 11159CompileAndVerify(@" 11191CompileAndVerify(@" 11257CompileAndVerify(code, expectedOutput: @" 11596CompileAndVerify(code, expectedOutput: @"2"); 11627CompileAndVerify(code, expectedOutput: @"1", verify: Verification.Fails); 11720CompileAndVerify(code, expectedOutput: @"2");
Semantics\QueryTests.cs (27)
37CompileAndVerify(csSource, expectedOutput: "[1, 2, 3, 4, 5, 6, 7]"); 103CompileAndVerify(csSource, expectedOutput: "[1, 2, 3, 4, 5, 6, 7]"); 184CompileAndVerify(csSource, expectedOutput: "[2, 3, 4, 5, 6, 7, 8]"); 252CompileAndVerify(csSource, expectedOutput: "[1:[1, 3, 5, 7], 0:[2, 4, 6]]"); 320CompileAndVerify(csSource, expectedOutput: "[1:[11, 13, 15, 17], 0:[12, 14, 16]]"); 336CompileAndVerify(csSource, expectedOutput: "[1, 2, 3, 4, 5, 6, 7]"); 406CompileAndVerify(csSource, expectedOutput: "[1, 2, 3, 4]"); 484CompileAndVerify(csSource, expectedOutput: "[11, 33, 44, 55, 77]"); 589CompileAndVerify(csSource, expectedOutput: "[84, 72, 64, 51, 55, 46, 39, 27, 27, 27, 28]"); 684CompileAndVerify(csSource, expectedOutput: "[1:[12], 2:[], 3:[34], 4:[42], 5:[51, 52], 7:[75]]"); 798CompileAndVerify(csSource, expectedOutput: "[11, 21, 31, 12, 22, 32, 13, 23, 33]"); 881CompileAndVerify(csSource, expectedOutput: "[11, 21, 31, 12, 22, 32, 13, 23, 33]"); 902CompileAndVerify(csSource, expectedOutput: "[111, 222, 333]"); 1075CompileAndVerify(csSource, expectedOutput: "[111, 211, 311, 121, 221, 131, 112, 212, 122, 113]"); 1370CompileAndVerify(csSource, expectedOutput: "[11, 22, 33]"); 1391CompileAndVerify(csSource, expectedOutput: "[1:[12], 2:[], 3:[34], 4:[42], 5:[51, 52]]"); 1426CompileAndVerify(csSource, expectedOutput: "[1:[12], 2:[], 3:[34], 4:[42], 5:[51, 52]]"); 1933CompileAndVerify(csSource, expectedOutput: "3 3 4 4"); 1960CompileAndVerify(csSource, expectedOutput: "3 4"); 1989CompileAndVerify(csSource, expectedOutput: "1 2 3"); 2123CompileAndVerify(csSource, expectedOutput: "3 4"); 2154CompileAndVerify(csSource, expectedOutput: "45"); 4501CompileAndVerify(@" 4549CompileAndVerify(@" 4599CompileAndVerify(source, targetFramework: TargetFramework.Net70, 4643CompileAndVerify(source, targetFramework: TargetFramework.Net70, 4693CompileAndVerify(source, targetFramework: TargetFramework.Net70,
Semantics\RawInterpolationTests.cs (18)
43CompileAndVerify(source, expectedOutput: expectedOutput); 60CompileAndVerify(source, expectedOutput: expectedOutput); 77CompileAndVerify(source, expectedOutput: expectedOutput); 94CompileAndVerify(source, expectedOutput: expectedOutput); 222CompileAndVerify(source, expectedOutput: expectedOutput); 238var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 264var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 295CompileAndVerify(source, expectedOutput: expectedOutput); 372CompileAndVerify(source, expectedOutput: expectedOutput); 396var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: expectedOutput).VerifyDiagnostics(); 648CompileAndVerify(source, expectedOutput: expectedOutput); 692CompileAndVerify(source, expectedOutput: expectedOutput); 845CompileAndVerify(source + formattableString, expectedOutput: "True"); 880CompileAndVerify(source + formattableString, expectedOutput: "12311211"); 918CompileAndVerify( 933CompileAndVerify(source + formattableString, expectedOutput: "X = 123 ."); 1206CompileAndVerify(source + formattableString, expectedOutput: 1360var verifier = CompileAndVerify(source, expectedOutput: expectedOutput);
Semantics\RawInterpolationTests_Handler.cs (37)
70var verifier = CompileAndVerify(new[] { code, handler }, expectedOutput: @" 209var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: expectedOutput); 627var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net50, parseOptions: TestOptions.RegularPreview); 1022CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 1043CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 1063var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"base1"); 1237var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 1349var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 1618var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerAttribute }); 2058var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2167CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"value:1"); 2179var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"value:1"); 2216var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2283var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2366var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, targetFramework: TargetFramework.NetCoreApp, expectedOutput: @" 2549var verifier = CompileAndVerify(source, expectedOutput: @" 2864CompileAndVerify(source, expectedOutput: "value:1"); 2894CompileAndVerify(new[] { source, InterpolatedStringHandlerAttribute }, expectedOutput: "literal:l"); 6498verifier = CompileAndVerify(executableCode, new[] { d }, expectedOutput: @" 6622verifier = CompileAndVerify(executableCode, new[] { d }, expectedOutput: expectedOutput); 7962var verifier = CompileAndVerify( 8074var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: "1literal:literal", symbolValidator: validator, sourceSymbolValidator: validator); 8447var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: @" 12202var verifier = CompileAndVerify(code, expectedOutput: @"123456"); 12220var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringHandlerDefinition(includeSpanOverloads: false, useDefaultParameters: false, useBoolReturns: false) }, expectedOutput: @" 12677var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringCustomHandlerType("CustomHandler", "struct", useBoolReturns: false) }, expectedOutput: @" 12785var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 12852var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @""); 12971var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 13026var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 13067var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 13120var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 13166var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 13286var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1"); 13319var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "2"); 13372var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1"); 13642CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) },
Semantics\ReadOnlyStructsTests.cs (6)
333var comp = CompileAndVerify(csharp); 619var verifier = CompileAndVerify(csharp, expectedOutput: "123"); 661var verifier = CompileAndVerify(csharp, expectedOutput: "123"); 798var verifier = CompileAndVerify(csharp, expectedOutput: 1000CompileAndVerify(csharp, expectedOutput: "0"); 1036var verifier = CompileAndVerify(csharp, expectedOutput: "123");
Semantics\RecordStructTests.cs (6)
34=> base.CompileAndVerify( 1974var verifier = CompileAndVerify(src, parseOptions: TestOptions.Regular11); 2241var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, verify: Verification.Skipped); 2939var verifier = CompileAndVerify(new[] { src, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, verify: Verification.Skipped); 7613var verifier = CompileAndVerify(src, parseOptions: TestOptions.Regular11); 10582var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator,
Semantics\RefEscapingTests.cs (28)
7389CompileAndVerify(source, expectedOutput: "Done").VerifyDiagnostics(). 11027CompileAndVerify(source, 11072CompileAndVerify(source) 11107CompileAndVerify(source) 11145CompileAndVerify(source) 11192CompileAndVerify(source, 11264CompileAndVerify(source) 11322CompileAndVerify(source, 11377CompileAndVerify(source, 11427CompileAndVerify(source, 11477CompileAndVerify(source, 11537CompileAndVerify(source, 11590CompileAndVerify(source, 11617CompileAndVerify(source, 11636CompileAndVerify(source) 11687CompileAndVerify(source, 11719CompileAndVerify(source, 11738CompileAndVerify(source) 11779CompileAndVerify(source) 11817CompileAndVerify(source) 11861CompileAndVerify(source, 11901CompileAndVerify(source, 11929CompileAndVerify(source, 11953CompileAndVerify(source, 11985CompileAndVerify(source, 12014CompileAndVerify(source, 12048CompileAndVerify(source, 12098CompileAndVerify(source,
Semantics\RefExtensionMethodsTests.cs (26)
72CompileAndVerify(code, expectedOutput: "1"); 103var verifier = CompileAndVerify(code, expectedOutput: "2"); 155var verifier = CompileAndVerify(code, expectedOutput: "2"); 265CompileAndVerify(code, expectedOutput: "67"); 288CompileAndVerify(code, expectedOutput: "55"); 312CompileAndVerify(code, expectedOutput: "55"); 395CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "55"); 396CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "55"); 565CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "55"); 566CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "55"); 688CompileAndVerify(code, references: new[] { reference }, expectedOutput: "55"); 831CompileAndVerify(code, references: new[] { reference }, expectedOutput: "55"); 940CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "55"); 941CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "55"); 1241CompileAndVerify(code, references: new[] { reference }, expectedOutput: "55"); 1898CompileAndVerify(code, expectedOutput: "Instance,Extension,Static"); 1937CompileAndVerify(code, expectedOutput: "Instance,Extension,Static"); 1973CompileAndVerify(code, expectedOutput: "54321"); 1997CompileAndVerify(code, expectedOutput: "7"); 2038CompileAndVerify(code, expectedOutput: "5554535251"); 2300CompileAndVerify(code, expectedOutput: "5"); 2341CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 2342CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5"); 2404CompileAndVerify(code, expectedOutput: "5555"); 2445CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5"); 2446CompileAndVerify(code, references: new[] { reference.EmitToImageReference() }, expectedOutput: "5");
Semantics\RefFieldTests.cs (25)
2322CompileAndVerify( 15823CompileAndVerify(sourceB, references: new[] { refA }, 22679CompileAndVerify(source2, [ref1], 22684CompileAndVerify(source2, [ref1], 22724CompileAndVerify(source2, [ref1], 22729CompileAndVerify(source2, [ref1], 26772var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: "12", verify: Verification.Fails); 26916var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: "12", verify: Verification.Fails); 30208var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, expectedOutput: "0"); 30265var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, expectedOutput: "0"); 30339var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, expectedOutput: """ 30929var verifier = CompileAndVerify(""" 30980var verifier = CompileAndVerify(""" 31039var verifier = CompileAndVerify(""" 31106var verifier = CompileAndVerify(""" 31167var verifier = CompileAndVerify(""" 31241var verifier = CompileAndVerify(""" 31314var verifier = CompileAndVerify(""" 31355var verifier = CompileAndVerify(""" 31396var verifier = CompileAndVerify(""" 31438var verifier = CompileAndVerify(""" 31482var verifier = CompileAndVerify(""" 31523var verifier = CompileAndVerify(""" 31571var verifier = CompileAndVerify(""" 31612var verifier = CompileAndVerify("""
Semantics\RefLocalsAndReturnsTests.cs (12)
1343CompileAndVerify(source, parseOptions: TestOptions.Regular13, expectedOutput: expectedOutput).VerifyDiagnostics(); 1345CompileAndVerify(source, expectedOutput: expectedOutput).VerifyDiagnostics(); 2841CompileAndVerify(text, 3234CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13).VerifyDiagnostics(); 3235CompileAndVerify(code, expectedOutput: expectedOutput).VerifyDiagnostics(); 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(); 3393CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13).VerifyDiagnostics(); 3394CompileAndVerify(code, expectedOutput: expectedOutput).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 (10)
6476var verifier = CompileAndVerify(text, parseOptions: TestOptions.Regular11); 6988var verifier = CompileAndVerify(text, parseOptions: TestOptions.Regular11). 7105var verifier = CompileAndVerify(source, new[] { CSharpRef }, parseOptions: TestOptions.Regular11); 7179var verifier = CompileAndVerify(source, new[] { CSharpRef }, parseOptions: TestOptions.Regular11); 7623CompileAndVerify(text, expectedOutput: expectedOutput, verify: Verification.Fails); 12982var verifier = CompileAndVerify(text, parseOptions: TestOptions.Regular11); 16161var c = CompileAndVerify(text, expectedOutput: "7788", verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe); 20597var verifier = CompileAndVerify(source: text, expectedOutput: @"ffffffffffffffffffffffffffffffffffffffffffffffff 21145this.CompileAndVerify(source: text, expectedOutput: expected, options: TestOptions.ReleaseExe.WithWarningLevel(4)).VerifyDiagnostics(compatibleExpected); 21146this.CompileAndVerify(source: text, expectedOutput: expected).VerifyDiagnostics(fullExpected);
Semantics\SimpleLambdaParametersWithModifiersTests.cs (1)
585var compilation = CompileAndVerify($$"""
Semantics\StructConstructorTests.cs (48)
56CompileAndVerify(sourceB, references: new[] { refA }, expectedOutput: 199CompileAndVerify(sourceB, references: new[] { refA }, expectedOutput: 284CompileAndVerify(new[] { sourceA, sourceB }, expectedOutput: "True"); 317var verifier = CompileAndVerify(source, expectedOutput: 393var verifier = CompileAndVerify(source, expectedOutput: 483var verifier = CompileAndVerify(source, expectedOutput: @" 582var verifier = CompileAndVerify(source, expectedOutput: 705var verifier = CompileAndVerify(source, expectedOutput: 815var verifier = CompileAndVerify(source, expectedOutput: 889var verifier = CompileAndVerify(source, parseOptions: GetParseOptions(languageVersion), expectedOutput: 951var verifier = CompileAndVerify(source, parseOptions: GetParseOptions(languageVersion), expectedOutput: 1018var verifier = CompileAndVerify(source, parseOptions: GetParseOptions(languageVersion), expectedOutput: 1107var verifier = CompileAndVerify(source, parseOptions: GetParseOptions(languageVersion), expectedOutput: 1204var verifier = CompileAndVerify(source, parseOptions: GetParseOptions(languageVersion), expectedOutput: 1343var verifier = CompileAndVerify(source, expectedOutput: 1479var verifier = CompileAndVerify(source, expectedOutput: 1730var verifier = CompileAndVerify(source, expectedOutput: 1819var verifier = CompileAndVerify(source, parseOptions: GetParseOptions(languageVersion), expectedOutput: 1985var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular11, expectedOutput: 2025var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular11, expectedOutput: "(, )"); 2168var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 2282var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: 2400var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 2464var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, options: TestOptions.ReleaseExe, verify: Verification.Skipped, expectedOutput: 2765var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, expectedOutput: 2876var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, expectedOutput: 2947var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, expectedOutput: 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: 3179var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 3907var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular11); 4021var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11); 4064var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings), parseOptions: TestOptions.Regular11); 4171var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersion)); 4202var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4241var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4274var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4309var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4349var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4399var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4443var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4486var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4591var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(ReportStructInitializationWarnings)); 4622verifier = CompileAndVerify(source, options: TestOptions.DebugDll); 4709var verifier = CompileAndVerify(new[] { source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular11); 4739var verifier = CompileAndVerify(new[] { source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersion)); 4771var verifier = CompileAndVerify(new[] { source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersion));
Semantics\StructsTests.cs (7)
144CompileAndVerify(text).VerifyDiagnostics(); 165CompileAndVerify(text).VerifyDiagnostics(); 216CompileAndVerify(text, expectedOutput: "22").VerifyDiagnostics(); 305CompileAndVerify(text, expectedOutput: expectedOutput); 335CompileAndVerify(text, expectedOutput: expectedOutput); 368CompileAndVerify(text).VerifyIL("Struct..ctor(decimal)", expectedIL); 432CompileAndVerify(text).VerifyIL("C.M", @"
Semantics\SwitchTests.cs (16)
1113var comp = CompileAndVerify(text, expectedOutput: ""); 2106CompileAndVerify(text, parseOptions: TestOptions.Regular6, expectedOutput: "a1"); 2107CompileAndVerify(text, expectedOutput: "a1"); 2142CompileAndVerify(text, parseOptions: TestOptions.Regular6, expectedOutput: "a2"); 2143CompileAndVerify(text, expectedOutput: "a2"); 2179CompileAndVerify(text, parseOptions: TestOptions.Regular6, expectedOutput: 2182CompileAndVerify(text, expectedOutput: 2857var comp = CompileAndVerify(source, expectedOutput: @"1001"); 2890var comp = CompileAndVerify(source, expectedOutput: @"1001"); 2986var comp = CompileAndVerify(text, expectedOutput: "1 1 1 1"); 3009CompileAndVerify(text, expectedOutput: "1").VerifyIL("C.Main", @" 3090CompileAndVerify(text, expectedOutput: "1").VerifyIL("C.Main", @" 3201CompileAndVerify(text, expectedOutput: "-1").VerifyIL("C.Main", @" 3313CompileAndVerify(text).VerifyIL("C.Main", @" 3495CompileAndVerify(text, expectedOutput: "12345678💥").VerifyIL("C.Main", @" 3618CompileAndVerify(text, expectedOutput: "123456789💥").VerifyIL("C.Main", @"
Semantics\TargetTypedConditionalOperatorTests.cs (6)
490CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp3), expectedOutput: expectedOutput); 491CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion()), expectedOutput: expectedOutput); 556CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp3), expectedOutput: expectedOutput); 557CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion()), expectedOutput: expectedOutput); 587CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp3), expectedOutput: expectedOutput); 588CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(MessageID.IDS_FeatureTargetTypedConditional.RequiredVersion()), expectedOutput: expectedOutput);
Semantics\TopLevelStatementsTests.cs (2)
6077var verifier = CompileAndVerify( 6148var verifier = CompileAndVerify(
Semantics\TryCatchTests.cs (2)
111CompileAndVerify(source, expectedOutput: "hhhe"); 157CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics(
Semantics\UninitializedNonNullableFieldTests.cs (3)
874var verifier = CompileAndVerify(source, options: WithNullableEnable(), parseOptions: TestOptions.Regular11); 1065var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular11); 1797var verifier = CompileAndVerify(new[] { source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular11);
Semantics\UnsafeTests.cs (11)
619CompileAndVerify(code, expectedOutput: expectedOutput, parseOptions: TestOptions.Regular13, options: TestOptions.UnsafeReleaseExe).VerifyDiagnostics(); 620CompileAndVerify(code, expectedOutput: expectedOutput, options: TestOptions.UnsafeReleaseExe).VerifyDiagnostics(); 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; 12414var comp2 = CompileAndVerify(s2, 12465var comp3 = CompileAndVerify(s3, 12511CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"246"); 12555CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"4812");
Semantics\UserDefinedConversionTests.cs (16)
778CompileAndVerify(source: source, expectedOutput: output); 1159var verifier = CompileAndVerify(source: source1 + source3 + source5, options: TestOptions.UnsafeReleaseExe, expectedOutput: ""); 1247CompileAndVerify(source1, expectedOutput: "A5A5A6A7A7A7A6A5A5"); 1286var verifier = CompileAndVerify(source, expectedOutput: "23"); 1312var verifier = CompileAndVerify(source, expectedOutput: "a"); 1345var verifier = CompileAndVerify(source, expectedOutput: "b"); 1371var verifier = CompileAndVerify(source, expectedOutput: "1"); 1441var verifier = CompileAndVerify(source, expectedOutput: "a"); 1473var verifier = CompileAndVerify(source: source1, expectedOutput: ""); 1493CompileAndVerify(source).VerifyDiagnostics(); 1528CompileAndVerify(source, expectedOutput: "Hello"); 1976var verifier = CompileAndVerify(source, expectedOutput: "int"); 2019var verifier = CompileAndVerify(source, expectedOutput: "string"); 2081var verifier = CompileAndVerify(source, expectedOutput: "string"); 2143var verifier = CompileAndVerify(source, expectedOutput: "string[]"); 2207var verifier = CompileAndVerify(source, expectedOutput: "string");
Semantics\UsingDeclarationTests.cs (4)
626var verifier = CompileAndVerify(source, expectedOutput: """ 695var verifier = CompileAndVerify(source); 727var verifier = CompileAndVerify(source, expectedOutput: """ 762var verifier = CompileAndVerify(source, expectedOutput: """
Semantics\WarningVersionTests.cs (24)
154var verifier = CompileAndVerify( 163verifier = CompileAndVerify( 176verifier = CompileAndVerify( 185verifier = CompileAndVerify( 232var verifier = CompileAndVerify( 241verifier = CompileAndVerify( 254verifier = CompileAndVerify( 264verifier = CompileAndVerify( 318var verifier = CompileAndVerify( 327verifier = CompileAndVerify( 343verifier = CompileAndVerify( 355verifier = CompileAndVerify( 442var verifier = CompileAndVerify( 451verifier = CompileAndVerify( 464verifier = CompileAndVerify( 473verifier = CompileAndVerify( 529var verifier = CompileAndVerify( 538verifier = CompileAndVerify( 551verifier = CompileAndVerify( 560verifier = CompileAndVerify( 616var verifier = CompileAndVerify( 625verifier = CompileAndVerify( 638verifier = CompileAndVerify( 647verifier = CompileAndVerify(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (299)
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
957CompileAndVerify(csharp, new[] { CompileIL(il) }, expectedOutput: @"
Symbols\AnonymousTypesSemanticsTests.cs (3)
1577CompileAndVerify( 1724CompileAndVerify( 1753CompileAndVerify(
Symbols\AnonymousTypesSymbolTests.cs (26)
45var verifier = CompileAndVerify( 94CompileAndVerify(source); 116CompileAndVerify( 142CompileAndVerify( 169CompileAndVerify( 202CompileAndVerify( 227CompileAndVerify( 300CompileAndVerify( 640CompileAndVerify( 714CompileAndVerify( 737CompileAndVerify( 772CompileAndVerify( 1193CompileAndVerify( 1217CompileAndVerify( 1238CompileAndVerify( 1261CompileAndVerify( 1283CompileAndVerify( 1340CompileAndVerify( 1398CompileAndVerify( 1498CompileAndVerify(source); 1520CompileAndVerify(source, expectedOutput: "1221"); 1557CompileAndVerify(source, expectedOutput: "Success"); 1596CompileAndVerify(source, expectedOutput: "Success"); 1620CompileAndVerify(source, expectedOutput: "True"); 1887CompileAndVerify( 1921CompileAndVerify(source).VerifyIL("C.Main", expectedIL);
Symbols\ConversionTests.cs (3)
1979CompileAndVerify(source, expectedOutput: @"1ttt"); 2103CompileAndVerify(source).VerifyIL("C.Test", @" 2204CompileAndVerify(source, expectedOutput: "B");
Symbols\DefaultInterfaceImplementationTests.cs (1)
69149var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70,
Symbols\ExtendedPartialMethodsTests.cs (24)
115var verifier = CompileAndVerify(new[] { text1, text2 }, parseOptions: TestOptions.RegularWithExtendedPartialMethods, expectedOutput: "42"); 215var verifier = CompileAndVerify(new[] { text1, text2 }, parseOptions: TestOptions.RegularWithExtendedPartialMethods, expectedOutput: "42"); 241var verifier = CompileAndVerify(new[] { text1, text2 }, parseOptions: TestOptions.RegularWithExtendedPartialMethods, expectedOutput: "42"); 491CompileAndVerify(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods, expectedOutput: "12").VerifyDiagnostics(); 1136var verifier = CompileAndVerify( 1144verifier = CompileAndVerify( 1210var verifier = CompileAndVerify( 1220verifier = CompileAndVerify( 1314var verifier = CompileAndVerify(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, expectedOutput: "1"); 1574var verifier = CompileAndVerify( 1610var verifier = CompileAndVerify( 2395var verifier = CompileAndVerify( 2422var verifier = CompileAndVerify( 2492var verifier = CompileAndVerify( 2546var verifier = CompileAndVerify( 2611var verifier = CompileAndVerify( 2654var verifier = CompileAndVerify( 2666var verifier = CompileAndVerify( 2695var verifier = CompileAndVerify( 2707var verifier = CompileAndVerify( 2753var verifier = CompileAndVerify( 2802var verifier = CompileAndVerify( 2836var verifier = CompileAndVerify(source2, references: new[] { reference }, parseOptions: TestOptions.RegularWithExtendedPartialMethods); 2894var verifier = CompileAndVerify(
Symbols\ExtensionMethodTests.cs (6)
2258var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: "orange, apple"); 2297var compilation = CompileAndVerify(source, expectedOutput: 2472CompileAndVerify( 2506CompileAndVerify(source, symbolValidator: validator(false), sourceSymbolValidator: validator(true)); 2749return CompileAndVerify( 3105CompileAndVerify(consumer, references: new[] { libReference });
Symbols\GenericConstraintConversionTests.cs (2)
867var compilation = CompileAndVerify(source); 921var compilation = CompileAndVerify(source);
Symbols\GenericConstraintTests.cs (45)
56CompileAndVerify( 94CompileAndVerify( 120CompileAndVerify( 176CompileAndVerify( 196CompileAndVerify(source); 206CompileAndVerify(source); 215CompileAndVerify(source); 226CompileAndVerify(source); 415CompileAndVerify(source); 454CompileAndVerify(source); 702CompileAndVerify(source); 711CompileAndVerify(source); 727CompileAndVerify(source); 761CompileAndVerify(source); 1028CompileAndVerify(source); 1058CompileAndVerify(source); 1076CompileAndVerify(source); 1142var compilation = CompileAndVerify(source, expectedOutput: 1205var compilation = CompileAndVerify(source); 1245var compilation = CompileAndVerify(source); 1297var compilation = CompileAndVerify(source, expectedOutput: 1353var compilation = CompileAndVerify(source); 1469var compilation = CompileAndVerify(source, expectedOutput: 1588var compilation = CompileAndVerify(source, expectedOutput: 1655var compilation = CompileAndVerify(source, expectedOutput: "2, 1"); 1715var compilation = CompileAndVerify(source, expectedOutput: "1, 2"); 1833CompileAndVerify(source); 2466var compilation = CompileAndVerify(source, expectedOutput: 2527var compilation = CompileAndVerify(source); 2552CompileAndVerify(source); 2584CompileAndVerify(source); 2701CompileAndVerify(source); 4541var compilation = CompileAndVerify(source, expectedOutput: 4841CompileAndVerify(source, expectedOutput: 4905CompileAndVerify( 4937CompileAndVerify(source, expectedOutput: 4961CompileAndVerify(source); 5016CompileAndVerify(source, expectedOutput: 5054CompileAndVerify(source, expectedOutput: "5"); 5130var compilation = CompileAndVerify(source); 5192CompileAndVerify( 5259CompileAndVerify(source, expectedOutput: ""); 5571CompileAndVerify( 6934CompileAndVerify(source); 6974CompileAndVerify(source, options: TestOptions.DebugDll).VerifyDiagnostics(
Symbols\IndexedPropertyTests.cs (19)
58var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 124var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 224var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 351var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 618var compilation3 = CompileAndVerify(source3, references: new[] { reference1 }, expectedOutput: 727var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 884var compilation3 = CompileAndVerify(source3, references: new[] { reference1 }); 977var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 1085var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, verify: Verification.Passes); 1564var compilation3 = CompileAndVerify(source3, references: new[] { reference1 }, verify: Verification.Skipped); 1690var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }); 1718var compilation3 = CompileAndVerify(source3, references: new[] { reference1, reference2 }, expectedOutput: 1839var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput: 1969var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2119var compilation3 = CompileAndVerify(source3, new[] { reference1 }); 2261var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2331var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2406var compilation2 = CompileAndVerify(source2, new[] { reference1 }, verify: Verification.Passes, expectedOutput: 2631var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput:
Symbols\IndexerTests.cs (6)
67CompileAndVerify( 126var compilation = CompileAndVerify(source); 1188CompileAndVerify(source, sourceSymbolValidator: validator(true), symbolValidator: validator(false)); 1250CompileAndVerify(text, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator); 2527CompileAndVerify(source); 2795var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput:
Symbols\Metadata\PE\LoadInAttributeModifier.cs (16)
382CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 470CompileAndVerify(code, references: new[] { reference }, expectedOutput: "Child"); 535CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 623CompileAndVerify(code, references: new[] { reference }, expectedOutput: "Child"); 1393CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 1548CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 1651CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 1772CompileAndVerify(code, references: new[] { reference }, expectedOutput: "Child Get"); 1863CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 1974CompileAndVerify(code, references: new[] { reference }, expectedOutput: "Child Set"); 2104CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 2259CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 2362CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 2483CompileAndVerify(code, references: new[] { reference }, expectedOutput: "Child Get"); 2574CompileAndVerify(code, references: new[] { reference }, expectedOutput: @" 2685CompileAndVerify(code, references: new[] { reference }, expectedOutput: "Child Set");
Symbols\MethodImplementationFlagsTests.cs (5)
46CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator); 82CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator); 139CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator); 163CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator, verify: Verification.Skipped); 185CompileAndVerify(src, sourceSymbolValidator: validator, symbolValidator: validator, verify: Verification.Skipped);
Symbols\ModuleInitializers\AccessibilityTests.cs (7)
67CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 94CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 263CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @"123"); 320CompileAndVerify(source, expectedOutput: "12", parseOptions: s_parseOptions); 349CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 374CompileAndVerify( 407CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @"
Symbols\ModuleInitializers\IgnoredTests.cs (11)
34CompileAndVerify( 60CompileAndVerify( 86CompileAndVerify( 111CompileAndVerify( 136CompileAndVerify( 161CompileAndVerify( 186CompileAndVerify( 211CompileAndVerify( 232CompileAndVerify( 253CompileAndVerify( 286CompileAndVerify(
Symbols\ModuleInitializers\ModuleInitializersTests.cs (23)
87CompileAndVerify( 122CompileAndVerify( 173CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: "C.M"); 196CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 216CompileAndVerify( 248CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 273CompileAndVerify( 313CompileAndVerify( 352CompileAndVerify( 413CompileAndVerify( 444var verifier = CompileAndVerify(text, parseOptions: s_parseOptions, expectedOutput: "123"); 470var verifier = CompileAndVerify(text, parseOptions: s_parseOptions, expectedOutput: "123"); 499var verifier = CompileAndVerify( 549var verifier = CompileAndVerify( 595var verifier = CompileAndVerify( 648var verifier = CompileAndVerify( 692CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 721CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 751CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 775CompileAndVerify( 807CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @" 1127CompileAndVerify(source, parseOptions: s_parseOptions, references: new[] { ref1, ref2 }, expectedOutput: "123"); 1152CompileAndVerify(
Symbols\ModuleInitializers\SignatureTests.cs (1)
175CompileAndVerify(source, parseOptions: s_parseOptions, expectedOutput: @"
Symbols\PartialPropertiesTests.cs (34)
687var verifier = CompileAndVerify( 768var verifier = CompileAndVerify( 832CompileAndVerify(source, parseOptions: TestOptions.RegularPreview.WithNoRefSafetyRulesAttribute(), assemblyValidator: (assembly) => 890var verifier = CompileAndVerify(source, expectedOutput: "1"); 975var verifier = CompileAndVerify(source, expectedOutput: "1"); 1049var verifier = CompileAndVerify([source, IsExternalInitTypeDefinition], expectedOutput: "1"); 1129var verifier = CompileAndVerify(source, expectedOutput: "1"); 1175var verifier = CompileAndVerify(source, expectedOutput: "1"); 1301var verifier = CompileAndVerify(source, expectedOutput: "1234"); 1419var verifier = CompileAndVerify(source, expectedOutput: "1"); 1735var verifier = CompileAndVerify(source, symbolValidator: verify, sourceSymbolValidator: verify); 1838var verifier = CompileAndVerify(source, expectedOutput: "11"); 1942var verifier = CompileAndVerify(source, expectedOutput: "1"); 2004var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "1"); 2126var verifier = CompileAndVerify(source, expectedOutput: "01203"); 2321var verifier = CompileAndVerify([source, RequiredMemberAttribute, SetsRequiredMembersAttribute, CompilerFeatureRequiredAttribute], expectedOutput: "A"); 2866var verifier = CompileAndVerify(source, expectedOutput: "123"); 3190var verifier = CompileAndVerify(source, expectedOutput: "123abc"); 3257var verifier = CompileAndVerify( 3425var verifier = CompileAndVerify(source, expectedOutput: "12"); 3472var verifier = CompileAndVerify(source, expectedOutput: "001"); 3692var verifier = CompileAndVerify(source, symbolValidator: module => verify(module, isSource: false), sourceSymbolValidator: module => verify(module, isSource: true)); 4366var verifier = CompileAndVerify(source, expectedOutput: "12", symbolValidator: verify); 4403var verifier = CompileAndVerify(source, expectedOutput: "02", symbolValidator: verify); 4445var verifier = CompileAndVerify(source, expectedOutput: "Program.cs2", symbolValidator: verify); 4481var verifier = CompileAndVerify(source, expectedOutput: "02", symbolValidator: verify); 4523var verifier = CompileAndVerify(source, expectedOutput: "Main2", symbolValidator: verify); 4559var verifier = CompileAndVerify(source, expectedOutput: "02", symbolValidator: verify); 4616var verifier = CompileAndVerify(source, expectedOutput: "GetNumber()2", symbolValidator: verify); 4667var verifier = CompileAndVerify(source, expectedOutput: "02", symbolValidator: verify); 4717var verifier = CompileAndVerify(source, expectedOutput: "1"); 4762var verifier = CompileAndVerify([source, AllowNullAttributeDefinition], expectedOutput: "1"); 4806var verifier = CompileAndVerify([source, AllowNullAttributeDefinition], expectedOutput: "1"); 5031var verifier = CompileAndVerify(source, expectedOutput: "1", symbolValidator: verify, sourceSymbolValidator: verify);
Symbols\Source\EnumTests.cs (3)
360CompileAndVerify(source, expectedOutput: @"True 451CompileAndVerify(source, expectedOutput: @" 668CompileAndVerify(source, expectedOutput: @"
Symbols\Source\EventTests.cs (9)
301var compVerifier = CompileAndVerify(text, expectedOutput: "T1H1H2T2H2T3T4H1H2T5H2T6"); 446CompileAndVerify(source: source, references: new[] { TargetFrameworkUtil.StandardCSharpReference, libAssemblyRef }, 492var compilationVerifier = CompileAndVerify(source: source, references: new[] { TargetFrameworkUtil.StandardCSharpReference, libAssemblyRef }, 519var compilationVerifier = CompileAndVerify(source: source, 578var compilationVerifier = CompileAndVerify( 614CompileAndVerify(source: source, references: new[] { libAssemblyRef }, symbolValidator: validator); 646CompileAndVerify(source: source, references: new[] { libAssemblyRef }, symbolValidator: validator); 810var compVerifier = CompileAndVerify(source, new[] { TargetFrameworkUtil.StandardCSharpReference, CompileIL(ilSource) }, 2794CompileAndVerify(source,
Symbols\Source\ExpressionBodiedMethodTests.cs (1)
20var comp = CompileAndVerify(@"
Symbols\Source\FileModifierTests.cs (32)
216var verifier = CompileAndVerify(source, expectedOutput: "1", symbolValidator: symbolValidator); 266var verifier = CompileAndVerify(new[] { ("", "file1.cs"), (source, "file2.cs") }, expectedOutput: "1", symbolValidator: symbolValidator); 313var verifier = CompileAndVerify(source, expectedOutput: "E2", symbolValidator: symbolValidator); 365var verifier = CompileAndVerify(source, expectedOutput: "(<>FE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855__E)1", symbolValidator: symbolValidator); 441var verifier = CompileAndVerify(source, expectedOutput: "(<>FE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855__E)1", symbolValidator: symbolValidator); 730var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/MyFile.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: symbolValidator); 773var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/My<>File.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: symbolValidator); 804var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/MyGeneratedFile.g.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: symbolValidator); 1148var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/My+File.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: validateSymbols); 1209var verifier = CompileAndVerify(new[] { (source1 + main, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "1"); 1217verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2 + main, "file2.cs") }, expectedOutput: "2"); 1346var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs"), (main, "file3.cs") }, expectedOutput: "2"); 1412var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (main, "file2.cs") }, expectedOutput: "2"); 1474var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (main, "file2.cs") }, expectedOutput: "2"); 1927var verifier = CompileAndVerify(new[] { (userCode, "file1.cs"), (generatedCode, "file2.cs") }, expectedOutput: "OtherFile.csProgram.cs"); 1974var verifier = CompileAndVerify(new[] { (userCode, "file1.cs"), (generatedCode, "file2.cs") }, expectedOutput: "OtherFile.csProgram.cs"); 2018var verifier = CompileAndVerify(new[] { (userCode, "file1.cs"), (generatedCode, "file2.cs") }, expectedOutput: "OtherFile.cs"); 2590var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "2"); 2630var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "1"); 3157var verifier = CompileAndVerify(source, expectedOutput: "1"); 3294var verifier = CompileAndVerify(new[] { (usings, "file1.cs"), (source, "file2.cs"), (IsExternalInitTypeDefinition, "file3.cs") }, expectedOutput: "1"); 3465var verifier = CompileAndVerify(source, expectedOutput: "1"); 3499var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "1"); 3547var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "2"); 3905var verifier = CompileAndVerify(source, expectedOutput: "1"); 3926var verifier = CompileAndVerify(source, expectedOutput: "1"); 3947var verifier = CompileAndVerify(source, expectedOutput: "1"); 4635var verifier = CompileAndVerify(new[] { (source0, "F0.cs"), (source1, "F1.cs"), (source2, "F2.cs") }, expectedOutput: "12"); 4788var verifier = CompileAndVerify(new[] { (source0, "F0.cs"), (source1, "F1.cs"), (source2, "F2.cs") }, expectedOutput: "12"); 4831var verifier = CompileAndVerify(new[] { (source0, "F0.cs"), (source1, "F1.cs"), (source2, "F2.cs") }, expectedOutput: "12"); 4874var verifier = CompileAndVerify(new[] { (source0, "F0.cs"), (source1, "F1.cs"), (source2, "F2.cs") }, expectedOutput: "12"); 5049var verifier = CompileAndVerify(new[] { (source0, "F0.cs"), (source1, "F1.cs"), (source2, "F2.cs") }, expectedOutput: "12");
Symbols\Source\MethodTests.cs (1)
2508CompileAndVerify(source,
Symbols\Source\ModifierTests.cs (2)
284CompileAndVerify(code, expectedOutput: "5"); 315CompileAndVerify(code, expectedOutput: "5");
Symbols\Source\PropertyTests.cs (8)
477var compilation = CompileAndVerify(source, new[] { s_propertiesDll }, expectedOutput: "0"); 586CompileAndVerify(source: source, sourceSymbolValidator: validator, symbolValidator: validator); 663var compilation = CompileAndVerify(source, new[] { s_propertiesDll }, expectedOutput: "0"); 698var verifier = CompileAndVerify(source, new[] { s_propertiesDll }, expectedOutput: "0"); 1906CompileAndVerify(text).VerifyDiagnostics(); 2019var compilation2 = CompileAndVerify(source2, new[] { reference1 }); 2777var verifier = CompileAndVerify( 2880CompileAndVerify(text, expectedOutput: "123").VerifyDiagnostics();
Symbols\Source\RecordTests.cs (3)
20=> base.CompileAndVerify(new[] { src, IsExternalInitTypeDefinition }, 951var verifier = CompileAndVerify(@" 1048var v2 = CompileAndVerify(@"
Symbols\StaticAbstractMembersInInterfacesTests.cs (2)
33998CompileAndVerify(""" 34044CompileAndVerify("""
Symbols\SymbolErrorTests.cs (3)
20608CompileAndVerify( 20831CompileAndVerify( 20866var verifier = CompileAndVerify(
Symbols\TypeTests.cs (1)
1447CompileAndVerify(source, new[] { r });
Symbols\UnsignedRightShiftTests.cs (1)
3684CompileAndVerify(source, expectedOutput: @"150150", parseOptions: TestOptions.Regular11);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (15)
Diagnostics\LineSpanDirectiveTests.cs (1)
634var verifier = CompileAndVerify(source, options: TestOptions.DebugDll);
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
212this.CompileAndVerify(programText, expectedOutput: expectedValue);
Parsing\IgnoredDirectiveParsingTests.cs (1)
109CompileAndVerify(source,
Parsing\RawInterpolatedStringLiteralCompilingTests.cs (7)
41CompileAndVerify(text, expectedOutput: Render(expectedOutput, normalize), trimOutput: false); 726CompileAndVerify( 742CompileAndVerify( 753CompileAndVerify( 772CompileAndVerify( 2131CompileAndVerify( 2285CompileAndVerify(
Parsing\RawStringLiteralCompilingTests.cs (5)
401CompileAndVerify( 417CompileAndVerify( 428CompileAndVerify( 439CompileAndVerify( 458CompileAndVerify(
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CSharpTestBase.cs (5)
1282CompileAndVerify( 1318CompileAndVerify( 1359return CompileAndVerify( 1396CompileAndVerify( 1432CompileAndVerify(
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdEventTests.cs (2)
328var verifier = this.CompileAndVerify( 2441var verifier = CompileAndVerify(
Metadata\WinMdMetadataTests.cs (2)
158CompileAndVerify(text, WinRtRefs, targetFramework: TargetFramework.Empty, expectedOutput: "#FF000000"); 232CompileAndVerify(