4 instantiations of CompilationVerifier
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTest.cs (1)
52var verifier = new CompilationVerifier(compilation);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\FieldTests.cs (1)
477var verifier = new CompilationVerifier(compilation);
Microsoft.CodeAnalysis.Test.Utilities (1)
CommonTestBase.cs (1)
185var verifier = new CompilationVerifier(compilation, VisualizeRealIL, dependencies);
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Source\FieldTests.vb (1)
496Dim verifier = New CompilationVerifier(compilation)
4288 references to CompilationVerifier
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2458)
BreakingChanges.cs (4)
1134var verifier = CompileAndVerify(source, expectedOutput: " ++ EX 1"); 1411var cs1Verifier = CompileAndVerify(cs1Compilation); 1418var cs2Verifier = CompileAndVerify(cs2Compilation); 1425var cs3Verifier = CompileAndVerify(cs3Compilation);
CodeGen\CodeGenAsyncEHTests.cs (2)
26private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null) 940var v = CompileAndVerify(source, s_asyncRefs, targetFramework: TargetFramework.Empty, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: expected, symbolValidator: module =>
CodeGen\CodeGenAsyncIteratorTests.cs (12)
176var v = CompileAndVerify(comp, expectedOutput: "hello world"); 349var v = CompileAndVerify(comp, expectedOutput: "hello world!"); 2356var verifier = CompileAndVerify(comp, expectedOutput: "0 1 2 3 4 5"); 2913var verifier = CompileAndVerify(comp); 3181var verifier = CompileAndVerify(comp); 3450var verifier = CompileAndVerify(comp); 3714var verifier = CompileAndVerify(comp); 6849var verifier = CompileAndVerify(comp, expectedOutput: "42 43 Cancelled"); 6982var verifier = CompileAndVerify(comp, expectedOutput: "42 43 Cancelled"); 7939var v = CompileAndVerify(comp, expectedOutput: "BEFORE INSIDE INSIDE2 AFTER"); 7988var v = CompileAndVerify(comp, expectedOutput: "BEFORE INSIDE INSIDE2 AFTER"); 8037var v = CompileAndVerify(comp, expectedOutput: "BEFORE INSIDE INSIDE2 AFTER");
CodeGen\CodeGenAsyncLocalsTests.cs (10)
27private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null, Verification verify = default) 33private string GetFieldLoadsAndStores(CompilationVerifier c, string qualifiedMethodName) 306var vd = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 515var verifier = CompileAndVerify(source, expectedOutput: expected); 645var verifier = CompileAndVerify(source, expectedOutput: expected); 995var c = CompileAndVerify(source, expectedOutput: null, options: TestOptions.ReleaseDll); 1153var c = CompileAndVerify(source, expectedOutput: null, options: TestOptions.ReleaseDll); 1304var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1561var verifier = CompileAndVerify(text, options: TestOptions.ReleaseExe, expectedOutput: @"2"); 1886var verifier = CompileAndVerify(text, options: TestOptions.ReleaseExe, expectedOutput: @"2");
CodeGen\CodeGenAsyncMainTests.cs (8)
450var verifier = CompileAndVerify(c, expectedOutput: "hello async main", expectedReturnCode: 0); 490var verifier = CompileAndVerify(c, expectedOutput: "hello async main", expectedReturnCode: 10); 509var verifier = CompileAndVerify(c, expectedOutput: "hello async main", expectedReturnCode: 10); 527var verifier = CompileAndVerify(c, expectedOutput: "hello async main", expectedReturnCode: 0); 567var verifier = CompileAndVerify(c, expectedOutput: "hello async main", expectedReturnCode: 10, args: new string[] { "async main" }); 585var verifier = CompileAndVerify(c, expectedOutput: "hello async main", expectedReturnCode: 0, args: new string[] { "async main" }); 1567var verifier = CompileAndVerify(comp, expectedOutput: ""); 1809var verifier = CompileAndVerify(comp, expectedOutput: "");
CodeGen\CodeGenAsyncMethodBuilderOverrideTests.cs (5)
130var verifier = CompileAndVerify(compilation, expectedOutput: "M F G 3"); 536var verifier = CompileAndVerify(compilation, expectedOutput: "M F G 3"); 843var verifier = CompileAndVerify(compilation, expectedOutput: "M F 3"); 942var verifier = CompileAndVerify(compilation, expectedOutput: "Overload1 Lambda1 Overload2 Lambda2"); 2136var verifier = CompileAndVerify(comp, expectedOutput: "42");
CodeGen\CodeGenAsyncSpillTests.cs (12)
23private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null) 596var v = CompileAndVerify(source, options: TestOptions.DebugDll); 759var v = CompileAndVerify(source, options: TestOptions.ReleaseDll); 3277var v = CompileAndVerify(source, "System.Int32"); 3322var v = CompileAndVerify(source, expected); 3358var v = CompileAndVerify(source, "42"); 3499var v = CompileAndVerify(source, options: TestOptions.DebugExe); 3631var v = CompileAndVerify( 3673var v = CompileAndVerify( 6360var verifier = CompileAndVerify(source, expectedOutput: "1"); 6396var verifier = CompileAndVerify(source, expectedOutput: "1"); 6427var verifier = CompileAndVerify(source, expectedOutput: "1");
CodeGen\CodeGenAsyncTests.cs (9)
32private CompilationVerifier CompileAndVerify(string source, string expectedOutput, IEnumerable<MetadataReference> references = null, CSharpCompilationOptions options = null, Verification verify = default) 2191var c = CompileAndVerify(source, expectedOutput: expected); 2336var c = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: expected); 2484var c = CompileAndVerify(source, expectedOutput: expected, options: TestOptions.DebugExe); 2639var c = CompileAndVerify(source, expectedOutput: expected); 3447var v = CompileAndVerify(source, null, options: TestOptions.ReleaseDll); 3910var v = CompileAndVerify(source, null, options: TestOptions.ReleaseDll); 4232var v = CompileAndVerify(source, null, options: TestOptions.DebugDll); 5931var verifier = CompileAndVerify(comp);
CodeGen\CodeGenAwaitForeachTests.cs (4)
2511var verifier = CompileAndVerify(comp, 2932var verifier = CompileAndVerify(comp, expectedOutput: "NextAsync(0) Current(1) Got(1) NextAsync(1) Current(2) Got(2) NextAsync(2) Current(3) Got(3) NextAsync(3) Dispose(4)"); 4197var verifier = CompileAndVerify(comp, expectedOutput: "NextAsync(0) Current(1) Got NextAsync(1) Current(2) Got NextAsync(2) Current(3) Got NextAsync(3)"); 4418var verifier = CompileAndVerify(comp, expectedOutput: "NextAsync(0) Current(1) Got NextAsync(1) Current(2) Got NextAsync(2) Current(3) Got NextAsync(3)");
CodeGen\CodeGenAwaitUsingTests.cs (3)
977var verifier = CompileAndVerify(comp, expectedOutput: "body DisposeAsync"); 1221var verifier = CompileAndVerify(comp, expectedOutput: "body DisposeAsync"); 2044var verifier = CompileAndVerify(comp, expectedOutput: "using dispose_start dispose_end return");
CodeGen\CodeGenCheckedTests.cs (38)
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(@" 2026var verifier = CompileAndVerify(source); 2340var verifier = CompileAndVerify(source); 2701var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2748var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2850var verifier = CompileAndVerify(comp, expectedOutput: "RAN1 RAN2 RAN3");
CodeGen\CodeGenClosureLambdaTests.cs (30)
22var verifier = CompileAndVerify(@" 131var compilation = CompileAndVerify(source, expectedOutput: @"12"); 188var compilation = CompileAndVerify(source, expectedOutput: @"12 256var compilation = CompileAndVerify(source, expectedOutput: @"12"); 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"); 4393var verifier = CompileAndVerify( 4416var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"True 4438var compilation = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"True 4464var verifier = CompileAndVerify( 4522var verifier = CompileAndVerify( 4597var verifier = CompileAndVerify( 4624var verifier = CompileAndVerify( 4666var compilation = CompileAndVerify(source, expectedOutput: "0"); 4700var verifier = CompileAndVerify(comp, expectedSignatures: new[] 4792var verifier = CompileAndVerify(comp); 4921var verifier = CompileAndVerify(comp); 5049var compilation = CompileAndVerify(source, expectedOutput: "success"); 5106var compilation = CompileAndVerify(source); 5137var compilation = CompileAndVerify(source); 5342var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5568var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;"); 5626var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;"); 5708var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;"); 5765var compilation = CompileAndVerify(source, expectedOutput: @"0-System.String;");
CodeGen\CodeGenConditionalOperatorTests.cs (30)
42var verify = CompileAndVerify(src, 166var verify = CompileAndVerify(src, 292var verify = CompileAndVerify(src, 421var verify = CompileAndVerify(src, 570var verify = CompileAndVerify(src, 654var verify = CompileAndVerify(src, 744var verify = CompileAndVerify(src, 850var verify = CompileAndVerify(src, 937var comp = CompileAndVerify(source, expectedOutput: "1"); 966var comp = CompileAndVerify(source, expectedOutput: @" 999var comp = CompileAndVerify(source); 1039var comp = CompileAndVerify(source); 1105var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular10); 1151var comp = CompileAndVerify(source, expectedOutput: "00"); 1204var comp = CompileAndVerify(source, expectedOutput: @" 1264var comp = CompileAndVerify(source); 1310var comp = CompileAndVerify(source); 1352var comp = CompileAndVerify(source); 1430var comp = CompileAndVerify(source); 2199var verify = CompileAndVerify(src, 2480var comp = CompileAndVerify(@" 2711var verify = CompileAndVerify(source, expectedOutput: expectedOutput); 2808var verify = CompileAndVerify(source, expectedOutput: @"0 2887var verify = CompileAndVerify(source, expectedOutput: @"0 2962var verify = CompileAndVerify(source, expectedOutput: @"0 3035var verify = CompileAndVerify(source, expectedOutput: @"0 3102var verifier = CompileAndVerify(source, expectedOutput: @"abc 3164var verifier = CompileAndVerify(source, expectedOutput: @"abc 3222var verifier = CompileAndVerify(source, expectedOutput: "11True").VerifyDiagnostics(); 3283var verifier = CompileAndVerify(source, expectedOutput: "11True").VerifyDiagnostics();
CodeGen\CodeGenConversionTests.cs (20)
81var compilationVerifier = CompileAndVerify(source, expectedOutput: @""); 116var compilationVerifier = CompileAndVerify(source, expectedOutput: @"Goo<T>(J<T> x) 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); 869var compilation = CompileAndVerify(source); 904var compilation = CompileAndVerify(source); 939var compilation = CompileAndVerify(source); 975var compilation = CompileAndVerify(source); 1012var compilation = CompileAndVerify(source); 1118var comp = CompileAndVerify(source); 1159var comp = CompileAndVerify(source);
CodeGen\CodeGenDeconstructTests.cs (133)
108var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "1 hello", references: s_valueTupleRefs, sourceSymbolValidator: validator); 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"); 5049var verifier = CompileAndVerify(comp, expectedOutput: "hello 42", sourceSymbolValidator: validator); 5140var verifier = CompileAndVerify(comp, expectedOutput: "hello 42 43"); 5154var verifier = CompileAndVerify(comp, expectedOutput: "hello 42"); 5200var verifier = CompileAndVerify(comp, expectedOutput: "hello 42 43", sourceSymbolValidator: validator); 5215var verifier = CompileAndVerify(comp, expectedOutput: "1 2 3"); 5324var verifier = CompileAndVerify(comp, expectedOutput: "hello 42 world", sourceSymbolValidator: validator); 5360var verifier = CompileAndVerify(comp, expectedOutput: "hello 42 world", sourceSymbolValidator: validator); 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"); 8209var verifier = CompileAndVerify(comp, expectedOutput: "3"); 8710var verifier = CompileAndVerify(comp); 8732var verifier = CompileAndVerify(comp); 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 (52)
16private static void VerifyTypeIL(CompilationVerifier compilation, string typeName, string expected) 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()); 8043var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute());
CodeGen\CodeGenDynamicTests.cs (15)
26private CompilationVerifier CompileAndVerifyIL( 44var unoptimizedVerifier = CompileAndVerify(unoptimizedCompilation, verify: verify); 45var optimizedVerifier = CompileAndVerify(optimizedCompilation, verify: verify); 310var c = CompileAndVerifyWithMscorlib40(source, new[] { systemCoreRef, csrtRef, funcRef }); 584var verifier = CompileAndVerifyWithCSharp(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule => 640var verifier = CompileAndVerifyWithCSharp(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule => 675var verifier = CompileAndVerifyWithCSharp(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule => 801var verifier = CompileAndVerifyWithCSharp(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule => 821var verifier = CompileAndVerifyWithCSharp(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule => 2281var verifier = CompileAndVerifyWithCSharp(source, symbolValidator: module => 3378var verifier = CompileAndVerifyIL(source, "C.M", expectedUnoptimizedIL: @" 7468var verifier = CompileAndVerify(script); 14062var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "hello!", references: new[] { ValueTupleRef, SystemRuntimeFacadeRef, CSharpRef, SystemCoreRef }); 15490var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), expectedOutput: "321 123", references: new[] { CSharpRef }); 16043private static void VerifyTypeIL(CompilationVerifier compilation, string typeName, string expected)
CodeGen\CodeGenExplicitImplementationTests.cs (7)
435var comp = CompileAndVerify(source, 589var comp = CompileAndVerify(source, 670var comp = CompileAndVerify(source, 748var comp = CompileAndVerify(source, expectedOutput: @" 813var comp = CompileAndVerify(source, expectedOutput: @" 960var comp = CompileAndVerify(source, expectedSignatures: new[] 1062var verifier2 = CompileAndVerify(comp2, expectedSignatures: new[]
CodeGen\CodeGenExprLambdaTests.cs (31)
17protected CompilationVerifier CompileAndVerifyUtil( 389var verifier = CompileAndVerify(new[] { ExpressionTestLibrary, @" 414var verifier = CompileAndVerify(@" 645var compilation = CompileAndVerifyUtil( 667var compilation = CompileAndVerifyUtil( 693var compilation = CompileAndVerifyUtil( 718var compilation = CompileAndVerifyUtil( 740var compilation = CompileAndVerifyUtil( 786var compilation = CompileAndVerifyUtil( 808var compilation = CompileAndVerifyUtil( 916var compilation = CompileAndVerifyUtil( 971var compilation = CompileAndVerifyUtil( 1023var compilation = CompileAndVerifyUtil( 1075var compilation = CompileAndVerifyUtil( 1127var compilation = CompileAndVerifyUtil( 1179var compilation = CompileAndVerifyUtil( 1231var compilation = CompileAndVerifyUtil( 1277var compilation = CompileAndVerifyUtil( 1326var compilation = CompileAndVerifyUtil( 1388var compilation = CompileAndVerifyUtil( 1410var compilation = CompileAndVerifyUtil( 1512var compilation = CompileAndVerifyUtil( 1563var compilation = CompileAndVerifyUtil( 1631var compilation = CompileAndVerifyUtil( 1660var compilation = CompileAndVerifyUtil( 1710var compilation = CompileAndVerifyUtil( 1748var compilation = CompileAndVerifyUtil( 1811var compilation = CompileAndVerifyUtil( 3143var c = CompileAndVerifyUtil(text, 3971var verifier = CompileAndVerifyUtil( 4122var verifier = CompileAndVerifyUtil(
CodeGen\CodeGenForEachTests.cs (32)
39var compilation = CompileAndVerify(source, expectedOutput: @" 106var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @" 210var compilation = CompileAndVerify(source, expectedOutput: @" 375var compilation = CompileAndVerify(source, expectedOutput: @" 436var compilation = CompileAndVerify(source, expectedOutput: @" 504var compilation = CompileAndVerify(source, expectedOutput: @" 571var compilation = CompileAndVerify(source, expectedOutput: @" 634var compilation = CompileAndVerify(source, expectedOutput: @" 696var compilation = CompileAndVerify(source, expectedOutput: @" 838var compilation = CompileAndVerify(source, expectedOutput: @" 883var compilation = CompileAndVerify(source, expectedOutput: @" 948var compilation = CompileAndVerify(source, expectedOutput: @" 1012var compilation = CompileAndVerify(source, expectedOutput: @" 1082var compilation = CompileAndVerify(source, expectedOutput: @" 1143var compilation = CompileAndVerify(source, expectedOutput: @" 1213var compilation = CompileAndVerify(source, expectedOutput: @" 1275var compilation = CompileAndVerify(source, expectedOutput: @" 1351var compilation = CompileAndVerify(source, expectedOutput: @" 1392var verifier = CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: @" 1456var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @" 1491var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @" 1677var compilation = CompileAndVerify(source, expectedOutput: @" 1710var compilation = CompileAndVerify(source, expectedOutput: @" 1787var compilation = CompileAndVerify(source, expectedOutput: @" 1893var compilation = CompileAndVerify(source, expectedOutput: @" 1937var compilation = CompileAndVerify(source, expectedOutput: @" 1979var compilation = CompileAndVerify(source, expectedOutput: "1"); 2005var compilation = CompileAndVerify(source, expectedOutput: "1"); 2029var compilation = CompileAndVerify(source, expectedOutput: @" 2102var compilation = CompileAndVerify(source, expectedOutput: @" 2167var compilation = CompileAndVerify(source, expectedOutput: @" 2354var compilation = CompileAndVerify(source);
CodeGen\CodeGenFunctionPointersTests.cs (113)
28private CompilationVerifier CompileAndVerifyFunctionPointers( 59private CompilationVerifier CompileAndVerifyFunctionPointersWithIl(string source, string ilStub, Action<ModuleSymbol>? symbolValidator = null, string? expectedOutput = null) 87var verifier = CompileAndVerifyFunctionPointers($@" 110var comp = CompileAndVerifyFunctionPointers(@" 131var verifier = CompileAndVerifyFunctionPointers(@" 155var verifier = CompileAndVerifyFunctionPointers(@" 179var verifier = CompileAndVerifyFunctionPointers(@" 214var verifier = CompileAndVerifyFunctionPointers(@" 469var verifier = CompileAndVerifyFunctionPointersWithIl(source, il, expectedOutput: "12345678"); 595var verifier = CompileAndVerifyFunctionPointers(@" 633var verifier = CompileAndVerifyFunctionPointers(@" 725var verifier = CompileAndVerifyFunctionPointers(@" 755var verifier = CompileAndVerifyFunctionPointers(@" 808var verifier = CompileAndVerifyFunctionPointers(@" 859var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub: ilSource, symbolValidator: symbolValidator); 1064var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: "Called"); 1129var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: "Called"); 1194var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: "Called"); 1250var verifier = CompileAndVerifyFunctionPointers(source, expectedOutput: "Hello World"); 1273var verifier = CompileAndVerifyFunctionPointers(new[] { $@" 1338var verifier = CompileAndVerifyFunctionPointers(source); 1358var verifier = CompileAndVerifyFunctionPointers(@" 1481var verifier = CompileAndVerifyFunctionPointers(new[] { @" 1574var verifier = CompileAndVerifyFunctionPointers(@" 1808var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @" 1903var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @" 1972var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @" 2053var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @" 2132var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @" 2203var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @"Ref set"); 2274var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @"Field"); 2339var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @"Field"); 2428var verifier = CompileAndVerifyFunctionPointersWithIl(source, ilStub, expectedOutput: @" 2472var verifier = CompileAndVerifyFunctionPointers(@" 2669var verifier = CompileAndVerifyFunctionPointers(@" 2694var verifier = CompileAndVerifyFunctionPointers(@" 2724var verifier = CompileAndVerifyFunctionPointers(@" 2775var verifier = CompileAndVerifyFunctionPointers(@" 2815var verifier = CompileAndVerifyFunctionPointers(@" 2852var verifier = CompileAndVerifyFunctionPointers(@" 2887var verifier = CompileAndVerifyFunctionPointers(@" 2929var verifier = CompileAndVerifyFunctionPointers(@" 2964var verifier = CompileAndVerifyFunctionPointers($@" 3009var verifier = CompileAndVerifyFunctionPointers(@" 3277var verifier = CompileAndVerifyFunctionPointers(@" 3511var verifier = CompileAndVerifyFunctionPointers(@" 3797var verifier = CompileAndVerifyFunctionPointers(@" 3859var verifier = CompileAndVerifyFunctionPointers(@" 3923var verifier = CompileAndVerifyFunctionPointers(@" 4135var verifier = CompileAndVerifyFunctionPointers(@" 4171var verifier = CompileAndVerifyFunctionPointers(@" 4232var verifier = CompileAndVerifyFunctionPointers(@" 4300var verifier = CompileAndVerifyFunctionPointers(@" 4337var verifier = CompileAndVerifyFunctionPointers(@" 4409var verifier = CompileAndVerifyFunctionPointers(@" 4474var verifier = CompileAndVerifyFunctionPointers(@" 4520var verifier = CompileAndVerifyFunctionPointers(@" 4578var verifier = CompileAndVerifyFunctionPointers(@" 4637var verifier = CompileAndVerifyFunctionPointers(@" 4692var verifier = CompileAndVerifyFunctionPointers(@" 4748var verifier = CompileAndVerifyFunctionPointers(@" 4810var verifier = CompileAndVerifyFunctionPointers(@" 4880var verifier = CompileAndVerifyFunctionPointers(@" 4924var verifier = CompileAndVerifyFunctionPointers(@" 4956var verifier = CompileAndVerifyFunctionPointers(@" 5030var verifier = CompileAndVerifyFunctionPointers(@" 5049var verifier = CompileAndVerifyFunctionPointers(@" 5080var verifier = CompileAndVerifyFunctionPointers(@" 5345var verifier = CompileAndVerifyFunctionPointers(@" 5447var comp = CompileAndVerifyFunctionPointers($@" 5477var comp = CompileAndVerifyFunctionPointers(@" 5593var verifier = CompileAndVerifyFunctionPointersWithIl(source, il, symbolValidator: symbolValidator); 5772var verifier = CompileAndVerifyFunctionPointersWithIl(source, il, expectedOutput: "LL"); 5848var verifier = CompileAndVerifyFunctionPointersWithIl(source, il, expectedOutput: "LL"); 5873var verifier = CompileAndVerifyFunctionPointers(@" 5914var verifier = CompileAndVerifyFunctionPointers(@" 6005var verifier = CompileAndVerifyFunctionPointers(@" 6043var verifier = CompileAndVerifyFunctionPointers(@" 6956var verifier = CompileAndVerifyFunctionPointersWithIl(source, il, expectedOutput: @" 7132var comp = CompileAndVerifyFunctionPointers(@" 7170var verifier = CompileAndVerifyFunctionPointers(@" 7197var verifier = CompileAndVerifyFunctionPointers(@" 7243var verifier = CompileAndVerifyFunctionPointers(@" 7454var verifier = CompileAndVerifyFunctionPointers(source, expectedOutput: "", options: TestOptions.UnsafeReleaseExe); 10660var verifier = CompileAndVerifyFunctionPointers(new[] { @" 10694var verifier = CompileAndVerifyFunctionPointers(new[] { @" 10780var verifier = CompileAndVerifyFunctionPointers(@" 10820var verifier = CompileAndVerifyFunctionPointers(@" 10870var verifier = CompileAndVerifyFunctionPointers(@" 10975var verifier = CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Skipped); 11019var verifier = CompileAndVerifyFunctionPointers(@" 11051var verifier = CompileAndVerifyFunctionPointers(@" 11088var verifier = CompileAndVerifyFunctionPointers(@" 11126var verifier = CompileAndVerifyFunctionPointers(@" 11159var verifier = CompileAndVerifyFunctionPointers(@" 11201var verifier = CompileAndVerifyFunctionPointers(@" 11267var verifier = CompileAndVerifyFunctionPointers(@" 11316var verifier = CompileAndVerifyFunctionPointers(@" 11375var verifier = CompileAndVerifyFunctionPointers(@" 11615var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 11643var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 11696var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 11753var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, expectedOutput: "True", symbolValidator: static module => 11783var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, 12012var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 12145var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 12173var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 12203var verifier = CompileAndVerify(source, options: TestOptions.UnsafeDebugDll, symbolValidator: static module => 12252var verifier = CompileAndVerifyFunctionPointers(code, expectedOutput: "true"); 12298var verifier = CompileAndVerifyFunctionPointers(code, expectedOutput: "true"); 12344var verifier = CompileAndVerifyFunctionPointers(code, expectedOutput: "true"); 12390var verifier = CompileAndVerifyFunctionPointers(code, expectedOutput: "true"); 12595private static ModuleSymbol GetSourceModule(CompilationVerifier verifier)
CodeGen\CodeGenImplicitImplementationTests.cs (12)
959var comp = CompileAndVerify(source, 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, 2054var comp = CompileAndVerify(source, expectedOutput: @"
CodeGen\CodeGenImplicitlyTypeArraysTests.cs (2)
253var compilation = CompileAndVerify( 434var compilation = CompileAndVerify(
CodeGen\CodeGenIncrementTests.cs (1)
441var compilation = CompileAndVerify(source);
CodeGen\CodeGenInParametersTests.cs (50)
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(@" 419var comp = CompileAndVerify(@" 472var verifier = CompileAndVerify(@" 531var verifier = CompileAndVerify(@" 613var comp = CompileAndVerify(@" 661var comp = CompileAndVerify(@" 722var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 770var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"42 824var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"42 887var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 947var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 1008var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 1059var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"hi 1096var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1303var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1346var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1416var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"42"); 1449var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"42"); 1586var verifier = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "6"); 1722var result = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"47"); 2314var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2544var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"0"); 2602var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @""); 2694var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Passes, expectedOutput: @"4242420"); 3706var verifier = CompileAndVerify(compilation, expectedOutput: "XX"); 3744var verifier = CompileAndVerify(compilation, expectedOutput: "5050"); 3795var verifier = CompileAndVerify(compilation, expectedOutput: "5050"); 3853var verifier = CompileAndVerify(compilation, expectedOutput: "5050"); 3917var verifier = CompileAndVerify(compilation, expectedOutput: "555555"); 3981var verifier = CompileAndVerify(compilation, expectedOutput: "0011", verify: Verification.FailsPEVerify); 4059var verifier = CompileAndVerify(compilation, expectedOutput: ""); 4115var verifier = CompileAndVerify(compilation, expectedOutput: "hihi"); 4173var verifier = CompileAndVerify(compilation, expectedOutput: "hihi"); 4236var verifier = CompileAndVerify(compilation, expectedOutput: "11"); 4309var verifier = CompileAndVerify(compilation, expectedOutput: "TestTest"); 4366var verifier = CompileAndVerify(compilation, expectedOutput: "TestTestDerivedDerived"); 4423var verifier = CompileAndVerify(source, expectedOutput: "00"); 4495var verifier = CompileAndVerify(source, expectedOutput: "00"); 4573var verifier = CompileAndVerify(source, expectedOutput: "00", verify: Verification.FailsPEVerify); 4657var verifier = CompileAndVerify(source, expectedOutput: "12"); 4724var comp = CompileAndVerify(text, expectedOutput: "00"); 4840var verifier = CompileAndVerify(libUser);
CodeGen\CodeGenInterfaceImplementation.cs (30)
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: @" 2361var comp = CompileAndVerify(source, expectedOutput: @" 2425var comp = CompileAndVerify(source, expectedOutput: @" 2481var comp = CompileAndVerify(source, expectedOutput: @" 2561var comp = CompileAndVerify(source, expectedSignatures: new[] 2641var verifier = CompileAndVerify(comp, expectedSignatures: new[] 2748var verifier = CompileAndVerify(comp, expectedSignatures: new[]
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 (11)
87var compilation = CompileAndVerify(source, expectedOutput: "123456789X"); 124var compilation = CompileAndVerify(source, expectedOutput: "0123456789"); 170var compilation = CompileAndVerifyWithMscorlib40(source, expectedOutput: "12324565"); 304var compilation = CompileAndVerify(source, expectedOutput: "0|01Z|012XZ|012X3Z|012X34YZ|012X34Y5Z|012X34Y5Z6"); 1176var rel = CompileAndVerify(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1193var dbg = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 1940var verifier = this.CompileAndVerify(comp); 1973var verifier = this.CompileAndVerify(comp); 2392var verifier = CompileAndVerify(compilation, verify: Verification.FailsPEVerify); 2569var v = CompileAndVerify(source, options: TestOptions.ReleaseDll); 2918var compilation = CompileAndVerify(source, expectedOutput: "FalseTrueFalseTrue", options: TestOptions.ReleaseExe);
CodeGen\CodeGenLocalFunctionTests.cs (34)
23public static IMethodSymbol FindLocalFunction(this CompilationVerifier verifier, string localFunctionName) 73var verifier = CompileAndVerify(src, expectedOutput: @" 390var verifier = CompileAndVerify(comp, expectedOutput: "5"); 461var verifier = CompileAndVerify(@" 827var verifier = CompileAndVerify(@" 1030var comp = CompileAndVerify(@" 1545var comp = CompileAndVerify(src); 2592var verify = VerifyOutputInMain(source, "2", "System"); 2609var verify = VerifyOutputInMain(source, "2", "System"); 2716var verify = VerifyOutputInMain(source, "2", "System"); 3131var verify = VerifyOutputInMain(source, "2", "System"); 3156var verify = VerifyOutputInMain(source, "4", "System"); 3200var verify = VerifyOutputInMain(source, "2", "System"); 3249var verify = VerifyOutput(source, "2"); 3274var verify = VerifyOutputInMain(source, "2", "System"); 3308var verify = VerifyOutputInMain(source, "2", "System"); 3396var verify = VerifyOutput(source, "2"); 4238var verify = VerifyOutputInMain(source, "2", "System"); 5133var c = CompileAndVerify(@" 5316var verifier = CompileAndVerify( 5349var verifier = CompileAndVerify( 5383var verifier = CompileAndVerify( 5416var verifier = CompileAndVerify( 5671var verifier = CompileAndVerify( 5737var verifier = CompileAndVerify( 5812var verifier = CompileAndVerify( 5887var verifier = CompileAndVerify( 5955var verifier = CompileAndVerify( 5993var verifier = CompileAndVerify( 6049var verifier = CompileAndVerify( 6106var verifier = CompileAndVerify( 6301internal CompilationVerifier VerifyOutput(string source, string output, CSharpCompilationOptions options, Verification verify = default) 6307internal CompilationVerifier VerifyOutput(string source, string output) 6313internal CompilationVerifier VerifyOutputInMain(string methodBody, string output, params string[] usings)
CodeGen\CodeGenLockTests.cs (16)
36var verifier = CompileAndVerify(text); 91var verifier = CompileAndVerify(text); 145var verifier = CompileAndVerify(text); 201var verifier = CompileAndVerify(text); 258var verifier = CompileAndVerify(text); 312var verifier = CompileAndVerify(text); 366var verifier = CompileAndVerify(text); 420var verifier = CompileAndVerify(text); 1362var verifier = CompileAndVerify(compilation); 1412var verifier = CompileAndVerify(compilation); 1461var verifier = CompileAndVerify(compilation); 1512var verifier = CompileAndVerify(compilation); 1564var verifier = CompileAndVerify(compilation); 1613var verifier = CompileAndVerify(compilation); 1662var verifier = CompileAndVerify(compilation); 1711var verifier = CompileAndVerify(compilation);
CodeGen\CodeGenMscorlib.cs (1)
1041var c = CompileAndVerify(comp, verify: Verification.Skipped);
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (15)
59var verifier = CompileAndVerify(source, expectedOutput: @" 151var verifier = CompileAndVerify(@" 246var verifier = CompileAndVerify(@" 408var verifier = CompileAndVerify(source, expectedOutput: @" 442var verifier = CompileAndVerify(@" 771var verifier = CompileAndVerify(@" 1025var verifier = CompileAndVerify(@" 1325var verifier = CompileAndVerify(source, expectedOutput: "Test String"); 1411var verifier = CompileAndVerify(@" 1703var verifier = CompileAndVerify(@" 2159var verifier = CompileAndVerify(@" 2222var verifier = CompileAndVerify(@" 2379var verifier = CompileAndVerify(source, expectedOutput: "1"); 2535var verifier = CompileAndVerify(testSource, references: new[] { reference1 }); 2807var verifier = CompileAndVerify(@"
CodeGen\CodeGenOperators.cs (91)
40var compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe); 91var compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe); 159var compilation = CompileAndVerify(source, expectedOutput: "False", options: TestOptions.ReleaseExe); 230var compilation = CompileAndVerify(source, expectedOutput: "False Branch not taken-True Branch taken", options: TestOptions.ReleaseExe); 302var compilation = CompileAndVerify(source, expectedOutput: "True Branch taken", options: TestOptions.ReleaseExe); 355var compilation = CompileAndVerify(source, expectedOutput: "True Branch taken", options: TestOptions.ReleaseExe); 430var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 496var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 551var compilation = CompileAndVerify(source); 585var compilation = CompileAndVerify(source); 604var comp = CompileAndVerify(text, expectedOutput: "False"); 637var comp = CompileAndVerify(text, expectedOutput: "False"); 669var comp = CompileAndVerify(text, expectedOutput: "False"); 699var comp = CompileAndVerify(text, expectedOutput: "False"); 732var comp = CompileAndVerify(text, expectedOutput: @"False 820var comp = CompileAndVerify(text, expectedOutput: @"123456"); 909var compilation = CompileAndVerify(source); 956var compilation = CompileAndVerify(source); 1029var comp = CompileAndVerify(source, 1091var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1224var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1298var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1365var compilation = CompileAndVerify(source, expectedOutput: string.Empty); 1434var comp = CompileAndVerify(source, expectedOutput: @" 1515var comp = CompileAndVerify(source, expectedOutput: @" 1567var compilation = CompileAndVerify(source, expectedOutput: "Goo"); 1630var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 1677var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 1724var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]System.Collections.Generic.IEnumerable`1[System.Int32]"); 1771var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 1820var comp = CompileAndVerify(source); 1867var verify = CompileAndVerify(src, 2008var comp = CompileAndVerify(source); 2067var comp = CompileAndVerify(source); 2133var comp = CompileAndVerify(source); 2196var comp = CompileAndVerify(source); 2571var verifier = CompileAndVerify(source, 2663var verifier = CompileAndVerify(source, 2770var verifier = CompileAndVerify(source, expectedOutput: @"0"); 2797var verifier = CompileAndVerify(source, expectedOutput: @"PASS"); 2822var verifier = CompileAndVerify(source, expectedOutput: @"0"); 2860var verifier = CompileAndVerify(source, expectedOutput: @"01"); 2895var verifier = CompileAndVerify(source, expectedOutput: @"10"); 2931var verifier = CompileAndVerify(source, expectedOutput: @"0"); 3050var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 3100var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 3119var comp = CompileAndVerify(text, expectedOutput: ""); 3254var verifier = CompileAndVerify(source: source, expectedOutput: "Pass"); 3423var comp = CompileAndVerify(text, expectedOutput: @"False 3483var comp = CompileAndVerify(text, options: TestOptions.DebugExe, expectedOutput: @"True 3546var comp = CompileAndVerify(text, expectedOutput: @"one"); 3664var comp = CompileAndVerify(text, expectedOutput: @" 3796var comp = CompileAndVerify(text, expectedOutput: @"ttff"); 3830var comp = CompileAndVerify(text, expectedOutput: expectedOutput); 3864var comp = CompileAndVerify(text).VerifyIL("C.M", @" 3904var comp = CompileAndVerify(text, expectedOutput: @"True 3932var comp = CompileAndVerify(text, expectedOutput: @" 3968var comp = CompileAndVerify(text, expectedOutput: @" 4005var comp = CompileAndVerify(text, expectedOutput: @" 4160var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 4212var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]System.Collections.Generic.IEnumerable`1[System.Int32]"); 4266var comp = CompileAndVerify(source, expectedOutput: "System.Collections.Generic.IEnumerable`1[System.Int32]"); 4313var comp = CompileAndVerify(source); 4361var comp = CompileAndVerify(source); 4422var comp = CompileAndVerify(source); 4493var comp = CompileAndVerify(source); 4559var comp = CompileAndVerify(new string[] { source }, expectedOutput: @""); 4628var comp = CompileAndVerify(source); 4695var comp = CompileAndVerify(source); 4752var comp = CompileAndVerify(source); 4814var comp = CompileAndVerify(source); 4856var comp = CompileAndVerify(source); 4913var comp = CompileAndVerify(source); 4985var comp = CompileAndVerify(source); 5066var compilation = CompileAndVerify(source, expectedOutput: @"3 5145var result = CompileAndVerify(source, options: TestOptions.ReleaseExe); 5200var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "True"); 5248var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: "11461640193"); 5400var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"5180801 5605var result = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: expectedOutput); 5705var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 5763var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 5826var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 5912var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 6091var cv = CompileAndVerify(comp, expectedOutput: @"TrueFalse"); 6177var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6259var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6419var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6487var verifier = CompileAndVerify(code, expectedOutput: "Run"); 6561var verifier = CompileAndVerify(code, expectedOutput: "12"); 6644var verifier = CompileAndVerify(code, expectedOutput: "12");
CodeGen\CodeGenOptimizedNullableOperators.cs (29)
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); 823var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 868var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 985var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1112var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1285var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1485var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1611var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1647var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1694var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1823var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1925var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 1973var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2048var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2100var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2188var comp = CompileAndVerify(source, expectedOutput: expectedOutput); 2218var comp = CompileAndVerify(source, expectedOutput: @" 2374var comp = CompileAndVerify(source, expectedOutput: @"
CodeGen\CodeGenOverridingAndHiding.cs (50)
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"); 1264var verifier = CompileAndVerify(compilation, expectedOutput: substitutedExpected); 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( 3225var verifier = CompileAndVerify( 3293var comp = CompileAndVerify(source, 3525var verifier = CompileAndVerify( 3559var verifier = CompileAndVerify(text, 3586var verifier = CompileAndVerify(text, 3651var comp = CompileAndVerify(source, 3703var verifier = CompileAndVerify(text, 4017var verifier = CompileAndVerify( 4128var verifier = CompileAndVerify(source, symbolValidator: validator(true), sourceSymbolValidator: validator(false), expectedOutput: @"System.Int32[]"); 4175var comp = CompileAndVerify(source2, references: new[] { new CSharpCompilationReference(compref) }, expectedOutput: "M"); 4199var cs1Verifier = CompileAndVerify(cs1Compilation); 4241var cs2Verifier = CompileAndVerify(cs2Compilation, 4268var cs1Verifier = CompileAndVerify(cs1Compilation); 4313var cs2Verifier = CompileAndVerify(cs2Compilation, expectedOutput: @"C4 4343var comp = CompileAndVerify(source, expectedOutput: 4416var cs1Verifier = CompileAndVerify(cs1Compilation);
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (22)
659var cv = CompileAndVerify(comp, expectedOutput: "", verify: Verification.Passes); 727var cv = CompileAndVerify(comp, expectedOutput: "100", verify: Verification.Passes); 766var verifier = CompileAndVerify(compilation, expectedOutput: "10;20;", verify: Verification.Skipped); 805var verifier = CompileAndVerify(compilation, expectedOutput: "10;20;", verify: Verification.Skipped); 900var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 947var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1028var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1052var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1095var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1174var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1318var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1370var verifier = CompileAndVerify(compilation, expectedOutput: "AF2D4567", verify: Verification.Skipped); 1483var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 1517var verifier = CompileAndVerify(compilation, verify: Verification.Passes); 1550var verifier = CompileAndVerify(compilation, expectedOutput: "000000", verify: Verification.Passes); 1615var verifier = CompileAndVerify(compilation, expectedOutput: "340", verify: Verification.Skipped); 2369var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2476var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2529var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2561var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2609var verifier = CompileAndVerify(compilation, verify: Verification.Skipped); 2660var verifier = CompileAndVerify(compilation, verify: Verification.Skipped);
CodeGen\CodeGenReadonlyStructTests.cs (25)
51var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"12"); 122var comp = CompileAndVerify(text, new[] { ref1 }, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"12"); 188var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.FailsPEVerify, expectedOutput: @"12"); 262var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.FailsPEVerify, expectedOutput: @"hello2"); 343var comp = CompileAndVerify(text, new[] { ref1 }, parseOptions: TestOptions.Regular, verify: Verification.FailsPEVerify, 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"); 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); 2580var verifier = CompileAndVerify(csharp, parseOptions: parseOptions, verify: verify);
CodeGen\CodeGenRefConditionalOperatorTests.cs (17)
40var comp = CompileAndVerify(source, expectedOutput: "3344"); 92var comp = CompileAndVerify(source, expectedOutput: "44", verify: Verification.Fails); 128var comp = CompileAndVerify(source, expectedOutput: "44", verify: Verification.Passes); 164var comp = CompileAndVerify(source, expectedOutput: "55", verify: Verification.Passes); 202var comp = CompileAndVerify(source, expectedOutput: "5555", verify: Verification.Passes); 249var comp = CompileAndVerify(source, expectedOutput: "67", verify: Verification.Fails); 303var comp = CompileAndVerify(source, expectedOutput: "446767", verify: Verification.Passes); 363var comp = CompileAndVerify(source, expectedOutput: "1"); 437var comp = CompileAndVerify(source, expectedOutput: @"False 836var comp = CompileAndVerify(source, expectedOutput: "1", verify: Verification.Passes); 880var comp = CompileAndVerify(source, expectedOutput: "1", verify: Verification.Passes); 911var comp = CompileAndVerify(source, expectedOutput: "1", verify: Verification.Passes); 999var comp = CompileAndVerify(source, expectedOutput: "1"); 1064var comp = CompileAndVerifyWithMscorlib40(source, references: new[] { TestMetadata.Net40.System, ValueTupleRef, TestMetadata.Net40.SystemCore }, expectedOutput: "00", verify: Verification.FailsPEVerify); 1152var comp = CompileAndVerify(source, expectedOutput: "00", verify: Verification.FailsPEVerify); 1267var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: verify); 1354var verifier = CompileAndVerify(comp, expectedOutput: "0run", verify: Verification.Fails);
CodeGen\CodeGenRefLocalTests.cs (55)
37var verifier = CompileAndVerify(src, verify: Verification.Fails); 74var verifier = CompileAndVerify(@" 129var verifier = CompileAndVerify(@" 154var verifier = CompileAndVerify(@" 195var verifier = CompileAndVerify(@" 236var verifier = CompileAndVerify(@" 269var verifier = CompileAndVerify(@" 369var verifier = CompileAndVerify(@" 538var comp = CompileAndVerify(@" 571var comp = CompileAndVerify(@" 601var comp = CompileAndVerify(@" 646var comp = CompileAndVerify(@" 696var comp = CompileAndVerify(@" 785var comp = CompileAndVerify(@" 870var comp = CompileAndVerify(@" 924var comp = CompileAndVerify(@" 947var comp = CompileAndVerify(@" 1031var comp = CompileAndVerify(@" 1060var comp = CompileAndVerify(@" 1112var comp = CompileAndVerify(@" 1140var comp = CompileAndVerify(@" 1177var comp = CompileAndVerify(@" 1251var comp = CompileAndVerify(@" 1322var comp = CompileAndVerify(@" 1367var comp = CompileAndVerify(@" 1420var comp = CompileAndVerify(@" 1469var comp = CompileAndVerify(@" 1510var comp = CompileAndVerify(@" 1605var comp = CompileAndVerify(@" 1806var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 1877var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 1967var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2029var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2096var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2178var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2273var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2349var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2400var comp = CompileAndVerify(text, options: TestOptions.DebugDll); 2481var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2552var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2649var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2759var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2836var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2942var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3466var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: verify); 3535var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails); 3600var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: verify); 3652var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: verify); 3708var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: verify); 3732var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 3785var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 3837var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 3888var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 3937var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: ""); 3973var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "");
CodeGen\CodeGenRefOutTests.cs (8)
351var verifier = CompileAndVerify(compilation, expectedOutput: "042"); 413var verifier = CompileAndVerify(compilation, expectedOutput: "Q"); 475var verifier = CompileAndVerify(compilation, expectedOutput: "Q"); 543var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 630var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 692var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 778var verifier = CompileAndVerify(comp, expectedOutput: "0run", verify: Verification.Fails); 830var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails);
CodeGen\CodeGenRefReadonlyReturnTests.cs (12)
62var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails); 116var comp = 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); 805var comp = CompileAndVerifyWithMscorlib40(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: Verification.Passes); 883var comp = CompileAndVerifyWithMscorlib40(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1201var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular);
CodeGen\CodeGenRefReturnTests.cs (22)
21private CompilationVerifier CompileAndVerifyRef( 194var v = CompileAndVerifyRef(text, expectedOutput: "42"); 246var compilation = CompileAndVerifyRef(text); 310var compilation = CompileAndVerifyRef(text, verify: Verification.Passes); 388var compilation = CompileAndVerifyRef(text); 441var compilation = CompileAndVerifyRef(text); 502var compilation = CompileAndVerifyRef(text, verify: Verification.Passes); 575var compilation = CompileAndVerifyRef(text); 658var compilation = CompileAndVerifyRef(text); 721var compilation = CompileAndVerifyRef(text); 765var compilation = CompileAndVerifyRef(text, verify: Verification.Fails); 825var compilation = CompileAndVerifyRef(text); 877var compilation = CompileAndVerifyRef(text); 947var compilation = CompileAndVerifyRef(text); 1022var compilation = CompileAndVerifyRef(text); 1080var compilation = CompileAndVerifyRef(text); 1159var compilation = CompileAndVerifyRef(text); 2589var v = CompileAndVerify(text, expectedOutput: "12345"); 2709var v = CompileAndVerify(source, expectedOutput: "2"); 2787var v = CompileAndVerify(source, expectedOutput: "23"); 2969var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "2"); 3082var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "2");
CodeGen\CodeGenScriptTests.cs (2)
497var verifier = CompileAndVerify(compilation, expectedOutput: @"complete"); 557var verifier = CompileAndVerify(s0, verify: Verification.FailsPEVerify);
CodeGen\CodeGenShortCircuitOperatorTests.cs (100)
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 2624var comp = CompileAndVerify(source, references: new MetadataReference[] { CSharpRef }, expectedOutput: @"False 2683var comp = CompileAndVerify(source, references: new MetadataReference[] { CSharpRef }, expectedOutput: @"False 2749var comp = CompileAndVerify(c, expectedOutput: @"False 2818var comp = CompileAndVerify(c, expectedOutput: @"False 2899var comp = CompileAndVerify(c, expectedOutput: @"False 2969var comp = CompileAndVerify(c, expectedOutput: @"False 3052var comp = CompileAndVerify(c, expectedOutput: @"False 3135var comp = CompileAndVerify(c, expectedOutput: @"False 3184var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @"System.Nullable`1[System.Int64]"); 3241var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @"System.Nullable`1[System.Int64]"); 3295var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @""); 3452var comp = CompileAndVerify(source, expectedOutput: @"0 3528var comp = CompileAndVerify(source, expectedOutput: @"0 3607var comp = CompileAndVerify(source, expectedOutput: @"0 3687var comp = CompileAndVerify(source, expectedOutput: @"0 3775var comp = CompileAndVerify(source, expectedOutput: @"0 3855var comp = CompileAndVerify(source, expectedOutput: @" 3913var comp = CompileAndVerify(source, expectedOutput: @"False 4011var comp = CompileAndVerify(source, expectedOutput: @"True 4136var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: @" > 4247var comp = CompileAndVerify(source, expectedOutput: @""); 4317var comp = CompileAndVerify(source, expectedOutput: @""); 4408var comp = CompileAndVerify(source, expectedOutput: @"Success"); 4481var comp = CompileAndVerify(source, expectedOutput: @"Success"); 4519var comp = CompileAndVerify(source, expectedOutput: @""); 4596var comp = CompileAndVerify(source, expectedOutput: @""); 4679var comp = CompileAndVerify(source, expectedOutput: @"not empty 4908var comp = CompileAndVerify(source, expectedOutput: @"1"); 4965var verifier = CompileAndVerify(source, expectedOutput: @"0 5006var verifier = CompileAndVerify(source, expectedOutput: @"0 5049var verifier = CompileAndVerify(source, expectedOutput: @"01/01/0001 00:00:00 5098var verifier = CompileAndVerify(source, expectedOutput: @"0 5148var verifier = CompileAndVerify(source, expectedOutput: @"--- 5194var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 5245var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify, options: TestOptions.DebugExe.WithAllowUnsafe(true), expectedOutput: @"--- 5302var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5429var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5556var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 5682var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @" --- 5731var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5820var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"--- 5899var verifier = CompileAndVerify(source, expectedOutput: @"False"); 5936var verifier = CompileAndVerify(source, expectedOutput: @"False"); 5990var verifier = CompileAndVerify(source, expectedOutput: @"False 6058var verifier = CompileAndVerify(source, expectedOutput: @"FalseTrueTrue"); 6098var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalse"); 6141var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalseFalse"); 6205var comp = CompileAndVerify(c, expectedOutput: @"FalseTrueTrue"); 6242var comp = CompileAndVerify(c, expectedOutput: @"FalseTrueTrue"); 6285var comp = CompileAndVerify(c, expectedOutput: @"FalseTrueTrue"); 6321var comp = CompileAndVerify(c, expectedOutput: @"# 6364var comp = CompileAndVerify(c, expectedOutput: @"False 6399var comp = CompileAndVerify(c, expectedOutput: @"False 6454var verifier = CompileAndVerify(source, expectedOutput: @"==True 6533var verifier = CompileAndVerify(source, expectedOutput: @"==True 6611var verifier = CompileAndVerify(source, expectedOutput: @"False 6685var verifier = CompileAndVerify(source, expectedOutput: @"False 6750var comp = CompileAndVerify(source, expectedOutput: @"1 6803var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalse"); 6852var verifier = CompileAndVerify(source, expectedOutput: @"TrueTrueFalseFalse"); 6902var verifier = CompileAndVerify(source, expectedOutput: @"0"); 6960var verifier = CompileAndVerify(source, expectedOutput: @"42"); 7005var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7065var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7132var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7192var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7247var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7291var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: 7337var comp = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"", verify: Verification.Fails); 7405var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"");
CodeGen\CodeGenStringConcat.cs (31)
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, expectedOutput: @"test_field: 2"); 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"); 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");
CodeGen\CodeGenStructsAndEnum.cs (29)
46var compilation = CompileAndVerify(source, expectedOutput: "0427"); 103var compilation = CompileAndVerify(source, expectedOutput: "042"); 151var compilation = CompileAndVerify(source, expectedOutput: "0708589934592"); 203var compilation = CompileAndVerify(source, expectedOutput: @"0"); 263var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @""); 338var compilation = CompileAndVerify(source, expectedOutput: @"Program+S1"); 384var compilation = CompileAndVerify(source, expectedOutput: @"S::M 453var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: @" 663var compilation = CompileAndVerify(source, expectedOutput: ""); 744var compilation = CompileAndVerify(source, expectedOutput: ""); 844var compilation = CompileAndVerify(source, expectedOutput: ""); 957var compilation = CompileAndVerify(source, expectedOutput: ""); 1095var compilation = CompileAndVerify(source, expectedOutput: "1111"); 1194var compilation = CompileAndVerify(source, expectedOutput: "1111"); 1286var compilation = CompileAndVerify(source, expectedOutput: "11"); 1373var compilation = CompileAndVerify(source, expectedOutput: ""); 1481var compilation = CompileAndVerify(source, expectedOutput: ""); 1555var compilation = CompileAndVerify(source, expectedOutput: "S1", verify: Verification.Skipped); 1633var compilation = CompileAndVerify(source); 1662var compilation = CompileAndVerify(source, expectedOutput: "B"); 1731var compilation = CompileAndVerify(source, expectedOutput: @"ca761232-ed42-11ce-bacd-00aa0057b223 1830var compilation = CompileAndVerify(source, expectedOutput: "False"); 1886var compilation = CompileAndVerify(source, expectedOutput: "False"); 1954var compilation = CompileAndVerify(source, expectedOutput: "False"); 2008var compilation = CompileAndVerify(source, expectedOutput: "False"); 2101var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: "True"); 2216var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: @"353 2288var compilation = CompileAndVerify(source); 2372var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify, expectedOutput: "0");
CodeGen\CodeGenTests.cs (194)
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); 534var result = CompileAndVerify(compilation); 608var result = CompileAndVerify(compilation); 711var compilation = CompileAndVerify(source, expectedOutput: @" 750var compilation = CompileAndVerify(source, expectedOutput: @" 861var result = CompileAndVerify(compilation, expectedOutput: "Struct1 Struct2 "); 896var compilation = CompileAndVerify(source); 946var compilation = CompileAndVerify(source); 1102var compilation = CompileAndVerify(source); 1503var compilation = CompileAndVerify(source); 1530var compilation = CompileAndVerify(source); 1575var compilation = CompileAndVerify(source); 1614var compilation = CompileAndVerify(source); 1659var compilation = CompileAndVerify(source, expectedOutput: "42"); 1688var compilation = CompileAndVerify(source, expectedOutput: "42"); 1717var compilation = CompileAndVerify(source, expectedOutput: "42"); 1749var compilation = CompileAndVerify(source, expectedOutput: "123"); 1807var v = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "42123"); 1858var compilation = CompileAndVerify(source, expectedOutput: ""); 1900var compilation = CompileAndVerify(source, expectedOutput: @" 1947var compilation = CompileAndVerify(source, expectedOutput: @" 1983var compilation = CompileAndVerify(source, expectedOutput: @"System.Exception: hello"); 2021var compilation = CompileAndVerify(source, expectedOutput: @"hi"); 2046var compilation = CompileAndVerify(source); 2080var compilation = CompileAndVerify(source); 2118var compilation = CompileAndVerify(source, expectedOutput: "S"); 2148var compilation = CompileAndVerify(source, expectedOutput: "2"); 2176var compilation = CompileAndVerify(source, expectedOutput: "S"); 2212var compilation = CompileAndVerify(source, expectedOutput: "T2"); 2249var compilation = CompileAndVerify(source, expectedOutput: "C<int>.S;C<string>.S;C<string>.T2"); 2280var compilation = CompileAndVerify(source, expectedOutput: "p, q"); 2340var compilation = CompileAndVerify(source); 2390var compilation = CompileAndVerify(source); 2999var compilation = CompileAndVerify(source, expectedOutput: "1System.Reflection.Missing"); 3026var compilation = CompileAndVerify(source, expectedOutput: "2147483647"); 3063var compilation = CompileAndVerify(source, expectedOutput: "42"); 3104var compilation = CompileAndVerify(source, expectedOutput: "0427"); 3158var compilation = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: "0427"); 3212var compilation = CompileAndVerify(source, expectedOutput: "042"); 3263var compilation = CompileAndVerify(source, expectedOutput: "123123123123123"); 3328var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: "222333"); 3382var compilation = CompileAndVerify(source, expectedOutput: "222333"); 3475var compilation = CompileAndVerify(source, expectedOutput: "03450"); 3559var compilation = CompileAndVerify(source, expectedOutput: "03450"); 3649var compilation = CompileAndVerify(source, expectedOutput: @" 3830var compilation = CompileAndVerify(source, expectedOutput: "hihi4242123123"); 3949var compilation = CompileAndVerify(source, expectedOutput: "D+BooSystem.Int32123"); 4037var compilation = CompileAndVerify(source, expectedOutput: "B ctor-D ctor"); 4104var compilation = CompileAndVerify(source, expectedOutput: @" 4207var compilation = CompileAndVerify(source, expectedOutput: @" 4265var compilation = CompileAndVerify(source, expectedOutput: @"abcdef"); 4308var verifier = CompileAndVerify(@" 4528var compilation = CompileAndVerify(source, expectedOutput: @"123"); 4584var compilation = CompileAndVerify(source, expectedOutput: @"0123401234"); 4692var compilation = CompileAndVerify(source, expectedOutput: @" 4734var compilation = CompileAndVerify(source, expectedOutput: @"012344321"); 4777var compilation = CompileAndVerify(source, expectedOutput: @"-100-11-1"); 4844var compilation = CompileAndVerify(source, expectedOutput: @"2 8 16 24 576 288"); 4929var compilation = CompileAndVerify(source, expectedOutput: @"True False True True"); 4996var compilation = CompileAndVerify(source, expectedOutput: @"-25 4294967295 1073741823"); 5062var compilation = CompileAndVerify(source, expectedOutput: @" 5115var compilation = CompileAndVerify(source, expectedOutput: @"PASS", verify: Verification.Passes); 5176var compilation = CompileAndVerify(source, expectedOutput: @"hi", verify: Verification.Fails); 5268var compilation = CompileAndVerify(source, expectedOutput: @"hihi", verify: Verification.Fails); 5325var compilation = CompileAndVerify(source, expectedOutput: @" 5516var compilation = CompileAndVerify(source, expectedOutput: @"42123"); 5555var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5596var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5699var v = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"1"); 5803var compilation = CompileAndVerify(source, expectedOutput: @"1"); 5856var compilation = CompileAndVerify(source, expectedOutput: @"True"); 5916var compilation = CompileAndVerify(source, expectedOutput: @"TrueTrueTrueTrueTrue"); 5976var compilation = CompileAndVerify(source, expectedOutput: @"12"); 6013var compilation = CompileAndVerify(source, expectedOutput: @"onetwo"); 6071var compilation = CompileAndVerify(source, expectedOutput: @"23"); 6117var compilation = CompileAndVerify(source, expectedOutput: @"onetwo"); 6156var compilation = CompileAndVerify(source, expectedOutput: @"A#A##"); 6209var compilation = CompileAndVerify(source, expectedOutput: @"12"); 6250var compilation = CompileAndVerify(source, expectedOutput: @"CurrentCultureIgnoreCaseInvariantCulture"); 6289var compilation = CompileAndVerify(source, expectedOutput: @"12"); 6380var compilation = CompileAndVerify(source, expectedOutput: @"BCDE2442"); 6453var compilation = CompileAndVerify(source, expectedOutput: @"hi"); 6590var compilation = CompileAndVerify(source, expectedOutput: @"hi"); 6683var compilation = CompileAndVerifyWithMscorlib40(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @" 6799var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"3-5"); 6861var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"30"); 6933var compilation = CompileAndVerifyWithMscorlib40(source, expectedOutput: @" 7016var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 7072var compilation = CompileAndVerify(source, expectedOutput: @"0"); 7128var compilation = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: @"0"); 7178var compilation = CompileAndVerify(source, expectedOutput: @"123"); 7217var compilation = CompileAndVerify(source); 7255var compilation = CompileAndVerify(source); 7296var compilation = CompileAndVerify(source); 7334var compilation = CompileAndVerify(source, expectedOutput: @""); 7372var compilation = CompileAndVerify(source, expectedOutput: @"123"); 7412var compilation = CompileAndVerify(source, expectedOutput: @"Program+Shade 7497var compilation = CompileAndVerify(source, expectedOutput: @"2"); 7599var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @" 7698var compilation = CompileAndVerify(source, expectedOutput: "True6False"); 7749var compilation = CompileAndVerify(source, expectedOutput: "6"); 7809var compilation = CompileAndVerify(source, expectedOutput: @" 7882var compilation = CompileAndVerify(source, options: TestOptions.DebugExe.WithModuleName("MODULE")); 7978var compilation = CompileAndVerify(source, expectedOutput: "Hello"); 8039var compilation = CompileAndVerify(source, expectedOutput: @"224"); 8113var compilation = CompileAndVerify(source, expectedOutput: @"result=One,Two"); 8192var compilation = CompileAndVerify(source, expectedOutput: @"6"); 8397var compilation = CompileAndVerify(source, expectedOutput: @" 8511var compilation = CompileAndVerify(source, expectedOutput: @"first 8557var compilation = CompileAndVerify(source, expectedOutput: @"1 8631var compilation = CompileAndVerify(source, expectedOutput: @"2 8702var compilation = CompileAndVerify(source, expectedOutput: @"2 8748var compilation = CompileAndVerify(source, expectedOutput: @"2 8789var compilation = CompileAndVerify(source, expectedOutput: @"2 8868var compilation = CompileAndVerify(source, expectedOutput: @"2 8942var compilation = CompileAndVerify(source, expectedOutput: @"2 9011var compilation = CompileAndVerify(source, options: TestOptions.ReleaseDebugExe, expectedOutput: @"2 9083var compilation = CompileAndVerify(source, expectedOutput: @"1"); 9128var compilation = CompileAndVerify(source, expectedOutput: @"42"); 9175var compilation = CompileAndVerify(source, expectedOutput: @"42", options: TestOptions.ReleaseDebugExe); 9225var compilation = CompileAndVerify(source, expectedOutput: @"42"); 9551var compilation = CompileAndVerify(source, expectedOutput: @"M() Called!M() Called!"); 9600var compilation = CompileAndVerify(source, expectedOutput: @"123"); 9672var compilation = CompileAndVerify(source, expectedOutput: @"12"); 9791var compilation = CompileAndVerify(source, expectedOutput: @"6"); 9888var compilation = CompileAndVerify(source, expectedOutput: "0"). 10020var compilation = CompileAndVerify(source, expectedOutput: @"1"); 10050var comp = CompileAndVerify(source, expectedOutput: @"False"); 10573var compilation = CompileAndVerify(source); 10718var compilation = CompileAndVerify(source, expectedOutput: 10733var compilation = CompileAndVerify(source, expectedOutput: 11120var compilation = CompileAndVerify(source, expectedOutput: "101"); 11155var compilation = CompileAndVerify(source, expectedOutput: "99.9"); 11189var compilation = CompileAndVerify(source); 11212var compilation = CompileAndVerify(source, expectedOutput: "11"); 11245var compilation = CompileAndVerify(source, expectedOutput: @" 11278var compilation = CompileAndVerify(source, expectedOutput: @" 11310var compilation = CompileAndVerify(source, expectedOutput: @" 11329var compilation = CompileAndVerify(source, expectedOutput: "79228162514264337593543950335"); 11358var compilation = CompileAndVerify(source, expectedOutput: "79228162514264337593543950334-1"); 11413var compilation = CompileAndVerify(source, expectedOutput: @" 11480var compilation = CompileAndVerify(source, expectedOutput: @" 11552var compilation = CompileAndVerify(source, expectedOutput: @" 11672var compilation = CompileAndVerify(source, expectedOutput: @" 11882var compilation = CompileAndVerify(source, expectedOutput: @"bye"); 11937var compilation = CompileAndVerify(source, expectedOutput: @"0"); 12000var compilation = CompileAndVerify(source, expectedOutput: @"1A"); 12032var compilation = CompileAndVerify(source, expectedOutput: @"1A"); 12073var compilation = CompileAndVerify(source, expectedOutput: "null;null;C1;"); 12104var compilation = CompileAndVerify(source, expectedOutput: @"1A"); 12133var compilation = CompileAndVerify(source, expectedOutput: @"00"); 12169var compilation = CompileAndVerify(source, expectedOutput: @"0"); 12198var compilation = CompileAndVerify(source, expectedOutput: @"0"); 12286var comp = CompileAndVerify(source, expectedOutput: @"42", parseOptions: TestOptions.Regular7_2, verify: Verification.FailsPEVerify); 12440var comp = CompileAndVerify(source, expectedOutput: @"-10", verify: Verification.FailsPEVerify); 12512var compilation = CompileAndVerify(source, expectedOutput: @"123"); 12570var compilation = CompileAndVerify(source, expectedOutput: @""); 12624var compilation = CompileAndVerify(source, expectedOutput: @"notequal1 12753var compilation = CompileAndVerify(source, expectedOutput: @"True 12990var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 13027var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 13206var compilation = CompileAndVerify(source, expectedOutput: expectedOutput); 13330var compilation = CompileAndVerify( 13393var compilation = CompileAndVerifyWithMscorlib40(code, expectedOutput: "4"); 13418var comp = CompileAndVerify(code, expectedOutput: "5", options: TestOptions.DebugExe); 13640var v = CompileAndVerify(comp); 13945var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"False 14968var compilation = CompileAndVerify(source, expectedOutput: @"42 15023var compilation = CompileAndVerify(source, expectedOutput: @"42"); 15072var compilation = CompileAndVerify(source, expectedOutput: @"42"); 15118var compilation = CompileAndVerify(source, references: new[] { testReference }); 15160var compilation = CompileAndVerify(source, expectedOutput: "2"); 15214var compilation = CompileAndVerify(source, expectedOutput: "True"); 15260var compilation = CompileAndVerify(source, expectedOutput: "hi"); 15307var compilation = CompileAndVerify(source, expectedOutput: "o"); 15360var compilation = CompileAndVerify(source, expectedOutput: "hi"); 15445var compilation = CompileAndVerify(source, expectedOutput: ""); 15542var compilation = CompileAndVerifyWithMscorlib40(source, new[] { SystemCoreRef, CSharpRef }, expectedOutput: "2"); 15611var compilation = CompileAndVerifyWithMscorlib40(source, new[] { SystemCoreRef, CSharpRef }, expectedOutput: "2"); 15724var compilation = CompileAndVerifyWithMscorlib40(source, new[] { SystemCoreRef, CSharpRef }, expectedOutput: "long.ex caught"); 16049var compilation = CompileAndVerify(source, expectedOutput: @" 16192var compilation = CompileAndVerify(source); 16731var verifier = CompileAndVerify(source, expectedOutput: "B"); 16770var verifier = CompileAndVerify(source, expectedOutput: "AB"); 16816var verifier = CompileAndVerify(source, expectedOutput: "3"); 16860var verifier = CompileAndVerify(source, expectedOutput: "Object[]AString[]B"); 16910var verifier = CompileAndVerify(source, expectedOutput: "2"); 17176var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Skipped, expectedOutput: @"");
CodeGen\CodeGenThrowTests.cs (10)
27var compilation = CompileAndVerifyException<Exception>(source, "TestThrowNewExpression"); 51var compilation = CompileAndVerifyException<Exception>(source, "TestThrowLocalExpression"); 74var compilation = CompileAndVerifyException<NullReferenceException>(source); 103var compilation = CompileAndVerify(source); 140var compilation = CompileAndVerify(source); 168var compilation = CompileAndVerify(source); 205var compilation = CompileAndVerify(source); 233var compilation = CompileAndVerify(source); 340var compilation = CompileAndVerify(source); 365var compilation = CompileAndVerify(source);
CodeGen\CodeGenTryFinally.cs (41)
45var compilation = CompileAndVerify(source); 117var compilation = CompileAndVerify(source); 200var compilation = CompileAndVerify(source, expectedOutput: "1, 3, 4, 1, 2, 3, "); 260var compilation = CompileAndVerify(source, expectedOutput: "before, catch, before, after,"); 318var compilation = CompileAndVerify(source, expectedOutput: ""); 386var compilation = CompileAndVerify(source, expectedOutput: ""); 461var compilation = CompileAndVerify(source, expectedOutput: "hellobyebye"); 546var compilation = CompileAndVerify(source); 633var compilation = CompileAndVerify(source); 700var compilation = CompileAndVerify(source); 764var compilation = CompileAndVerify(source); 900var compilation = CompileAndVerify(source, expectedOutput: ""); 979var compilation = CompileAndVerify(source, expectedOutput: 1071var compilation = CompileAndVerify(source, expectedOutput: @" 1160var compilation = CompileAndVerify(source, expectedOutput: @" 1267var compilation = CompileAndVerify(source, expectedOutput: @" 1386var compilation = CompileAndVerify(source, expectedOutput: @" 1523var compilation = CompileAndVerify(source, expectedOutput: @" 1656var compilation = CompileAndVerify(source, expectedOutput: @" 1790var compilation = CompileAndVerify(source, expectedOutput: @" 1916var compilation = CompileAndVerify(source); 2082var compilation = CompileAndVerify(source); 2289var comp = CompileAndVerify(src, 2495var comp = CompileAndVerify(src, expectedOutput: "TryCatchS1Finally"); 2572var comp = CompileAndVerify(src); 2610var comp = CompileAndVerify(src); 2648var comp = CompileAndVerify(src); 2715var comp = CompileAndVerify(src, expectedOutput: "ExceptionFilter"); 2797var comp = CompileAndVerify(src, expectedOutput: "FinallyOuterCatch"); 2870var compilation = CompileAndVerify(source, expectedOutput: "M(0)=-4, M(1)=11, M(2)=6"); 2955var compilation = CompileAndVerify(source); 3027var compilation = CompileAndVerify(source, expectedOutput: 3150var compilation = CompileAndVerify(source, expectedOutput: ""); 3211var compilation = CompileAndVerify(source, expectedOutput: "0"); 3265var compilation = CompileAndVerify(source, expectedOutput: "hello"); 3320var compilation = CompileAndVerify(source, expectedOutput: "0"); 3392var compilation = CompileAndVerify(source, expectedOutput: "0"); 3475var compilation = CompileAndVerify(source, expectedOutput: "0"); 3551var compilation = CompileAndVerify(source, expectedOutput: @"2 3628var compilation = CompileAndVerify(source, expectedOutput: @"2 3681var compilation = CompileAndVerify(source, expectedOutput: @"");
CodeGen\CodeGenTupleEqualityTests.cs (30)
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"); 590var comp = CompileAndVerify(source, expectedOutput: "True"); 650var comp = CompileAndVerify(source, expectedOutput: "1 == 1, 2 == 2, True"); 682var comp = CompileAndVerify(source, expectedOutput: "2 == 2, 2 == 2, True"); 697var comp = CompileAndVerify(source); 728var comp = CompileAndVerify(source); 3294var verifier = CompileAndVerify(comp, expectedOutput: "True False False True False"); 3379var verifier = CompileAndVerify(comp, expectedOutput: "True"); 3414var verifier = CompileAndVerify(comp, expectedOutput: "True"); 3449var verifier = CompileAndVerify(comp, expectedOutput: "True"); 3665var verifier = CompileAndVerify(comp, expectedOutput: "True"); 3700var verifier = CompileAndVerify(comp, expectedOutput: "False True True False True"); 3824var verifier = CompileAndVerify(comp, expectedOutput: "True False False True False"); 3927var verifier = CompileAndVerify(comp, expectedOutput: "True False False Convert4 Convert4 True Convert5 False Convert6 Convert20 False "); 4021var verifier = CompileAndVerify(comp, expectedOutput: "FalseTrueFalse"); 4099var verifier = CompileAndVerify(comp, expectedOutput: "False False Convert1 True Convert1 True Convert10 False Convert10 False"); 4140var verifier = CompileAndVerify(comp, expectedOutput: "FalseTrueFalse"); 4356var verifier = CompileAndVerify(comp, expectedOutput: "TrueFalse"); 4404var verifier = CompileAndVerify(comp, expectedOutput: "True"); 5608var comp = CompileAndVerify(source, expectedOutput: "True"); 5627var comp = CompileAndVerify(source, expectedOutput: "False"); 5655var comp = CompileAndVerify(source, expectedOutput: "True"); 5683var comp = CompileAndVerify(source, expectedOutput: "True");
CodeGen\CodeGenTupleTest.cs (181)
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, 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); 3434var comp = CompileAndVerify(source, 3468var verifier = CompileAndVerifyWithMscorlib40(source, expectedOutput: @"1 2 3 4 5 6 7 Alice 2 3 4 5 6 7 Bob 2 3", references: new[] { ValueTupleRef, SystemRuntimeFacadeRef }, sourceSymbolValidator: validator); 3486var comp = CompileAndVerify(source, 3505var comp = CompileAndVerify(source, 3525var comp = CompileAndVerify(source, 3606var comp = CompileAndVerify(source, 3647var verifier = CompileAndVerify(source, expectedOutput: @"1 2 3 4 5 6 7 Alice 2 3 4 5 6 7 Bob 2 3", sourceSymbolValidator: validator); 3704var verifier = CompileAndVerify(source, sourceSymbolValidator: validator); 3940var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4024var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4045var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4079var verifier7_1 = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1), 4125var verifier = CompileAndVerify(source, expectedOutput: @"1 4 7 Alice 7 Bob 3"); 4155var verifier = CompileAndVerify(source, expectedOutput: @"Alice 1", sourceSymbolValidator: validator); 4177var comp = CompileAndVerify(source, 4224var comp = CompileAndVerify(source, 4273var v = CompileAndVerify(comp, expectedOutput: @" 4421var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: @"1 1 2 2 3 3 4 4 5 5 6 6 True", references: new[] { new CSharpCompilationReference(comp1), new CSharpCompilationReference(comp2) }); 4738var comp = CompileAndVerify(source, expectedOutput: @"5 3"); 4767var comp = CompileAndVerify(source, expectedOutput: @"1 7 8"); 4796var comp = CompileAndVerify(source, expectedOutput: @"5 3"); 4870var comp = CompileAndVerify(source, expectedOutput: @"5 3"); 4905var comp = CompileAndVerify(source, expectedOutput: @"CB CA CC"); 5235var comp = CompileAndVerify(source, 5291var comp = CompileAndVerify(source, 5317var comp = CompileAndVerify(source, 5344var comp = CompileAndVerify(source, 5369var comp = CompileAndVerify(source, 5392var comp = CompileAndVerify(source, 5585var comp = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 5645var comp = CompileAndVerify(source, expectedOutput: "Item1: 2 Rest: (2, 2)", references: new[] { CSharpRef }); 5667var comp = CompileAndVerify(source, expectedOutput: "a:1, h:8, i:9, Item9:9, Rest:(8, 9)", references: new[] { CSharpRef }); 5691var comp = CompileAndVerify(source, expectedOutput: "done", references: new[] { CSharpRef }); 5726var comp = CompileAndVerify(source, expectedOutput: expectedOutput, references: new[] { CSharpRef }); 5777var comp = CompileAndVerify(source, expectedOutput: "12345678901234567890123456789012345"); 6990var comp = CompileAndVerify(source, expectedOutput: @" 7683var comp = CompileAndVerify(source, 7762var comp = CompileAndVerify(source, 7801var comp = CompileAndVerify(source, 7834var comp = CompileAndVerify(source, 7873var comp = CompileAndVerify(source, expectedOutput: @" 7907var comp = CompileAndVerify(source, 7939var comp = CompileAndVerify(source, expectedOutput: 7981var comp = CompileAndVerify(source, expectedOutput: @" 9403var comp = CompileAndVerify(source, 9442var comp = CompileAndVerify(source, 9479var comp = CompileAndVerify(source, 9516var comp = CompileAndVerify(source, 9550var comp = CompileAndVerify(source, 9588var comp = CompileAndVerify(source, 9624var comp = CompileAndVerify(source, expectedOutput: @" 9659var comp = CompileAndVerify(source, 9703var comp = CompileAndVerify(source, expectedOutput: @" 9754var comp = CompileAndVerify(source, expectedOutput: @" 9787var comp = CompileAndVerify(source, expectedOutput: @" 10169var comp = CompileAndVerify(source, 10206var comp = CompileAndVerify(source, 10305var comp = CompileAndVerify(source, 10338var comp = CompileAndVerify(source, 10798var comp = CompileAndVerify(source, 10831var comp = CompileAndVerify(source, 10861var comp = CompileAndVerify(source, 10891var comp = CompileAndVerify(source, 11015var comp = CompileAndVerify(source, 11349var comp = CompileAndVerify(source, 11729var comp = CompileAndVerify(source, 11868var comp = CompileAndVerify(source, 12145var comp = CompileAndVerify(source, 12680var comp = CompileAndVerify(source, expectedOutput: @"1 13966var comp = CompileAndVerify(source, 14212var comp = CompileAndVerify(source, 15098var comp = CompileAndVerify(source, 15162var comp = CompileAndVerify(source, 15716var comp = CompileAndVerify(source, 15788var comp = CompileAndVerify(source, 16003var comp = CompileAndVerify(source, expectedOutput: 16648var comp = CompileAndVerify(source, 16667var comp = CompileAndVerify(source, 16693var comp = CompileAndVerify(source, expectedOutput: "(1, Alice, 2, Brenda, 3, Chloe, 4, Dylan)"); 16715var comp = CompileAndVerify(source, expectedOutput: "1 1 (8) 8 8"); 17486var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "(1, 2)", references: new[] { tupleComp.ToMetadataReference() }); 17531var comp = CompileAndVerify(source, expectedOutput: @" 17580var comp = CompileAndVerify(source, expectedOutput: @" 17620var comp = CompileAndVerify(source, 17709var comp = CompileAndVerify(source, 17798var comp = CompileAndVerify(source, 17838var comp = CompileAndVerify(source, 17898var comp = CompileAndVerify(source, 18026var comp = CompileAndVerify(source, 18084var comp = CompileAndVerify(source, 18293var comp = CompileAndVerify(source, expectedOutput: @" 18325var comp = CompileAndVerify(source, expectedOutput: @" 18349var comp = CompileAndVerify(source, expectedOutput: @" 18419var comp = CompileAndVerify(source, expectedOutput: @" 18489var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular, expectedOutput: @" 18604var comp = CompileAndVerify(source, expectedOutput: @" 18712var comp = CompileAndVerify(source, 18745var comp = CompileAndVerify(source, 18783var comp = CompileAndVerify(source, 19345var verifier = CompileAndVerify(comp, expectedOutput: "(42, 43)"); 21453var comp = CompileAndVerify(source, 21480var comp = CompileAndVerify(source, 21504var comp = CompileAndVerify(source, 21546var comp = CompileAndVerify(source, 21588var comp = CompileAndVerify(source, 21630var comp = CompileAndVerify(source, 21672var comp = CompileAndVerify(source, 21707var comp = CompileAndVerify(source, 21752var comp = CompileAndVerify(source, 21790var comp = CompileAndVerify(source, 22173var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Mscorlib46, expectedOutput: @"5", options: TestOptions.ReleaseExe); 23329var comp = CompileAndVerify(source); 23367var comp = CompileAndVerify(source, 23478var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libComp.ToMetadataReference() }, options: TestOptions.DebugExe, verify: Verification.Fails); 23534var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "42qq", references: s_valueTupleRefs.Concat(new[] { libCompRef }).ToArray(), options: TestOptions.DebugExe, verify: Verification.Fails); 23576var comp = CompileAndVerify(source, 23616var comp = CompileAndVerify(source, 23660var comp = CompileAndVerify(source, 23695var comp = CompileAndVerify(source, 23726var comp = CompileAndVerify(source, 23772var comp = CompileAndVerify(source, 23933var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libCompRef }, options: TestOptions.DebugExe, verify: Verification.Passes); 23995var comp = CompileAndVerify(source, 25162var comp = CompileAndVerify(source, 25196var comp = CompileAndVerify(source, 25587var verifier = CompileAndVerify(comp, expectedOutput: @"(-1, 255)(-1, 255)overflow"); 25654var comp = CompileAndVerify(source, 25979var comp = CompileAndVerify(source, expectedOutput: "24"); 25998var comp = CompileAndVerify(source, expectedOutput: "4"); 26022var comp = CompileAndVerify(source, 26047var comp = CompileAndVerify(source, 26073var comp = CompileAndVerify(source, 26099var comp = CompileAndVerify(source, 26122var comp = CompileAndVerify(source, 26143var comp = CompileAndVerify(source, 26190var comp = CompileAndVerify(source, 26212var comp = CompileAndVerify(source, expectedOutput: "3"); 27375var verifier = CompileAndVerify(comp1, verify: Verification.Skipped); // unsafe code 27693var verifier = CompileAndVerify(comp, expectedOutput: @"Done."); 27989var verifier = CompileAndVerify(comp, symbolValidator: verifyModule, sourceSymbolValidator: verifyModule); 28065var verifier = CompileAndVerify(comp, symbolValidator: verifyModule, sourceSymbolValidator: verifyModule); 28428var verifier = CompileAndVerify(comp, symbolValidator: verifyModule, sourceSymbolValidator: verifyModule); 28523var verifier = CompileAndVerify(comp, symbolValidator: verifyModule, sourceSymbolValidator: verifyModule); 28996var comp = CompileAndVerify($@" 29134var verifier = CompileAndVerify(source + trivial2uple, expectedOutput: 29217var verifier = CompileAndVerify(source, options: TestOptions.ReleaseDll); 29267var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 29390var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 29495var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 29611var verifier = CompileAndVerify(source, expectedOutput: "(2, 3, 1)"); 29704var verifier = CompileAndVerify(source, expectedOutput: "(2, 3, 4, 5, 6, 7, 8, 9, 1)"); 29784var verifier = CompileAndVerify(source, expectedOutput: """
CodeGen\CodeGenTypeofTests.cs (11)
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: @"
CodeGen\CodeGenUsingStatementTests.cs (20)
70var verifier = CompileAndVerify(text, expectedOutput: @"Before 107var verifier = CompileAndVerify(text, expectedOutput: @"Before 143var verifier = CompileAndVerify(text, expectedOutput: @"Before 197var verifier = CompileAndVerify(text, expectedOutput: @"Before 273var verifier = CompileAndVerify(text, expectedOutput: expected); 329var verifier = CompileAndVerify(text, expectedOutput: @"Creating A 381var verifier = CompileAndVerify(text, expectedOutput: @"Before 418var verifier = CompileAndVerify(text, expectedOutput: @"Before 454var verifier = CompileAndVerify(text, expectedOutput: @"Before 508var verifier = CompileAndVerify(text, expectedOutput: @"Before 584var verifier = CompileAndVerify(text, expectedOutput: expected); 640var verifier = CompileAndVerify(text, expectedOutput: @"Creating A 692var verifier = CompileAndVerify(text, expectedOutput: @"Before 780var verifier = CompileAndVerify(text, expectedOutput: @"Before 866var verifier = CompileAndVerify(text, expectedOutput: @"Before 938var verifier = CompileAndVerify(text, expectedOutput: @"Before 2040var comp = CompileAndVerify(source, expectedOutput: @"InUsing"); 2096var comp = CompileAndVerify(source, expectedOutput: ""); 2164var comp = CompileAndVerify(source, expectedOutput: expected); 2829var comp = CompileAndVerify(source, expectedOutput: @"");
CodeGen\DestructorTests.cs (8)
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);
CodeGen\EventTests.cs (8)
36var compVerifier = CompileAndVerify(text, 70var compVerifier = CompileAndVerify(text, 100var compVerifier = CompileAndVerify(text, 163var compVerifier = CompileAndVerify(text, 434var compVerifier = CompileAndVerify(text, 711var verifier = CompileAndVerify(compilation, 783var verifier = CompileAndVerify(compilation, 843var verifier = CompileAndVerify(compilation);
CodeGen\FixedSizeBufferTests.cs (3)
26var verifier = CompileAndVerify(@" 1079var verifier = CompileAndVerify(@" 1108var verifier = CompileAndVerify(@"
CodeGen\ForLoopsTests.cs (18)
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"); 726var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 907var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 961var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 1265var c = CompileAndVerify(source, options: TestOptions.ReleaseDll); 1621var comp = CompileAndVerify(text, expectedOutput: @"1 1657var comp = CompileAndVerify(text, expectedOutput: @"1 1706var comp = CompileAndVerify(text, expectedOutput: @"1 1813var comp = CompileAndVerify(text, expectedOutput: @"1 1836var comp = CompileAndVerify(text, expectedOutput: @"1 1863var comp = CompileAndVerify(text, expectedOutput: @"-1 1916var c = CompileAndVerify(text, options: TestOptions.DebugExe);
CodeGen\GotoTest.cs (5)
222var c = CompileAndVerify(text); 318var c = CompileAndVerify(text); 359var c = CompileAndVerify(text); 393var c = CompileAndVerify(text, expectedOutput: @"a 503var c = CompileAndVerify(source, options: TestOptions.ReleaseDll);
CodeGen\IndexAndRangeTests.cs (27)
20private CompilationVerifier CompileAndVerifyWithIndexAndRange(string s, string expectedOutput = null) 126var verifier = CompileAndVerifyWithIndexAndRange(src); 191var verifier = CompileAndVerify(comp, expectedOutput: @"0 281var verifier = CompileAndVerify(comp, expectedOutput: @"0 413var verifier = CompileAndVerify(comp, expectedOutput: @"0 510var verifier = CompileAndVerify(comp, expectedOutput: @" 677var verifier = CompileAndVerify(comp, expectedOutput: @" 830var verifier = CompileAndVerify(comp, expectedOutput: @" 952var verifier = CompileAndVerify(comp, expectedOutput: @"0 1025var verifier = CompileAndVerify(comp, expectedOutput: @"5 1099var verifier = CompileAndVerify(comp, expectedOutput: @"f 1184var verifier = CompileAndVerify(comp, expectedOutput: @"5 1276var verifier = CompileAndVerifyWithIndexAndRange(src, expectedOutput: @" 1298var verifier = CompileAndVerifyWithIndexAndRange(src, expectedOutput: @"5 1356var verifier = CompileAndVerifyWithIndexAndRange(src, @" 1447var verifier = CompileAndVerifyWithIndexAndRange(src, @" 1473var verifier = CompileAndVerifyWithIndexAndRange(@" 1628var verifier = CompileAndVerifyWithIndexAndRange(@" 1753var verifier = CompileAndVerifyWithIndexAndRange(@" 1779var verifier = CompileAndVerifyWithIndexAndRange(@" 1823var verifier = CompileAndVerify(comp); 1900var verifier = CompileAndVerify(comp, expectedOutput: @"2 1965var verifier = CompileAndVerifyWithIndexAndRange(@" 2048var verifier = CompileAndVerifyWithIndexAndRange(@" 2100var verifier = CompileAndVerify(comp, verify: Verification.Passes, expectedOutput: @"3 3826var verifier = CompileAndVerifyWithIndexAndRange(src, expectedOutput: "1").VerifyDiagnostics(); 3878var verifier = CompileAndVerifyWithIndexAndRange(src, expectedOutput: "1").VerifyDiagnostics();
CodeGen\IndexerTests.cs (16)
31var compVerifier = CompileAndVerify(text, 50var compVerifier = CompileAndVerify(text, 68var compVerifier = CompileAndVerify(text, 86var compVerifier = CompileAndVerify(text, 105var compVerifier = CompileAndVerify(text, 124var compVerifier = CompileAndVerify(text, 170var compVerifier = CompileAndVerify(text, symbolValidator: validator, expectedSignatures: new[] 192var compVerifier = CompileAndVerify(text, 216var compVerifier = CompileAndVerify(text, 240var compVerifier = CompileAndVerify(text, 422var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 570var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 674var compVerifier = CompileAndVerify(text, expectedOutput: @" 718var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 943var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE")); 1109var verifier = CompileAndVerify(text, expectedOutput: @"2");
CodeGen\ITuplePatternTests.cs (3)
56var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 140var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 229var verifier = CompileAndVerify(CreatePatternCompilation(source, TestOptions.DebugDll));
CodeGen\ObjectAndCollectionInitializerTests.cs (38)
37var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 78var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 133var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 190var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 243var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 288var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 327var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 370var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 433var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 516var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 584var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 667var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 755var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 812var compVerifier = CompileAndVerify(source, expectedOutput: ""); 850var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 893var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 950var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1042var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1152var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1255var compVerifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: expectedOutput); 1348var compVerifier = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 1486var compVerifier = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 1699var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 1814var compVerifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: expectedOutput); 1870var compVerifier = CompileAndVerify(source, references: new[] { CSharpRef }, expectedOutput: expectedOutput); 1926var compVerifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: expectedOutput); 2223var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2281var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2363var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2467var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2553var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2650var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2735var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2828var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 2941var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3036var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3129var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput); 3251var compVerifier = CompileAndVerify(source, expectedOutput: expectedOutput);
CodeGen\PatternTests.cs (87)
238var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 335var compVerifier = CompileAndVerify(compilation); 408var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 505var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 637var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 773var compVerifier = CompileAndVerify(compilation); 834var compVerifier = CompileAndVerify(compilation); 859var compVerifier = CompileAndVerify(compilation); 895var compVerifier = CompileAndVerify(compilation); 934var compVerifier = CompileAndVerify(compilation); 970var compVerifier = CompileAndVerify(compilation); 1010var compVerifier = CompileAndVerify(compilation); 1057var compVerifier = CompileAndVerify(compilation); 1108var compVerifier = CompileAndVerify(compilation); 1143var compVerifier = CompileAndVerify(compilation); 1181var compVerifier = CompileAndVerify(compilation); 1225var compVerifier = CompileAndVerify(compilation); 1284var compVerifier = CompileAndVerify(compilation); 1341var compVerifier = CompileAndVerify(compilation); 1401var compVerifier = CompileAndVerify(compilation); 1473var compVerifier = CompileAndVerify(compilation); 1537var compVerifier = CompileAndVerify(compilation); 1600var compVerifier = CompileAndVerify(compilation); 1659var compVerifier = CompileAndVerify(compilation); 1714var compVerifier = CompileAndVerify(compilation); 1775var compVerifier = CompileAndVerify(compilation); 1842var compVerifier = CompileAndVerify(compilation); 1906var compVerifier = CompileAndVerify(compilation); 1978var compVerifier = CompileAndVerify(compilation); 2040var compVerifier = CompileAndVerify(compilation); 2103var verifier = CompileAndVerify(source); 2175var compVerifier = CompileAndVerify(compilation); 2269var compVerifier = CompileAndVerify(compilation); 2406var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2540var compVerifier = CompileAndVerify(compilation); 2616var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2651var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2670var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2729var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2795var compVerifier = CompileAndVerify(compilation); 2841var compVerifier = CompileAndVerify(compilation, expectedOutput: "TrueFalse"); 2908var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3003var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3060var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3101var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3135var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3240var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3268var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3298var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3387var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3473var v = CompileAndVerify(source, options: TestOptions.DebugExe); 3553var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3635var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3707var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3783var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4060var compVerifier = CompileAndVerify(compilation, expectedOutput: "TrueFalse"); 4096var compVerifier = CompileAndVerify(compilation, expectedOutput: "TrueFalse"); 4123var compVerifier = CompileAndVerify(compilation); 4175var compVerifier = CompileAndVerify(compilation); 4215var compVerifier = CompileAndVerify(compilation); 4250var compVerifier = CompileAndVerify(compilation); 4340var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4519var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4556var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4590var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4622var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 4679var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 4725var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Skipped, expectedOutput: 4785var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4818var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4892var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4928var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4965var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 5467var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5519var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5619var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5727var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5891var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 6037var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 6206var verifier = CompileAndVerify(source, expectedOutput: "012323", options: TestOptions.DebugExe); 6291var verifier = CompileAndVerify(source, expectedOutput: " 0 1 2 3 2 3", options: TestOptions.DebugExe); 6380var verifier = CompileAndVerify(source, expectedOutput: "0123452345", options: TestOptions.DebugExe); 6476var verifier = CompileAndVerify(source, expectedOutput: "0123233", options: TestOptions.DebugExe, parseOptions: TestOptions.RegularPreview); 6561var verifier = CompileAndVerify(source, options: TestOptions.DebugDll); 6661var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "012"); 6756var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: """ 6863var verifier = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: "System.ActionSystem.Action");
CodeGen\PropertyTests.cs (1)
31var verifier = CompileAndVerify(compilation);
CodeGen\SwitchTests.cs (88)
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"); 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"), 3348var compVerifier = CompileAndVerify(text, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), 4032var compVerifier = CompileAndVerify(text, expectedOutput: "1", parseOptions: TestOptions.RegularPreview.WithDisableLengthBasedSwitch()); 4040private static void VerifySynthesizedStringHashMethod(CompilationVerifier compVerifier, bool expected) 4125var verifier = CompileAndVerify(source, expectedOutput: @"0"); 4519var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 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, 8862var compVerifier = CompileAndVerify(source, 8938var compVerifier = CompileAndVerify(source, 9002var compVerifier = CompileAndVerify(source, 9076var compVerifier = CompileAndVerify(source, 9149var compVerifier = CompileAndVerify(source, 9224var compVerifier = CompileAndVerify(source, 9299var compVerifier = CompileAndVerify(source, 9368var compVerifier = CompileAndVerify(source, 9449var compVerifier = CompileAndVerify(source, 9580var compVerifier = CompileAndVerify(source, 9722var compVerifier = CompileAndVerify(source, 9773var compVerifier = CompileAndVerify(source, 9828var compVerifier = CompileAndVerify(source, 9885var compVerifier = CompileAndVerify(compilation, 9937var compVerifier = CompileAndVerify(compilation, 10029var compVerifier = CompileAndVerify(compilation, 10121var compVerifier = CompileAndVerify(compilation, 10169var compVerifier = CompileAndVerify(source, 10522var compVerifier = CompileAndVerify(compilation, expectedOutput: "abc"); 10609var compVerifier = CompileAndVerify(compilation, expectedOutput: "Yep, all good!"); 10804var compVerifier = CompileAndVerify(compilation, expectedOutput: "123333456"); 11027var compVerifier = CompileAndVerify(source, 11285var compVerifier = CompileAndVerify(source, 11543var compVerifier = CompileAndVerify(source, 11972var compVerifier = CompileAndVerify(source,
CodeGen\UnsafeTests.cs (76)
32var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes); 59var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 89var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Passes); 114var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 161var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 208var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 242var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "123", verify: Verification.Fails); 279var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "456", verify: Verification.Fails); 307var compVerifierOptimized = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "2", verify: Verification.Fails); 326var compVerifierUnoptimized = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "2", verify: Verification.Fails); 370var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails); 422var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"Before: 2 7 469var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"ab", verify: Verification.Fails); 517var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 564var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 622var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 697var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 773var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 840var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 954var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1074var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1118var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @" 1147var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "210", verify: Verification.Fails); 1167var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @" 1208var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1266var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1324var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1394var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1456var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 1529var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1595var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"a", verify: Verification.Fails); 1640var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"a", verify: Verification.Fails); 1684var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"h", verify: Verification.Fails); 1741var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"hTrue", verify: Verification.Fails); 1826var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"hTrue", verify: Verification.Fails); 1897var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 1965var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2033var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2104var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"970104", verify: Verification.Fails); 4027var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4087var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4175var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"0", verify: Verification.Fails); 4226var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4288var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4519var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"20", verify: Verification.Fails); 4593var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4653var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4745var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2123 4834var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4894var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"23", verify: Verification.Fails); 4972var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 5400var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @""); 7207var comp = CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails); 9542var verifier = CompileAndVerify(@" 9586var verifier = CompileAndVerify(@" 9871var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 10017var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10351var c = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify with 10373var c = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify with 10474var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyDiagnostics(); 10527var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics(); 10638var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "hello", verify: Verification.Fails); 10707var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 10787var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 10839var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll.WithConcurrentBuild(false), verify: Verification.Passes); 10863var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll.WithConcurrentBuild(false), verify: Verification.FailsPEVerify); 10903var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 10949var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 10998var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11040var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F654320F", verify: Verification.Fails); 11083var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Passes); 11137var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 11210var v = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 11334var result = CompileAndVerify(compilation, expectedOutput: "5"); 11381var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.FailsPEVerify); 11413var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0");
CodeGen\WinMdDelegateTests.cs (2)
52var verifier = CompileAndVerify( 274var comp = CompileAndVerify(
Emit\CompilationEmitTests.cs (4)
1060var reference = CompilationVerifier.LoadTestEmittedExecutableForSymbolValidation(image, OutputKind.DynamicallyLinkedLibrary); 1142var reference = CompilationVerifier.LoadTestEmittedExecutableForSymbolValidation(image, OutputKind.DynamicallyLinkedLibrary); 1610var verifier = CompileAndVerify(comp); 1687var verifier = CompileAndVerify(comp);
Emit\DeterministicTests.cs (1)
437var cv = CompileAndVerify(source: new string[] { x1, x2, x3 }, expectedOutput: expectedOutput1);
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (45)
275CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 471CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 678CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput, options: TestOptions.ReleaseExe); 744CompilationVerifier verifier = CompileAndVerify(source, expectedOutput: checker.ExpectedOutput, options: TestOptions.ReleaseExe); 854CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput, options: TestOptions.ReleaseExe); 948CompilationVerifier verifier = CompileAndVerify(source, expectedOutput: checker.ExpectedOutput, options: TestOptions.ReleaseExe); 1029CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput, options: TestOptions.ReleaseExe); 1128CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 1225CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails); 1414CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 1506CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 1661CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 1750CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 1827CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 1932CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 2020CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 2131CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 2282CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 2407CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, expectedOutput: expectedOutput); 2478var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2499var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2519var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2538var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2567var verifier = CompileAndVerify(source + InstrumentationHelperSource, 2597var verifier = CompileAndVerify(source + InstrumentationHelperSource, 2644var verifier = CompileAndVerify(source + InstrumentationHelperSource, 2677var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2711var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2749var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll, parseOptions: TestOptions.RegularPreview); 2794var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2863var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2893var verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.ReleaseDll); 2922var verifier = CompileAndVerify(source + InstrumentationHelperSource + IsExternalInitTypeDefinition, 2961var verifier = CompileAndVerify(c, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 2997var verifier = CompileAndVerify(c, emitOptions: EmitOptions.Default.WithInstrumentationKinds(ImmutableArray.Create(InstrumentationKind.TestCoverage))); 3097var verifier = CompileAndVerify(source, expectedOutput, options: TestOptions.ReleaseExe); 3171var verifier = CompileAndVerify(source, expectedOutput, options: TestOptions.ReleaseExe); 3297var verifier = CompileAndVerify(sources, expectedOutput, options: TestOptions.ReleaseExe); 3423var verifier = CompileAndVerify(sources, expectedOutput, options: TestOptions.ReleaseExe); 3497var verifier = CompileAndVerify(source, expectedOutput, options: TestOptions.ReleaseExe); 3546var verifier = CompileAndVerify(source, expectedOutput, options: TestOptions.ReleaseExe, parseOptions: TestOptions.Regular9); 3555private static void AssertNotInstrumented(CompilationVerifier verifier, string qualifiedMethodName) 3558private static void AssertInstrumented(CompilationVerifier verifier, string qualifiedMethodName, bool expected = true) 3569private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, CSharpCompilationOptions options = null, CSharpParseOptions parseOptions = null, Verification verify = default) 3580private CompilationVerifier CompileAndVerify((string Path, string Content)[] sources, string expectedOutput = null, CSharpCompilationOptions options = null)
Emit\EditAndContinue\AssemblyReferencesTests.cs (11)
215var v0 = CompileAndVerify(compilation0); 216var v1 = CompileAndVerify(compilation1); 217var v2 = CompileAndVerify(compilation2); 319var v0 = CompileAndVerify(compilation0); 320var v1 = CompileAndVerify(compilation1); 321var v2 = CompileAndVerify(compilation2); 402var v0 = CompileAndVerify(compilation0); 403var v1 = CompileAndVerify(compilation1); 404var v2 = CompileAndVerify(compilation2); 486var v0 = CompileAndVerify(compilation0, verify: Verification.FailsILVerify); 590var v0 = CompileAndVerify(compilation0, verify: Verification.Passes);
Emit\EditAndContinue\EditAndContinueClosureTests.cs (49)
102var v0 = CompileAndVerify(compilation0); 163var v0 = CompileAndVerify(compilation0); 235var v0 = CompileAndVerify(compilation0); 293var v0 = CompileAndVerify(compilation0); 345var v0 = CompileAndVerify(compilation0); 405var v0 = CompileAndVerify(compilation0); 459var v0 = CompileAndVerify(compilation0); 514var v0 = CompileAndVerify(compilation0); 570var v0 = CompileAndVerify(compilation0); 625var v0 = CompileAndVerify(compilation0); 693var v0 = CompileAndVerify(compilation0); 771var v0 = CompileAndVerify(compilation0); 845var v0 = CompileAndVerify(compilation0); 912var v0 = CompileAndVerify(compilation0); 971var v0 = CompileAndVerify(compilation0); 1059var v0 = CompileAndVerify(compilation0); 1148var v0 = CompileAndVerify(compilation0); 1232var v0 = CompileAndVerify(compilation0); 1323var v0 = CompileAndVerify(compilation0); 1405var v0 = CompileAndVerify(compilation0); 1482var v0 = CompileAndVerify(compilation0); 1581var v0 = CompileAndVerify(compilation0); 1672var v0 = CompileAndVerify(compilation0); 1780var v0 = CompileAndVerify(compilation0); 1978var v0 = CompileAndVerify(compilation0); 2189var v0 = CompileAndVerify(compilation0); 2327var v0 = CompileAndVerify(compilation0); 2444var v0 = CompileAndVerify(compilation0); 2582var v0 = CompileAndVerify(compilation0); 2650var v0 = CompileAndVerify(compilation0); 2720var v0 = CompileAndVerify(compilation0); 2826var v0 = CompileAndVerify(compilation0); 2946var v0 = CompileAndVerify(compilation0); 3042var v0 = CompileAndVerify(compilation0); 3103var v0 = CompileAndVerify(compilation0); 3231var v0 = CompileAndVerify(compilation0); 3347var v0 = CompileAndVerify(compilation0); 3472var v0 = CompileAndVerify(compilation0); 3596var v0 = CompileAndVerify(compilation0); 3717var v0 = CompileAndVerify(compilation0); 3797var v0 = CompileAndVerify(compilation0); 3990var v0 = CompileAndVerify(compilation0); 4075var v0 = CompileAndVerify(compilation0); 4157var v0 = CompileAndVerify(compilation0); 4230var v0 = CompileAndVerify(compilation0); 4312var v0 = CompileAndVerify(compilation0); 4409var v0 = CompileAndVerify(compilation0); 4496var v0 = CompileAndVerify(compilation0); 4555var v0 = CompileAndVerify(compilation0);
Emit\EditAndContinue\EditAndContinueDelegateCacheTests.cs (5)
53var v0 = CompileAndVerify(compilation0); 117var v0 = CompileAndVerify(compilation0); 181var v0 = CompileAndVerify(compilation0); 245var v0 = CompileAndVerify(compilation0); 309var v0 = CompileAndVerify(compilation0);
Emit\EditAndContinue\EditAndContinuePdbTests.cs (1)
129var v0 = CompileAndVerify(compilation0, emitOptions: EmitOptions.Default.WithDebugInformationFormat(format));
Emit\EditAndContinue\EditAndContinueStateMachineTests.cs (52)
230var v0 = CompileAndVerify(compilation0, emitOptions: EmitOptions.Default.WithDebugInformationFormat(format)); 347var v0 = CompileAndVerify(compilation0); 449var v0 = CompileAndVerify(compilation0); 522var v0 = CompileAndVerify(compilation0); 573var v0 = CompileAndVerify(compilation0); 644var v0 = CompileAndVerify(compilation0); 718var v0 = CompileAndVerify(compilation0); 855var v0 = CompileAndVerify(compilation0); 1138var v0 = CompileAndVerify(compilation0); 1563var v0 = CompileAndVerify(compilation0); 2003var v0 = CompileAndVerify(compilation0); 2592var v0 = CompileAndVerify(compilation0); 2764var v0 = CompileAndVerify(compilation0); 3312var v0 = CompileAndVerify(compilation0); 3707var v0 = CompileAndVerify(compilation0); 3812var v0 = CompileAndVerify(compilation0); 3921var v0 = CompileAndVerify(compilation0); 4027var v0 = CompileAndVerify(compilation0); 4129var v0 = CompileAndVerify(compilation0, symbolValidator: module => 4292var v0 = CompileAndVerify(compilation0); 4526var v0 = CompileAndVerify(compilation0); 4689var v0 = CompileAndVerify(compilation0); 5146var v0 = CompileAndVerify(compilation0); 5482var v0 = CompileAndVerify(compilation0); 5822var v0 = CompileAndVerify(compilation0); 6562var v0 = CompileAndVerify(compilation0, symbolValidator: module => 6884var v0 = CompileAndVerify(compilation0); 7094var v0 = CompileAndVerify(compilation0); 7313var v0 = CompileAndVerify(compilation0, emitOptions: EmitOptions.Default.WithDebugInformationFormat(format), symbolValidator: module => 7857var v0 = CompileAndVerify(compilation0); 7934var v0 = CompileAndVerify(compilation0); 8023var v0 = CompileAndVerify(compilation0, symbolValidator: module => 8106var v0 = CompileAndVerify(compilation0); 8227var v0 = CompileAndVerify(compilation0); 8376var v0 = CompileAndVerify(compilation0); 8536var v0 = CompileAndVerify(compilation0); 8648var v0 = CompileAndVerify(compilation0); 8824var v0 = CompileAndVerify(compilation0); 9058var v0 = CompileAndVerify(compilation0); 9706var v0 = CompileAndVerify(compilation0); 9773var v0 = CompileAndVerify(compilation0); 9837var v0 = CompileAndVerify(compilation0); 9906var v0 = CompileAndVerify(compilation0); 9960var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 10019var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 10083var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 10133var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 10184var v0 = CompileAndVerify(compilation0, verify: Verification.FailsPEVerify); 10235var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 10296var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 10351var v0 = CompileAndVerify(compilation0, verify: Verification.Passes); 10418var v0 = CompileAndVerify(compilation0, verify: Verification.Passes);
Emit\EditAndContinue\EditAndContinueTest.cs (1)
52var verifier = new CompilationVerifier(compilation);
Emit\EditAndContinue\EditAndContinueTest.GenerationInfo.cs (2)
25public readonly CompilationVerifier? CompilationVerifier; 32public GenerationInfo(CSharpCompilation compilation, MetadataReader reader, CompilationDifference? diff, CompilationVerifier? compilationVerifier, EmitBaseline baseline, Action<GenerationVerifier> verifier)
Emit\EditAndContinue\EditAndContinueTestBase.cs (1)
301internal static void SaveImages(string outputDirectory, CompilationVerifier baseline, params CompilationDifference[] diffs)
Emit\EditAndContinue\EditAndContinueTests.cs (53)
231var v0 = CompileAndVerify(compilation0); 284var v0 = CompileAndVerify(compilation0); 352var v0 = CompileAndVerify(compilation0); 1202var v0 = CompileAndVerify(compilation0); 1295var v0 = CompileAndVerify(compilation0); 1391var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 1477var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 1536var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 1621var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 1717var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 4734var v0 = CompileAndVerify(compilation0); 5079var v0 = CompileAndVerify(compilation0); 7121var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 8699var v0 = CompileAndVerify(compilation0); 8801var v0 = CompileAndVerify(compilation0); 9124var v0 = CompileAndVerify(compilation0); 9497var v0 = CompileAndVerify(compilation0); 9594var v0 = CompileAndVerify(compilation0); 9717var v0 = CompileAndVerify(compilation0); 9885var v0 = CompileAndVerify(compilation0); 9951var v0 = CompileAndVerify(compilation0); 10628var v0 = CompileAndVerify(compilation0); 10810var v0 = CompileAndVerify(compilation0); 10932var v0 = CompileAndVerify(compilation0); 10985var v0 = CompileAndVerify(compilation0); 11842var v0 = CompileAndVerify(compilation0); 11928var v0 = CompileAndVerify(compilation0); 11975var v0 = CompileAndVerify(compilation0); 12021var v0 = CompileAndVerify(compilation0); 12170var v0 = CompileAndVerify(compilation0); 12304var v0 = CompileAndVerify(compilation0); 12413var v0 = CompileAndVerify(compilation0); 12531var v0 = CompileAndVerify(compilation0); 12722var v0 = CompileAndVerify(compilation0); 12851var v0 = CompileAndVerify(compilation0); 12999var v0 = CompileAndVerify(compilation0); 13195var v0 = CompileAndVerify(compilation0); 13304var v0 = CompileAndVerify(compilation0); 13414var v0 = CompileAndVerify(compilation0); 13578var v0 = CompileAndVerify(compilation0); 13723var v0 = CompileAndVerify(compilation0); 13828var v0 = CompileAndVerify(compilation0); 13991var v0 = CompileAndVerify(compilation0); 14195var v0 = CompileAndVerify(compilation0); 14443var v0 = CompileAndVerify(compilation0); 14627var v0 = CompileAndVerify(compilation0); 14700var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 14807var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 14923var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 16010var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 16086var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 16180var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped); 16270var v0 = CompileAndVerify(compilation0, verify: Verification.Skipped);
Emit\EditAndContinue\LocalSlotMappingTests.cs (21)
50var v0 = CompileAndVerify(compilation0); 125var v0 = CompileAndVerify(compilation0); 533var v0 = CompileAndVerify(compilation0); 645var v0 = CompileAndVerify(compilation0); 755var v0 = CompileAndVerify(compilation0); 848var v0 = CompileAndVerify(compilation0); 1543var v0 = CompileAndVerify(compilation0); 2027var v0 = CompileAndVerify(compilation0); 2220var v0 = CompileAndVerify(compilation0); 2761var v0 = CompileAndVerify(compilation0); 2870var v0 = CompileAndVerify(compilation0); 2997var v0 = CompileAndVerify(compilation0); 3211var v0 = CompileAndVerify(compilation0); 3318var v0 = CompileAndVerify(compilation0); 3431var v0 = CompileAndVerify(compilation0); 3539var v0 = CompileAndVerify(compilation0); 3631var v0 = CompileAndVerify(compilation0); 3773var v0 = CompileAndVerify(compilation0); 3850var v0 = CompileAndVerify(compilation0); 3959var v0 = CompileAndVerify(compilation0); 4938var v0 = CompileAndVerify(compilation0);
Emit\EmitErrorTests.cs (3)
115var compilation2 = CompileAndVerify( 149var compilation2 = CompileAndVerify( 188var compilation2 = CompileAndVerify(
Emit\EmitMetadataTests.cs (1)
1543var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput:
Emit\EntryPointTests.cs (2)
32var verifier = CompileAndVerify(compilation, expectedOutput: "2"); 51var verifier = CompileAndVerify(compilation);
Emit\InAttributeModifierTests.cs (1)
42var verifier = CompileAndVerify(code, references: new[] { reference.ToMetadataReference() }, expectedOutput: "5");
Emit\NoPiaEmbedTypes.cs (5)
1667var verifier = CompileAndVerify(compilation1, symbolValidator: metadataValidator); 1915var verifier = CompileAndVerify(compilation, symbolValidator: metadataValidator); 2003var verifier = CompileAndVerify(compilation, symbolValidator: metadataValidator); 2242var verifier = CompileAndVerify(compilation1, symbolValidator: metadataValidator); 2328var verifier = CompileAndVerify(compilation1);
PDB\PDBAsyncTests.cs (15)
71var v = CompileAndVerify(compilation); 621var v = CompileAndVerify(CreateCompilationWithMscorlib45(text, options: TestOptions.DebugDll)); 759var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 847var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 952var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1039var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1155var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1259var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1366var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, new[] { SystemCoreRef, CSharpRef }, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1464var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, new[] { SystemCoreRef, CSharpRef }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1550var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, new[] { SystemCoreRef, CSharpRef }, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1658var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1694var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, new[] { SystemCoreRef, CSharpRef }, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 1948var v = CompileAndVerify(CreateCompilationWithMscorlib45(source, new[] { SystemCoreRef, CSharpRef }, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)), symbolValidator: module => 2018var v = CompileAndVerify(compilation);
PDB\PDBConstantTests.cs (5)
337var c = CompileAndVerify(text, options: TestOptions.DebugDll); 409var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: module => 609var c = CompileAndVerify(text, options: TestOptions.DebugDll); 666var c = CompileAndVerify(text, options: TestOptions.DebugDll); 726var c = CompileAndVerify(text, options: TestOptions.DebugDll);
PDB\PDBDynamicLocalsTests.cs (1)
1694var v = CompileAndVerify(c);
PDB\PDBIteratorTests.cs (11)
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 => 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); 2122var c = CompileAndVerify(source, options: TestOptions.DebugDll);
PDB\PDBTests.cs (52)
1059var c = CompileAndVerify(source); 1479var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1534var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1589var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1611var v = CompileAndVerify(source, options: TestOptions.DebugDll); 1644var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2209var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2305var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2443var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2501var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2583var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2633var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2778var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2890var v = CompileAndVerify(source, options: TestOptions.DebugDll.WithModuleName("MODULE")); 3018var v = CompileAndVerify(source, options: TestOptions.DebugDll); 3180var v = CompileAndVerify(c); 3633var verifier = CompileAndVerify(c, expectedOutput: "1M2"); 3755var verifier = CompileAndVerify(c, expectedOutput: "1234"); 3921var verifier = CompileAndVerify(c, expectedOutput: "66"); 3991var v = CompileAndVerify(source, options: TestOptions.DebugDll); 4081var v = CompileAndVerify(source, options: TestOptions.DebugDll); 4325var v = CompileAndVerify(source, options: TestOptions.DebugDll); 5538var v = CompileAndVerify(CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.DebugDll)); 5687var v = CompileAndVerify(CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.DebugDll)); 5776var v = CompileAndVerify(CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.DebugDll)); 5865var v = CompileAndVerify(CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.ReleaseDll)); 6017var v = CompileAndVerify(c); 6134var v = CompileAndVerify(c); 6260var v = CompileAndVerify(c); 6353var v = CompileAndVerify(c); 6440var v = CompileAndVerify(c); 6501var v = CompileAndVerify(c); 6565var v = CompileAndVerify(c); 6649var v = CompileAndVerify(c); 6764var v = CompileAndVerify(c); 6866var v = CompileAndVerify(c); 8614var verifier = CompileAndVerify(c, verify: Verification.Skipped); 9011var verifier = CompileAndVerify(c, verify: Verification.Skipped); 9378var verifier = CompileAndVerify(c, verify: Verification.Skipped); 9607var verifier = CompileAndVerify(c); 10001var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.DebugDll); 10210var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), options: TestOptions.DebugDll); 10449var verifier = CompileAndVerify(c); 10620var verifier = CompileAndVerify(c); 10824var verifier = CompileAndVerify(c); 11088var cv = CompileAndVerify(c); 11239var v = CompileAndVerify(c); 11825var v = CompileAndVerify(c); 12524var v = CompileAndVerify(source, options: TestOptions.DebugDll); 12608var v = CompileAndVerify(source, options: TestOptions.DebugDll); 12689var v = CompileAndVerify(source, options: TestOptions.DebugDll); 12781var v = CompileAndVerify(source, options: TestOptions.DebugDll);
PDB\PDBTupleTests.cs (1)
311var v = CompileAndVerify(c);
PDB\PDBUsingTests.cs (4)
2016var v = CompileAndVerify(source, options: TestOptions.DebugDll); 2432var v = CompileAndVerify(comp, validator: (peAssembly) => 2613var v = CompileAndVerify(compilation); 2686var v = CompileAndVerify(compilation);
PrivateProtected.cs (1)
597var verifier = CompileAndVerify(
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (635)
Attributes\AttributeTests.cs (20)
1534var verifier = CompileAndVerify(compilation); 1798var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 1832var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 1893var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 1956var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2175var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2241var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2312var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 2444var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 3512var compVerifier = CompileAndVerify( 6373var compilation = CompileAndVerify(source, expectedOutput: ""); 10341var verifier = CompileAndVerify(source, expectedOutput: "Attr`1[System.Int32]"); 10393var verifier = CompileAndVerify(source, expectedOutput: "Attr`1[System.Int32] Attr`1[System.Object] Attr`1[System.Int32]"); 10457var verifier = CompileAndVerify( 10710var verifier = CompileAndVerify(source, symbolValidator: validateMetadata, options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)); 10847var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify, expectedOutput: "Prop = a"); 10919var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithNoRefSafetyRulesAttribute(), sourceSymbolValidator: verify, symbolValidator: verifyMetadata, expectedOutput: "a"); 11001var verifier = CompileAndVerify(source, symbolValidator: verify, sourceSymbolValidator: verifySource); 11057var verifier = CompileAndVerify(source, expectedOutput: "Attr`1[System.String]"); 11072var verifier = CompileAndVerify(source, symbolValidator: verify, sourceSymbolValidator: verify);
Attributes\AttributeTests_IsByRefLike.cs (1)
461var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_IsUnmanaged.cs (1)
730var comp1 = CompileAndVerify(code1, options: options, symbolValidator: module =>
Attributes\AttributeTests_MarshalAs.cs (13)
26private void VerifyFieldMetadataDecoding(CompilationVerifier verifier, Dictionary<string, byte[]> blobs) 58private void VerifyParameterMetadataDecoding(CompilationVerifier verifier, Dictionary<string, byte[]> blobs) 265var verifier = CompileAndVerifyFieldMarshal(source, blobs); 338var verifier = CompileAndVerifyFieldMarshal(source, blobs); 385var verifier = CompileAndVerifyFieldMarshal(source, blobs); 472var verifier = CompileAndVerifyFieldMarshal(source, blobs); 605var verifier = CompileAndVerifyFieldMarshal(source, blobs); 726var verifier = CompileAndVerifyFieldMarshal(source, blobs); 760var verifier = CompileAndVerifyFieldMarshal(source, blobs); 873var verifier = CompileAndVerifyFieldMarshal(source, blobs); 1004var verifier = CompileAndVerifyFieldMarshal(source, blobs); 1103var verifier = CompileAndVerifyFieldMarshal(source, blobs, isField: false); 1148var verifier = CompileAndVerifyFieldMarshal(source, blobs, isField: false);
Attributes\AttributeTests_NativeInteger.cs (2)
1504var comp = CompileAndVerify(@" 1545var comp = CompileAndVerify(@"
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
453var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Passes, symbolValidator: module =>
Attributes\AttributeTests_RefReadOnly.cs (1)
1178var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Fails, symbolValidator: module =>
Attributes\AttributeTests_Synthesized.cs (1)
937var verifier = CompileAndVerify(comp, symbolValidator: validate);
Attributes\AttributeTests_WellKnownAttributes.cs (74)
29public static bool? HasLocalsInit(this CompilationVerifier verifier, string qualifiedMethodName, bool realIL = false) 534var comp = CompileAndVerify(source, symbolValidator: verifier); 677var comp = CompileAndVerify(source, expectedOutput: "0"); 708var comp = CompileAndVerify(source, expectedOutput: "0"); 1982var comp = CompileAndVerify(source, expectedSignatures: new[] 2008var comp = CompileAndVerify(source, expectedSignatures: new[] 4972var comp = CompileAndVerify( 5568var verifier = CompileAndVerify(source, sourceSymbolValidator: sourceValidator, symbolValidator: metadataValidator, verify: Verification.FailsPEVerify, targetFramework: TargetFramework.Mscorlib40); 5668var verifier = CompileAndVerify( 10314private CompilationVerifier CompileAndVerifyWithSkipLocalsInit(string src, CSharpCompilationOptions options, CSharpParseOptions parseOptions = null, Verification? verify = null) 10328private CompilationVerifier CompileAndVerifyWithSkipLocalsInit(string src, CSharpParseOptions parseOptions = null, Verification? verify = null) 10404var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10439var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10472var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); 10505var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); 10534var verifier = CompileAndVerifyWithSkipLocalsInit(src); 10692var comp = CompileAndVerify(source); 10722var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10752var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10812var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10857var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.Regular9); 10899var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.Regular9); 10941var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.Regular9); 10983var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.Regular9); 11025var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.Regular9); 11067var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.Regular9); 11119var verifier = CompileAndVerifyWithSkipLocalsInit(source); 11170var verifier = CompileAndVerifyWithSkipLocalsInit(source); 11200var verifier = CompileAndVerifyWithSkipLocalsInit(source); 11229var verifier = CompileAndVerifyWithSkipLocalsInit(source); 11255var verifier = CompileAndVerifyWithSkipLocalsInit(source, parseOptions: TestOptions.RegularPreview, verify: Verification.Skipped); 11280var verifier = CompileAndVerifyWithSkipLocalsInit(source, parseOptions: TestOptions.RegularPreview, verify: Verification.Skipped); 11311var verifier = CompileAndVerifyWithSkipLocalsInit(source, parseOptions: TestOptions.RegularPreview, verify: Verification.Skipped); 11342var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.UnsafeReleaseExe); 11361var verifier = CompileAndVerifyWithSkipLocalsInit(source, TestOptions.UnsafeReleaseExe, verify: Verification.Passes); 11400var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11441var comp1 = CompileAndVerify(source1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11445var comp2 = CompileAndVerify(source2, references: new[] { reference }, verify: Verification.Passes); 11477var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11525var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11559var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11596var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11627var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11672var comp_init = CompileAndVerify(source_init, options: TestOptions.UnsafeReleaseDll); 11673var comp_skip = CompileAndVerify(source_skip, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11710var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll); 11753var comp_init = CompileAndVerify(source_init, options: TestOptions.UnsafeReleaseDll); 11754var comp_skip = CompileAndVerify(source_skip, options: TestOptions.UnsafeReleaseDll); 11796var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11848var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11920var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11955var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12028var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12089var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12118var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll); 12164var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll); 12282var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12332var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12387var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12445var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12492var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12521var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12549var comp = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, verify: Verification.Fails); 12577var comp = CompileAndVerify(source, options: TestOptions.DebugModule.WithAllowUnsafe(true), verify: Verification.Fails); 12608var comp = CompileAndVerify(source, references: new[] { metadata_comp.EmitToImageReference() }); 12662var verifier = CompileAndVerify(src, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12729var verifier = CompileAndVerify(comp, verify: Verification.Fails); 12783var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 12802var verifier = CompileAndVerifyWithSkipLocalsInit(src); 12821var verifier = CompileAndVerifyWithSkipLocalsInit(src); 12857var verifier = CompileAndVerifyWithSkipLocalsInit(src); 12903var verifier = CompileAndVerify(src, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped); 12949var verifier = CompileAndVerify(src, options: TestOptions.UnsafeReleaseDll, verify: Verification.Skipped); 12977var verifier = CompileAndVerify(comp, verify: Verification.Fails);
Attributes\InternalsVisibleToAndStrongNameTests.cs (3)
2044var verifier = CompileAndVerify(comp3); 2167var verifier = CompileAndVerify(comp4); 2745var verifier = CompileAndVerify(ca, symbolValidator: module =>
CodeGen\CodeGenCallTests.cs (164)
76var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 171var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 243var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 342var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 421var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 678var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 827var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 1166var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 1365var verifier = CompileAndVerify( 1521var verifier = CompileAndVerify( 1634var verifier = CompileAndVerify( 1795var verifier = CompileAndVerify( 1889var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 2042var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 2203var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 2526var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 2928var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 3051var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 3137var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 3260var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 3353var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 3641var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 3809var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 4179var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 4378var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 4520var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 4616var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 4759var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 4862var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 5167var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 5338var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 5725var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 5927var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 6065var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 6159var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 6298var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 6399var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 6688var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 6854var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 7225var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 7422var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 7560var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 7654var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 7793var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 7894var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 8189var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 8358var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 8735var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 8935var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 9101var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 9209var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 9376var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 9491var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 9808var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 9988var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 10387var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 10598var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 10725var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 10816var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 10943var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11041var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11333var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11494var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11634var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11729var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11870var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 11972var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 12293var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 12470var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 12763var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 12929var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 13323var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 13529var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 13689var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 13794var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 13955var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 14067var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 14378var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 14546var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 14714var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 14823var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 14992var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 15108var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 15433var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 15615var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 15936var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 16116var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 16519var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 16733var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 16851var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 16934var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 17053var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 17143var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 17408var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 17566var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 17709var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 17809var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 17953var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 18060var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 18357var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 18523var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 18684var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 18797var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 18959var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 19079var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 19404var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 19581var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 19730var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 19840var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 19990var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 20107var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 20433var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 20618var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 20781var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 20895var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 21059var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 21180var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 21532var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 21729var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 22058var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 22244var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 22674var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 22900var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 23089var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 23216var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 23406var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 23540var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 23893var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 24084var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 24267var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 24391var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 24575var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 24706var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 25057var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 25247var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 25438var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 25566var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 25758var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 25893var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 26254var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 26456var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 26813var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 27013var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 27446var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 27677var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 27822var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 27926var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 28072var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 28183var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 28496var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 28663var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 28801var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 28898var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 29037var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 29141var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 29433var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 29593var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 29765var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 29879var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 30052var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 30173var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 30505var verifier = CompileAndVerify(source, targetFramework: TargetFramework.NetLatest, options: TestOptions.ReleaseExe, expectedOutput: @" 30671var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @" 30777var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"
CodeGen\CodeGenLengthBasedSwitchTests.cs (24)
79var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 573var verifier = CompileAndVerify(comp, expectedOutput: "RAN", verify: Verification.Skipped); 1110var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 1391var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 1573var verifier = CompileAndVerify(comp); 1725var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1831var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 2062var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 2378var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 2912var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 4128var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 6494var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 8798var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 9110var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 9569var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 9706var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 10547var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 10878var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 11077var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 11734var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 12078var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 12729var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 13046var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 13654var verifier = CompileAndVerify(comp, expectedOutput: "RAN");
CodeGen\CodeGenMethodGroupConversionCachingTests.cs (81)
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")); 151var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C"), verify: Verification.FailsILVerify); 194var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C"), verify: Verification.FailsILVerify); 236var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("C")); 271var verifier = CompileAndVerify(source 348var verifier = CompileAndVerify(source 418var verifier = CompileAndVerify(source, symbolValidator: VerifyNoCacheContainersIn("C")); 448var verifier = CompileAndVerify(source, symbolValidator: VerifyNoCacheContainersIn("C")); 473var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("Program")); 499var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyNoCacheContainersIn("Program")); 521var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular10, symbolValidator: VerifyNoCacheContainersIn("Program")); 555var verifier = CompileAndVerify(source, expectedOutput: PASS); 598var verifier = CompileAndVerify(source, expectedOutput: PASS); 642var verifier = CompileAndVerify(source, expectedOutput: PASS); 687var verifier = CompileAndVerify(source, expectedOutput: PASS); 733var verifier = CompileAndVerify(source, expectedOutput: PASS); 779var verifier = CompileAndVerify(source, expectedOutput: PASS); 824var verifier = CompileAndVerify(source, expectedOutput: PASS); 867var verifier = CompileAndVerify(source, expectedOutput: PASS); 910var verifier = CompileAndVerify(source, expectedOutput: PASS); 955var verifier = CompileAndVerify(source, expectedOutput: PASS); 1000var verifier = CompileAndVerify(source, expectedOutput: PASS); 1045var verifier = CompileAndVerify(source, expectedOutput: PASS); 1091var verifier = CompileAndVerify(source, expectedOutput: PASS); 1137var verifier = CompileAndVerify(source, expectedOutput: PASS); 1185var verifier = CompileAndVerify(source, expectedOutput: PASS); 1230var verifier = CompileAndVerify(source, expectedOutput: PASS); 1275var verifier = CompileAndVerify(source, expectedOutput: PASS); 1325var verifier = CompileAndVerify(source, expectedOutput: PASS); 1370var verifier = CompileAndVerify(source, expectedOutput: PASS); 1408var verifier = CompileAndVerify(source, expectedOutput: PASS); 1452var verifier = CompileAndVerify(source, expectedOutput: PASS); 1496var verifier = CompileAndVerify(source, expectedOutput: PASS); 1540var verifier = CompileAndVerify(source, expectedOutput: PASS); 1587var verifier = CompileAndVerify(source, expectedOutput: PASS); 1634var verifier = CompileAndVerify(source, expectedOutput: PASS); 1681var verifier = CompileAndVerify(source, expectedOutput: PASS); 1729var verifier = CompileAndVerify(source, expectedOutput: PASS); 1781var verifier = CompileAndVerify(source, expectedOutput: PASS); 1824var verifier = CompileAndVerify(source, expectedOutput: PASS); 1869var verifier = CompileAndVerify(source, expectedOutput: PASS); 1914var verifier = CompileAndVerify(source, expectedOutput: PASS); 1963var verifier = CompileAndVerify(source, expectedOutput: PASS); 2019var verifier = CompileAndVerify(source, expectedOutput: PASS); 2590var verifier = CompileAndVerify(source, expectedOutput: PASS); 2628var verifier = CompileAndVerify(source, expectedOutput: PASS); 2674var verifier = CompileAndVerify(source, expectedOutput: PASS); 2721var verifier = CompileAndVerify(source, expectedOutput: PASS); 2766var verifier = CompileAndVerify(source, expectedOutput: PASS); 2812var verifier = CompileAndVerify(source, expectedOutput: PASS); 2846var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 2889var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 2933var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 2977var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 3020var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 3066var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 3125var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3167var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3211var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__2_0", arity: 1 3253var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3295var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3395var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("A.B.<>O", arity: 0 3548var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Test>O__0_0", arity: 1 3615var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("E.<Test>O__0_0", arity: 1 3689var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("E.<Test>O__0_0", arity: 1 3770var verifier = CompileAndVerify(source, expectedOutput: PASS, symbolValidator: VerifyCacheContainer("E.<Owner>O__0_0", arity: 2 3827var verifier = CompileAndVerify(source, symbolValidator: static module => 3877var verifier = CompileAndVerify(source, symbolValidator: static module => 3930var verifier = CompileAndVerify(source, symbolValidator: static module => 3978var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("Program.<>O", arity: 0 4034var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Owner>O__0_0", arity: 1 4092var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<Owner>O__0_0", arity: 1 4142var verifier = CompileAndVerify(source, symbolValidator: VerifyCacheContainer("C.<>O", arity: 0 5623var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular11); 5706var verifier = CompileAndVerifyWithWinRt(source, parseOptions: TestOptions.Regular11, options: TestOptions.ReleaseWinMD); 5823var verifier = CompileAndVerifyWithWinRt(source, parseOptions: TestOptions.Regular11, options: TestOptions.ReleaseWinMD); 6031var verifier = CompileAndVerify(comp, expectedOutput: 6172var verifier = CompileAndVerify(compilation, expectedOutput: PASS); 6328var verifier = CompileAndVerify(compilation, expectedOutput: PASS, symbolValidator: containerValidator);
Emit\NumericIntPtrTests.cs (30)
1048var verifier = CompileAndVerify(comp); 1096var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 1134var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 1330var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput($"{size}{size}{size}{size}"), verify: Verification.FailsPEVerify); 1423var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(@"1"), verify: Verification.FailsPEVerify); 1458var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 1614var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 1725var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 2449var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 2583var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(expectedOutput), verify: Verification.FailsPEVerify); 3093var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 3261var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 5988var verifier = CompileAndVerify(comp, verify: useUnsafeContext ? Verification.Skipped : Verification.FailsPEVerify); 6217var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedResult)); 6593var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedResult)); 6825var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(expectedResult)); 6865var verifier = CompileAndVerify(comp, emitOptions: EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"), verify: Verification.Skipped); 8150var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 8376var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 8580var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 8656var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9395var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9500var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(expectedOutput)); 9800var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput( 9991var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 10953var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify); 11593CompilationVerifier compileAndVerify(CSharpTestSource source) 11654var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput("RAN")); 11672var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("63"), verify: Verification.FailsPEVerify); 11720var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("00"));
Emit\UnmanagedTypeModifierTests.cs (16)
565var reference = CompileAndVerify(@" 604var parent = CompileAndVerify(@" 617var child = CompileAndVerify(@" 646var reference = CompileAndVerify(@" 682var parent = CompileAndVerify(@" 695var child = CompileAndVerify(@" 721var reference = CompileAndVerify(@" 757var parent = CompileAndVerify(@" 770var child = CompileAndVerify(@" 796var reference = CompileAndVerify(@" 832var parent = CompileAndVerify(@" 845var child = CompileAndVerify(@" 871var reference = CompileAndVerify(@" 908var parent = CompileAndVerify(@" 921var child = CompileAndVerify(@" 990var reference = CompileAndVerify(@"
FlowAnalysis\FlowDiagnosticTests.cs (2)
1219var verifier = CompileAndVerify(program, parseOptions: TestOptions.Regular11); 1279var verifier = CompileAndVerify(program, parseOptions: TestOptions.Regular11);
FlowAnalysis\RegionAnalysisTests.cs (1)
5615var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: "42");
Semantics\PatternMatchingTests.cs (46)
121var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 189var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 259var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 300var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 335var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 371var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 407var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 445var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 519var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 579var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3415var comp = CompileAndVerify(compilation, expectedOutput: "whatever"); 3718var verifier = CompileAndVerify(compilation); 3777var verifier = CompileAndVerify(compilation); 3847var comp = CompileAndVerify(compilation, expectedOutput: 3880var comp = CompileAndVerify(compilation, expectedOutput: 3913var comp = CompileAndVerify(compilation, expectedOutput: 3962var comp = CompileAndVerify(compilation, expectedOutput: 3992var comp = CompileAndVerify(compilation, expectedOutput: 4029var comp = CompileAndVerify(compilation, expectedOutput: 4093var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4140var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4171var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4222var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4538var comp = CompileAndVerify(compilation, expectedOutput: @"False 4565var comp = CompileAndVerify(compilation, expectedOutput: "True"); 4595var comp = CompileAndVerify(compilation, expectedOutput: "True"); 5100var comp = CompileAndVerify(compilation, expectedOutput: @"TBase 5222var comp = CompileAndVerify(compilation, expectedOutput: @"1 5298var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5597var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5776var comp = CompileAndVerify(compilation, expectedOutput: "roslyn"); 6073var comp = CompileAndVerify(compilation, expectedOutput: @"TnT"); 6106var comp = CompileAndVerify(compilation, expectedOutput: @"TnT"); 6134var comp = CompileAndVerify(compilation, expectedOutput: @"FalseTrueFalseFalse"); 6225var comp = CompileAndVerify(compilation, expectedOutput: "ok", verify: Verification.FailsILVerify); 6478var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 6660var comp = CompileAndVerify(compilation, expectedOutput: 6712var comp = CompileAndVerify(compilation, expectedOutput: 8612var verifier = CompileAndVerify(comp, expectedOutput: 8654var verifier = CompileAndVerify(comp, expectedOutput: 10214var verifier = CompileAndVerify(comp, expectedOutput: 10255var verifier = CompileAndVerify(comp, expectedOutput: 11005var verifier = CompileAndVerify(comp, expectedOutput: "(3, 6)"); 11179var verifier = CompileAndVerify(comp, expectedOutput: 11587var verifier = CompileAndVerify(comp, expectedOutput: "True"); 11939var verifier = CompileAndVerify(comp, expectedOutput: "True");
Semantics\PatternMatchingTests_ListPatterns.cs (18)
73var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 282var verifier = CompileAndVerify(new[] { source, TestSources.Index, TestSources.Range }, parseOptions: TestOptions.RegularWithListPatterns, 540var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 728var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2337var verifier = CompileAndVerify(compilation, expectedOutput: "True"); 2454var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2957var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5542var verifier = CompileAndVerify(compilation, expectedOutput: "(item value, rest value)", verify: Verification.FailsILVerify); 5631var verifier = CompileAndVerify(compilation, expectedOutput: "(item value, rest value)", verify: Verification.FailsILVerify); 7421var verifier = CompileAndVerify(comp); 7652var verifier = CompileAndVerify(new[] { source, TestSources.Index }, options: TestOptions.DebugDll, verify: Verification.FailsILVerify); 7750var verifier = CompileAndVerify(new[] { source, TestSources.Index }, verify: Verification.FailsILVerify); 7903var verifier = CompileAndVerify(compilation, expectedOutput: "(2, 3)", verify: Verification.FailsILVerify); 8069var verifier = CompileAndVerify(compilation, verify: Verification.Fails); 8140var verifier = CompileAndVerify(compilation, expectedOutput: "1 2 3", verify: Verification.Fails); 8366var verifier = CompileAndVerify(comp, expectedOutput: "(4, 2, 4, 2)", verify: Verification.FailsILVerify); 8481var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify).VerifyDiagnostics(); 8560var verifier = CompileAndVerify(comp, expectedOutput: "(42, 43)", verify: Verification.FailsILVerify);
Semantics\PatternMatchingTests2.cs (18)
40var comp = CompileAndVerify(compilation, expectedOutput: @"1"); 82var comp = CompileAndVerify(compilation, expectedOutput: ""); 128var comp = CompileAndVerify(compilation, expectedOutput: ""); 201var comp = CompileAndVerify(compilation, expectedOutput: ""); 243var comp = CompileAndVerify(compilation, expectedOutput: ""); 334var comp = CompileAndVerify(compilation, expectedOutput: "True"); 825var comp = CompileAndVerify(compilation, expectedOutput: @""); 926var comp = CompileAndVerify(compilation, expectedOutput: @"0123"); 1022var comp = CompileAndVerify(compilation, expectedOutput: @"0123"); 1071var comp = CompileAndVerify(compilation, expectedOutput: @"9 1134var comp = CompileAndVerify(compilation, expectedOutput: @"12345678"); 1453var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1541var comp = CompileAndVerify(compilation, expectedOutput: @"Fox Cat"); 1618var comp = CompileAndVerify(compilation, expectedOutput: @"111"); 1787var comp = CompileAndVerify(compilation, expectedOutput: @"111"); 1823var comp = CompileAndVerify(compilation, expectedOutput: @"111"); 3195var verifier = CompileAndVerify(source, expectedOutput: @" 3351var verifier = CompileAndVerify(source, expectedOutput: @"
Semantics\PatternMatchingTests3.cs (53)
423var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 474var comp = CompileAndVerify(compilation, verify: Verification.FailsILVerify, expectedOutput: expectedOutput); 596var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 639var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 682var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 725var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 749var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 772var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 815var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 857var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1039var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1092var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1145var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1198var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1699var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2096var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2168var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2240var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2289var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2338var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2369var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2427var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2544var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2582var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2653var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2817var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2876var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3143var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3281var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3369var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3763var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4620var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4786var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 4972var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5049var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 5256var compVerifier = CompileAndVerify(compilation, expectedOutput: "Done"); 5325var compVerifier = CompileAndVerify(compilation, expectedOutput: "Done"); 5545var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 6017var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 6038var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 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"); 6828var verifier = CompileAndVerify(comp, expectedOutput: ""); 7642var compVerifier = CompileAndVerify(compilation, expectedOutput: "10");
Semantics\PatternMatchingTests4.cs (31)
222var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 315var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 346var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 377var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 409var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 440var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 472var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 506var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 540var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 628var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 662var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 729var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 767var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 802var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 838var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 949var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1062var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1097var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1163var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1228var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1279var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1319var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 3361var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 3388var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 3414var compVerifier = CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Skipped); 4268var verifier = CompileAndVerify(comp, expectedOutput: "NaN"); 4350var verifier = CompileAndVerify(comp, expectedOutput: "NaN"); 4432var verifier = CompileAndVerify(comp, expectedOutput: "NaN"); 4514var verifier = CompileAndVerify(comp, expectedOutput: "NaN"); 4596var verifier = CompileAndVerify(comp, expectedOutput: "NaN"); 4680var verifier = CompileAndVerify(comp, expectedOutput: "NaN");
Semantics\PatternMatchingTests5.cs (6)
83var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 240var verifier = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1345var verifier = CompileAndVerify(compilation); 3178var compilation = CompileAndVerify(source, expectedOutput: "True"); 3227var compilation = CompileAndVerify(source, expectedOutput: "True"); 3294var compilation = CompileAndVerify(source, expectedOutput: "True");
Semantics\PatternSwitchTests.cs (28)
404var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1084var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1129var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1235var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1426var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1484var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1560var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 1971var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2012var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2110var comp = CompileAndVerify(compilation, expectedOutput: expectedOutput); 2156var comp = CompileAndVerify(compilation, expectedOutput: 2218var comp = CompileAndVerify(compilation, expectedOutput: 2274var comp = CompileAndVerify(compilation, expectedOutput: 2332var comp = CompileAndVerify(compilation, expectedOutput: 2381var comp = CompileAndVerify(compilation, expectedOutput: 2445var comp = CompileAndVerify(compilation, expectedOutput: 2510var comp = CompileAndVerify(compilation, expectedOutput: 2570var comp = CompileAndVerify(compilation, expectedOutput: 2626var comp = CompileAndVerify(compilation, expectedOutput: 2667var comp = CompileAndVerify(compilation, expectedOutput: 2706var comp = CompileAndVerify(compilation, expectedOutput: 2748var comp = CompileAndVerify(compilation, expectedOutput: 2810var comp = CompileAndVerify(compilation, expectedOutput: @"pass"); 2838var comp = CompileAndVerify(compilation, expectedOutput: @"pass"); 2866var comp = CompileAndVerify(compilation, expectedOutput: @"1"); 2957var comp = CompileAndVerify(compilation, expectedOutput: @"pass"); 3176var comp = CompileAndVerify(compilation, expectedOutput: "Main"); 3206var comp = CompileAndVerify(compilation);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IUsingStatement.cs (1)
1437var verifier = CompileAndVerify(compilation);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (852)
Semantics\AccessCheckTests.cs (5)
1051var assembly1Verifier = CompileAndVerify(assembly1Compilation); 1087var compilationVerifier = CompileAndVerify(compilation1); 1160var compilationVerifier = CompileAndVerify(compilation1); 1197var compilationVerifier = CompileAndVerify(compilationA); 1239var compilationVerifier = CompileAndVerify(compilationA);
Semantics\AmbiguousOverrideTests.cs (1)
1359var verifier = CompileAndVerify(csharp, new[] { reference }, options: TestOptions.ReleaseExe, expectedOutput: @"
Semantics\AnonymousFunctionTests.cs (5)
22internal CompilationVerifier VerifyInPreview(CSharpTestSource source, string expectedOutput, Action<ModuleSymbol>? symbolValidator = null, params DiagnosticDescription[] expected) 38var verifier = CompileAndVerify( 654var verifier = VerifyInPreview( 1187var verifier = CompileAndVerify( 1272var verifier = VerifyInPreview(source, expectedOutput: "1");
Semantics\ArglistTests.cs (7)
193var verifier = CompileAndVerify(source: text, expectedOutput: "System.Int32", verify: Verification.FailsILVerify); 361var verifier = CompileAndVerify(source: text, expectedOutput: "System.String", verify: Verification.FailsILVerify); 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);
Semantics\BindingAsyncTasklikeMoreTests.cs (5)
107var verifier = CompileAndVerify(compilation, expectedOutput: "3"); 432var verifier = CompileAndVerify(compilation); 513var verifier = CompileAndVerify(compilation); 592var verifier = CompileAndVerify(compilation); 650var verifier = CompileAndVerify(
Semantics\BindingAwaitTests.cs (2)
1896var verifier = CompileAndVerify(compilation); 2839var compiled = CompileAndVerify(comp, expectedOutput: "dynamic42", verify: Verification.FailsPEVerify);
Semantics\ConditionalOperatorTests.cs (9)
245var verifier = CompileAndVerify(source, expectedOutput: @"B 361var verifier = CompileAndVerify(source, expectedOutput: @"BDBD"); 520var verifier = CompileAndVerify(source, expectedOutput: @"BDBD"); 619var verifier = CompileAndVerify(source, expectedOutput: @"BDBD"); 684var verifier = CompileAndVerify( 756var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1"); 821var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1"); 897var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1"); 975var verifier = CompileAndVerify(new string[] { source }, expectedOutput: "1");
Semantics\DeconstructionTests.cs (7)
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); 6484var verifier = CompileAndVerify(comp, expectedOutput: "(0, 0)");
Semantics\DelegateTypeTests.cs (41)
7478var verifier = CompileAndVerify(comp, expectedOutput: 8296var verifier = CompileAndVerify(comp, expectedOutput: 8428var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: @"(41, 42)"); 8482var verifier = CompileAndVerify(comp, expectedOutput: 8556var verifier = CompileAndVerify(comp, expectedOutput: 8622var verifier = CompileAndVerify(comp, expectedOutput: 8699var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 8764var verifier = CompileAndVerify(comp, expectedOutput: 8843var verifier = CompileAndVerify(comp, expectedOutput: 9290var verifier = CompileAndVerify(comp, validator: validator, expectedOutput: "D"); 9331var verifier = CompileAndVerify(comp, validator: validator, expectedOutput: 9375var verifier = CompileAndVerify(comp, validator: validator); 10787var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 10839var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 10904var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: 10953var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 12312var verifier = CompileAndVerify(source, parseOptions: TestOptions.RegularPreview); 12429var verifier = CompileAndVerify(source, expectedOutput: 12452var verifier = CompileAndVerify(source, expectedOutput: "7 <>f__AnonymousDelegate0`4[System.Int32,System.Int32,System.Int32,System.Int32]"); 12553var verifier = CompileAndVerify(source, expectedOutput: "abc <>f__AnonymousDelegate0`4[System.String,System.String,System.String,System.String]"); 13028var verifier = CompileAndVerify(source, expectedOutput: 13113var verifier = CompileAndVerify(source, expectedOutput: "file::member:0"); 13160var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net60, 13536var verifier = CompileAndVerify(source, verify: Verification.FailsILVerify); 13631var verifier = CompileAndVerify(source, expectedOutput: @"10 a 0"); 14120var verifier = CompileAndVerify(source, expectedOutput: 14251var verifier = CompileAndVerify(source, expectedOutput: ""); 14341var verifier = CompileAndVerify(source); 14556var verifier = CompileAndVerify(source, expectedOutput: """ 14576var verifier = CompileAndVerify(source).VerifyDiagnostics(); 14668var verifier = CompileAndVerify(source, expectedOutput: """ 14690var verifier = CompileAndVerify(source).VerifyDiagnostics(); 14797var verifier = CompileAndVerify(source, expectedOutput: """ 14855var verifier = CompileAndVerify(source, expectedOutput: """ 14874var verifier = CompileAndVerify(source).VerifyDiagnostics(); 14955var verifier = CompileAndVerify(source, expectedOutput: """ 14976var verifier = CompileAndVerify(source).VerifyDiagnostics(); 15067var verifier = CompileAndVerify(source, expectedOutput: """ 15981var verifier = CompileAndVerify(source, expectedOutput: "<>f__AnonymousDelegate0`2[System.Int32,System.Int32]").VerifyDiagnostics(); 16019var verifier = CompileAndVerify(source, expectedOutput: "<>c").VerifyDiagnostics(); 16078var verifier = CompileAndVerify(source).VerifyDiagnostics(
Semantics\DynamicTests.cs (5)
3545var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: "System.Object").VerifyDiagnostics(); 3578var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: "System.Object").VerifyDiagnostics(); 3606var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithAllowUnsafe(true), verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3634var verifier = CompileAndVerify(source, options: TestOptions.DebugDll.WithAllowUnsafe(true), verify: Verification.FailsPEVerify).VerifyDiagnostics(); 3685var verifier = CompileAndVerify(source, new[] { CSharpRef }, options: TestOptions.DebugDll).VerifyDiagnostics();
Semantics\FunctionPointerTests.cs (21)
24private CompilationVerifier CompileAndVerifyFunctionPointers(CSharpCompilation compilation, string? expectedOutput = null) 154var verifier = CompileAndVerifyFunctionPointers(comp); 217var verifier = CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Skipped); 243var verifier = CompileAndVerifyFunctionPointers(comp); 308var verifier = CompileAndVerifyFunctionPointers(comp); 363var verifier = CompileAndVerifyFunctionPointers(comp); 413var verifier = CompileAndVerifyFunctionPointers(comp); 458var verifier = CompileAndVerifyFunctionPointers(comp); 562var verifier = CompileAndVerifyFunctionPointers(comp); 606var verifier = CompileAndVerifyFunctionPointers(comp); 653var verifier = CompileAndVerifyFunctionPointers(comp); 700var verifier = CompileAndVerifyFunctionPointers(comp); 793var verifier = CompileAndVerifyFunctionPointers(comp); 845var verifier = CompileAndVerifyFunctionPointers(comp); 905var verifier = CompileAndVerifyFunctionPointers(comp); 2668var verifier = CompileAndVerify(@" 2693var verifier = CompileAndVerify(@" 2912var verifier = CompileAndVerify(@" 3250var verifier = CompileAndVerifyFunctionPointers(comp, expectedOutput: "GetPtr"); 3330var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: @" 3827var verifier = CompileAndVerify(comp, expectedOutput: "True", verify: Verification.Skipped);
Semantics\ImplicitlyTypedLocalsTests.cs (1)
112var verifier = CompileAndVerify(alias + text, expectedOutput: "1");
Semantics\ImplicitObjectCreationTests.cs (1)
4800var verifier = CompileAndVerify(source, expectedOutput: "0231");
Semantics\InitOnlyMemberTests.cs (6)
2783var v = CompileAndVerify(comp, expectedOutput: "2 3", verify: Verification.Skipped); 4202var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4237var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4277var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4316var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @" 4402var verifier = CompileAndVerify(new[] { IsExternalInitTypeDefinition, @"
Semantics\InterpolationTests.cs (135)
242var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 268var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 346var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: expectedOutput).VerifyDiagnostics(); 1116var compilation = CompileAndVerify(comp, verify: Verification.Fails); 1175var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput); 1187static void checkNet50IL(CompilationVerifier verifier) 1206static void checkNet60IL(CompilationVerifier verifier) 1278var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput); 1290static void checkNet50IL(CompilationVerifier verifier) 1309static void checkNet60IL(CompilationVerifier verifier) 1379var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput); 1431var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput); 1675var verifier = CompileAndVerify(new[] { code, handler }, expectedOutput: @" 1814var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: expectedOutput); 2230var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: expectedOutput, targetFramework: TargetFramework.Net50, parseOptions: TestOptions.Regular10); 2666var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"base1"); 2840var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2952var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3115var verifier = CompileAndVerifyWithCSharp(new[] { source, interpolatedStringBuilder }, expectedOutput: @"base1"); 3167var verifier = CompileAndVerifyWithCSharp(new[] { source, interpolatedStringBuilder }, expectedOutput: @"1base"); 3219var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerAttribute }); 3655var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3751var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"value:1"); 3788var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3854var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 3937var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, targetFramework: TargetFramework.NetCoreApp, expectedOutput: @" 4029var verifier = CompileAndVerify(comp, verify: Verification.FailsILVerify, expectedOutput: @" 4120var verifier = CompileAndVerify(source, expectedOutput: @" 4597private CompilationVerifier CompileAndVerifyOnCorrectPlatforms(CSharpCompilation compilation, string expectedOutput) 4616var verifier = CompileAndVerify(comp, expectedOutput: @" 4753var verifier = CompileAndVerify(comp, expectedOutput: @" 4813var verifier = CompileAndVerify(comp, expectedOutput: @" 4864var verifier = CompileAndVerify(comp, expectedOutput: @" 4953var verifier = CompileAndVerify(comp, expectedOutput: @"Literal"); 5067var verifier = CompileAndVerify(comp, expectedOutput: @" 5121var verifier = CompileAndVerify(comp, expectedOutput: @" 5249var verifier = CompileAndVerify(comp, expectedOutput: @" 5307var verifier = CompileAndVerify(comp, expectedOutput: @" 5354var verifier = CompileAndVerify(comp, expectedOutput: @" 5408var verifier = CompileAndVerify(comp, expectedOutput: @"1.00Literal"); 5468var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"value:Field"); 5542var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"value:Field"); 5591var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 5657var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"1.00Literal"); 5727var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 5845var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 5905var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"1.00Literal"); 6002var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6090var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6173var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"1.00Literal"); 6253var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6317var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6409var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6465var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6530var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6573var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6619var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6665var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6717var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 7656var verifier = CompileAndVerify(comp, sourceSymbolValidator: validate, symbolValidator: validate, expectedOutput: @" 7693void verifyIL(CompilationVerifier verifier) 8201var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 8227static void verifyIL(string extraConstructorArg, CompilationVerifier verifier) 8325var verifier = base.CompileAndVerify((Compilation)comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: expectedOutput); 8347static void verifyIL(string extraConstructorArg, CompilationVerifier verifier) 8463var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 8620var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 8753var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 8890var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 8991var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: "CustomHandler").VerifyDiagnostics(); 9119var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 9235var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 9352var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 9475var verifier = CompileAndVerify(comp, expectedOutput: @" 9632var verifier = CompileAndVerify( 9742var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: "1literal:literal", symbolValidator: validator, sourceSymbolValidator: validator); 9821var verifier = CompileAndVerify(comp, expectedOutput: @" 9920var verifier = CompileAndVerify(comp, expectedOutput: @" 10023var verifier = CompileAndVerify(comp, expectedOutput: @" 10169var verifier = CompileAndVerify(comp, expectedOutput: @" 10268var verifier = CompileAndVerify(comp, expectedOutput: @" 10420var verifier = CompileAndVerify(comp, expectedOutput: @" 10519var verifier = CompileAndVerify(comp, expectedOutput: @" 10618var verifier = CompileAndVerify(comp, expectedOutput: @" 10815var verifier = CompileAndVerify(comp, expectedOutput: @" 10900var verifier = CompileAndVerify(comp, expectedOutput: @" 11012var verifier = CompileAndVerify(comp, expectedOutput: @" 11264var verifier = CompileAndVerify(comp, expectedOutput: @" 11449var verifier = CompileAndVerify(comp, expectedOutput: @" 11549var verifier = CompileAndVerify(comp, expectedOutput: @" 11605var verifier = CompileAndVerify(comp, expectedOutput: @"s.I:1"); 11667var verifier = CompileAndVerify(comp, expectedOutput: @"s.I:2"); 11749var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: @" 11800var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 11897var verifier = CompileAndVerify(comp, expectedOutput: @" 12189var verifier = CompileAndVerify(comp, expectedOutput: @" 12453var verifier = CompileAndVerify(comp, expectedOutput: @" 12710var verifier = CompileAndVerify(comp, expectedOutput: @" 12834var verifier = CompileAndVerify(comp, expectedOutput: @" 13063var verifier = CompileAndVerify(comp, expectedOutput: @"literal:literal"); 13115var verifier = CompileAndVerify(comp, expectedOutput: @"1"); 13166var verifier = CompileAndVerify(comp); 13225var verifier = CompileAndVerify(comp); 13285var verifier = CompileAndVerify(comp); 13347var verifier = CompileAndVerify(comp); 13409var verifier = CompileAndVerify(comp); 13501var verifier = CompileAndVerify(comp, expectedOutput: "c.i:1"); 13816var verifier = CompileAndVerify(comp, expectedOutput: "d:1"); 13861var verifier = CompileAndVerify(comp, expectedOutput: "ctor"); 13906var verifier = CompileAndVerify(comp, expectedOutput: "ctor"); 13949var verifier = CompileAndVerify(comp, expectedOutput: "AppendLiteral"); 13998var verifier = CompileAndVerify(comp, expectedOutput: "AppendFormatted"); 14054var verifier = CompileAndVerify(comp, expectedOutput: @" 14147var verifier = CompileAndVerify(comp, expectedOutput: @" 15092var verifier = CompileAndVerify(comp, expectedOutput: @" 15138var verifier = CompileAndVerify(comp, expectedOutput: @" 15193var verifier = CompileAndVerify(comp, expectedOutput: @" 15372var verifier = CompileAndVerify(comp, expectedOutput: @" 15446var verifier = CompileAndVerify(comp, expectedOutput: @" 15813var verifier = CompileAndVerify(code, expectedOutput: @"123456"); 15831var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringHandlerDefinition(includeSpanOverloads: false, useDefaultParameters: false, useBoolReturns: false) }, expectedOutput: @" 15962var verifier = CompileAndVerify(comp, expectedOutput: @"123456123456"); 16121var verifier = CompileAndVerify(comp, expectedOutput: @" 16185var verifier = CompileAndVerify(comp, expectedOutput: @" 16275var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringCustomHandlerType("CustomHandler", "struct", useBoolReturns: false) }, expectedOutput: @" 16378var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 16442var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @""); 16550var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 16603var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 16644var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 16695var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 16741var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 16857var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1"); 16888var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "2"); 16939var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1");
Semantics\IteratorTests.cs (1)
420var comp = CompileAndVerify(source, expectedOutput: "0,1,2,3", options: TestOptions.DebugExe);
Semantics\LocalFunctionTests.cs (1)
6894var verifier = CompileAndVerify(source, expectedOutput:
Semantics\MultiDimensionalArrayTests.cs (12)
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); 299var verifier = CompileAndVerify(compilation, expectedOutput: 334var verifier = CompileAndVerify(compilation, expectedOutput: 382var verifier = CompileAndVerify(compilation, expectedOutput: 627var verifier = CompileAndVerify(compilation, expectedOutput: 681var verifier = CompileAndVerify(compilation, expectedOutput: 713var verifier = CompileAndVerify(compilation, expectedOutput: 1212var verifier = CompileAndVerify(compilation, expectedOutput: 1539var verifier = CompileAndVerify(compilation, expectedOutput:
Semantics\NamedAndOptionalTests.cs (8)
774var c = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.FailsPEVerify); 1345var verifier = CompileAndVerify(new[] { sourceDefinitions, sourceCalls }, expectedOutput: expected); 1573var verifier = CompileAndVerify(csharpCompilation, expectedOutput: expected); 1681var verifier = CompileAndVerify(exeComp, expectedOutput: @"DatesMatch 1793var verifier = CompileAndVerify(source, expectedOutput: @" 1867var verifier = CompileAndVerify(source, expectedOutput: 1944var verifier = CompileAndVerify(source, expectedOutput: 2013var verifier = CompileAndVerify(source, expectedOutput: "2");
Semantics\NameOfTests.cs (3)
147var comp = CompileAndVerify(source, expectedOutput: @" 1139var comp = CompileAndVerify(compilation, expectedOutput: @"N1N2"); 1391var comp = CompileAndVerify(compilation, expectedOutput: @"passed");
Semantics\NativeIntegerTests.cs (34)
2937var verifier = CompileAndVerify(comp, expectedOutput: 2984var verifier = CompileAndVerify(comp, expectedOutput: 3015var verifier = CompileAndVerify(comp, expectedOutput: 3678var verifier = CompileAndVerify(comp, expectedOutput: 4342var verifier = CompileAndVerify(comp, expectedOutput: $"{size}{size}{size}{size}"); 4485var verifier = CompileAndVerify(source, expectedOutput: @"1"); 4522var verifier = CompileAndVerify(comp, expectedOutput: 4595var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 4665var verifier = CompileAndVerify(comp, expectedOutput: 4866var verifier = CompileAndVerify(comp); 4975var verifier = CompileAndVerify(comp); 5223var verifier = CompileAndVerify(comp); 5333var verifier = CompileAndVerify(comp); 6592var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput); 6724var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput); 7262var verifier = CompileAndVerify(comp, expectedOutput: 7429var verifier = CompileAndVerify(comp, expectedOutput: 9486var verifier = CompileAndVerify(comp, verify: useUnsafeContext || !verify ? Verification.Skipped : Verification.Passes); 9710var verifier = CompileAndVerify(comp, expectedOutput: expectedResult); 10087var verifier = CompileAndVerify(comp, expectedOutput: expectedResult); 10312var verifier = CompileAndVerify(comp, expectedOutput: expectedResult); 10352var verifier = CompileAndVerify(comp, emitOptions: EmitOptions.Default.WithRuntimeMetadataVersion("0.0.0.0"), verify: Verification.Skipped); 12412var verifier = CompileAndVerify(comp, expectedOutput: 12637var verifier = CompileAndVerify(comp, expectedOutput: 12840var verifier = CompileAndVerify(comp, expectedOutput: 12915var verifier = CompileAndVerify(comp, expectedOutput: 13767var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 13872var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: expectedOutput); 14143var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular9, expectedOutput: 14790var verifier = CompileAndVerify(source); 15095var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 15137var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 15807var verifier = CompileAndVerify(comp, expectedOutput: "RAN"); 15852var verifier = CompileAndVerify(comp).VerifyDiagnostics();
Semantics\NonTrailingNamedArgumentsTests.cs (17)
39var verifier = CompileAndVerify(source, expectedOutput: "First 1 2. Second 3 4.", parseOptions: TestOptions.Regular7_2); 85var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 113var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 137var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 160var verifier = CompileAndVerifyWithMscorlib40(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { TestMetadata.Net40.SystemCore }); 193var verifier = CompileAndVerify(source, expectedOutput: "1 2. 1 2.", parseOptions: TestOptions.Regular7_2); 224var verifier = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2); 260var verifier = CompileAndVerify(source, expectedOutput: "Get 1 2. Set 3 4 5.", parseOptions: TestOptions.Regular7_2); 335var verifier1 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.ToMetadataReference() }); 338var verifier2 = CompileAndVerify(source, expectedOutput: "1 2.", parseOptions: TestOptions.Regular7_2, references: new[] { lib.EmitToImageReference() }); 387var verifier = CompileAndVerify(source, expectedOutput: "1 hi.", parseOptions: TestOptions.Regular7_2); 506var comp = CompileAndVerify(source, expectedOutput: "1 2. 2 3. 3 4,5."); 738var verifier = CompileAndVerify(source, expectedOutput: "Second 3 2."); 770var verifier = CompileAndVerify(source, expectedOutput: "Second 3 2."); 797var comp = CompileAndVerify(source, expectedOutput: "42"); 914var verifier = CompileAndVerify(source, expectedOutput: "1 2 3 4 Length:2"); 1094var comp = CompileAndVerify(source, expectedOutput: "1 2 34. 1 2 56.");
Semantics\NullableConversionTests.cs (3)
36var verifier = CompileAndVerify(source: source, expectedOutput: "AB"); 85var verifier = CompileAndVerify(source: source, expectedOutput: expectedOutput); 148var verifier = CompileAndVerify(source: source, expectedOutput: expectedOutput);
Semantics\NullableReferenceTypesTests.cs (1)
112838var verifier = CompileAndVerify(
Semantics\NullableTests.cs (12)
188var verifier = CompileAndVerify(source: source2, expectedOutput: "0"); 329var verifier = CompileAndVerify(source: source.Replace("TYPE", type), expectedOutput: expected); 389var verifier = CompileAndVerify(source: source, expectedOutput: "1"); 543var verifier = CompileAndVerify(source: source, expectedOutput: expected); 609var verifier = CompileAndVerify(source: source, expectedOutput: expected); 756var verifier = CompileAndVerify(source: s, expectedOutput: expected); 1314var verifier = CompileAndVerify(source: source.ToString(), expectedOutput: ""); 1409var verifier = CompileAndVerify(source: source, expectedOutput: ""); 1608var verifier = CompileAndVerify(source: source, expectedOutput: ""); 1653var verifier = CompileAndVerify(source: source, expectedOutput: "123"); 1671var verifier = CompileAndVerify(source: source2, expectedOutput: "0"); 1769var verifier = CompileAndVerify(source, expectedOutput: expected);
Semantics\OperatorTests.cs (14)
4842var verifier = CompileAndVerify(compilation, expectedOutput: "42"); 4910var verifier = CompileAndVerify(compilation, expectedOutput: "42"); 4947var verifier = CompileAndVerify(compilation, expectedOutput: "42"); 4985var verifier = CompileAndVerify(compilation, expectedOutput: "42"); 5236var comp = CompileAndVerify(source); 5316var comp = CompileAndVerify(source); 5340var comp = CompileAndVerify(source); 5359var comp = CompileAndVerify(source); 5378var comp = CompileAndVerify(source); 5879var comp = CompileAndVerify(source, expectedOutput: @"False 8890var verifier = CompileAndVerify(source); 10842var verifier = CompileAndVerify(source: source, expectedOutput: 11003var verifier = CompileAndVerify(source: source, expectedOutput: 11262var verifier = CompileAndVerify(source, expectedOutput: "Goo, Bar");
Semantics\OutVarTests.cs (2)
32913var comp = CompileAndVerify(source, expectedOutput: "MMM"); 32976var comp = CompileAndVerify(source, expectedOutput: "MMM");
Semantics\PrimaryConstructorTests.cs (24)
393var verifier = CompileAndVerify(comp).VerifyDiagnostics( 878var verifier = CompileAndVerify(comp, expectedOutput: "(2, 2)"); 938var verifier = CompileAndVerify(src, expectedOutput: @" 1177var verifier = CompileAndVerify(src, expectedOutput: @" 1834var verifier = CompileAndVerify(src, expectedOutput: @" 1896var verifier = CompileAndVerify(src, expectedOutput: @"1").VerifyDiagnostics(); 2526var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 2637var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 2684var verifier = CompileAndVerify(src, expectedOutput: @" 2934var comp = CompileAndVerify(source, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 3063var comp = CompileAndVerify(source, expectedOutput: "Main"); 6426var verifier = CompileAndVerify(source, expectedOutput: 6475var verifier = CompileAndVerify(source, expectedOutput: 7686var verifier = CompileAndVerify(src, expectedOutput: @"TrueFalse").VerifyDiagnostics( 7758var verifier = CompileAndVerify(comp, expectedOutput: @"122123124125125", verify: Verification.Fails).VerifyDiagnostics( 8164var verifier = CompileAndVerify(comp, expectedOutput: @"123124125").VerifyDiagnostics(); 8329var verifier = CompileAndVerify(comp, expectedOutput: @"123124").VerifyDiagnostics(); 10766var verifier = CompileAndVerify(comp, expectedOutput: methodName); 11231var verifier = CompileAndVerify(comp, expectedOutput: @"123124125126-1", verify: Verification.Fails).VerifyDiagnostics(); 11304var verifier = CompileAndVerify(comp, expectedOutput: @"123124125126-1-2-3", verify: Verification.Fails).VerifyDiagnostics(); 11381var verifier = CompileAndVerify(comp, expectedOutput: @"123123124-1-2-3", verify: Verification.Passes).VerifyDiagnostics(); 13076var verifier = CompileAndVerify(source, expectedOutput: " 0 1 2 3 2 3", options: TestOptions.DebugExe); 13397var verifier = CompileAndVerify(comp, expectedOutput: @"(2, 1)").VerifyDiagnostics(); 14817var verifier = CompileAndVerify(comp, expectedOutput: @"122123124125125", verify: Verification.Fails).VerifyDiagnostics(
Semantics\RawInterpolationTests.cs (5)
238var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 264var verifier = CompileAndVerify(source, expectedOutput: expectedOutput); 396var verifier = CompileAndVerify(source, new[] { CSharpRef }, expectedOutput: expectedOutput).VerifyDiagnostics(); 1112var compilation = CompileAndVerify(comp, verify: Verification.Fails); 1360var verifier = CompileAndVerify(source, expectedOutput: expectedOutput);
Semantics\RawInterpolationTests_Handler.cs (110)
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); 1063var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"base1"); 1237var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 1349var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 1512var verifier = CompileAndVerifyWithCSharp(new[] { source, interpolatedStringBuilder }, expectedOutput: @"base1"); 1564var verifier = CompileAndVerifyWithCSharp(new[] { source, interpolatedStringBuilder }, expectedOutput: @"1base"); 1618var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerAttribute }); 2058var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2179var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @"value:1"); 2216var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2282var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, expectedOutput: @" 2365var verifier = CompileAndVerify(new[] { source, interpolatedStringBuilder }, targetFramework: TargetFramework.NetCoreApp, expectedOutput: @" 2457var verifier = CompileAndVerify(comp, expectedOutput: @" 2547var verifier = CompileAndVerify(source, expectedOutput: @" 2924private CompilationVerifier CompileAndVerifyOnCorrectPlatforms(CSharpCompilation compilation, string expectedOutput) 2943var verifier = CompileAndVerify(comp, expectedOutput: @" 3080var verifier = CompileAndVerify(comp, expectedOutput: @" 3140var verifier = CompileAndVerify(comp, expectedOutput: @" 3189var verifier = CompileAndVerify(comp, expectedOutput: @"Literal"); 3307var verifier = CompileAndVerify(comp, expectedOutput: @" 3361var verifier = CompileAndVerify(comp, expectedOutput: @" 3486var verifier = CompileAndVerify(comp, expectedOutput: @" 3544var verifier = CompileAndVerify(comp, expectedOutput: @" 3591var verifier = CompileAndVerify(comp, expectedOutput: @" 3645var verifier = CompileAndVerify(comp, expectedOutput: @"1.00Literal"); 3707var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"value:Field"); 3801var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"value:Field"); 3850var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 3916var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"1.00Literal"); 3986var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4127var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4187var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"1.00Literal"); 4283var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4370var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4452var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @"1.00Literal"); 4532var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4596var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4687var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4743var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4807var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4850var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4896var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4942var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 4994var verifier = CompileAndVerifyOnCorrectPlatforms(comp, expectedOutput: @" 6478var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 6504static void verifyIL(string extraConstructorArg, CompilationVerifier verifier) 6604var verifier = base.CompileAndVerify((Compilation)comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: expectedOutput); 6626static void verifyIL(string extraConstructorArg, CompilationVerifier verifier) 6744var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 6903var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 7038var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 7177var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 7282var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: "CustomHandler").VerifyDiagnostics(); 7416var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 7534var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 7654var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 7779var verifier = CompileAndVerify(comp, expectedOutput: @" 7945var verifier = CompileAndVerify( 8058var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: "1literal:literal", symbolValidator: validator, sourceSymbolValidator: validator); 8143var verifier = CompileAndVerify(comp, expectedOutput: @" 8279var verifier = CompileAndVerify(comp, expectedOutput: @"s.I:1"); 8347var verifier = CompileAndVerify(comp, expectedOutput: @"s.I:2"); 8432var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, handler }, expectedOutput: @" 8485var verifier = CompileAndVerify(comp, sourceSymbolValidator: validator, symbolValidator: validator, expectedOutput: @" 8583var verifier = CompileAndVerify(comp, expectedOutput: @" 8876var verifier = CompileAndVerify(comp, expectedOutput: @" 9141var verifier = CompileAndVerify(comp, expectedOutput: @" 9400var verifier = CompileAndVerify(comp, expectedOutput: @" 9525var verifier = CompileAndVerify(comp, expectedOutput: @" 9756var verifier = CompileAndVerify(comp, expectedOutput: @"literal:literal"); 9810var verifier = CompileAndVerify(comp, expectedOutput: @"1"); 9866var verifier = CompileAndVerify(comp); 9925var verifier = CompileAndVerify(comp); 9985var verifier = CompileAndVerify(comp); 10047var verifier = CompileAndVerify(comp); 10109var verifier = CompileAndVerify(comp); 10206var verifier = CompileAndVerify(comp, expectedOutput: "c.i:1"); 10537var verifier = CompileAndVerify(comp, expectedOutput: "d:1"); 10588var verifier = CompileAndVerify(comp, expectedOutput: "ctor"); 10639var verifier = CompileAndVerify(comp, expectedOutput: "ctor"); 10684var verifier = CompileAndVerify(comp, expectedOutput: "AppendLiteral"); 10735var verifier = CompileAndVerify(comp, expectedOutput: "AppendFormatted"); 10791var verifier = CompileAndVerify(comp, expectedOutput: @" 10884var verifier = CompileAndVerify(comp, expectedOutput: @" 11339var verifier = CompileAndVerify(comp, expectedOutput: @" 11385var verifier = CompileAndVerify(comp, expectedOutput: @" 11439var verifier = CompileAndVerify(comp, expectedOutput: @" 11477var verifier = CompileAndVerify(comp, expectedOutput: @" 11515var verifier = CompileAndVerify(comp, expectedOutput: @" 11554var verifier = CompileAndVerify(comp, expectedOutput: @" 11733var verifier = CompileAndVerify(comp, expectedOutput: @" 11807var verifier = CompileAndVerify(comp, expectedOutput: @" 12174var verifier = CompileAndVerify(code, expectedOutput: @"123456"); 12192var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringHandlerDefinition(includeSpanOverloads: false, useDefaultParameters: false, useBoolReturns: false) }, expectedOutput: @" 12323var verifier = CompileAndVerify(comp, expectedOutput: @"123456123456"); 12486var verifier = CompileAndVerify(comp, expectedOutput: @" 12553var verifier = CompileAndVerify(comp, expectedOutput: @" 12643var verifier = CompileAndVerify(new[] { code, GetInterpolatedStringCustomHandlerType("CustomHandler", "struct", useBoolReturns: false) }, expectedOutput: @" 12751var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 12818var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @""); 12937var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: @"i:1"); 12992var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 13033var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"1"); 13086var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 13132var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, InterpolatedStringHandlerAttribute }, expectedOutput: @"12"); 13252var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1"); 13285var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "2"); 13338var verifier = CompileAndVerify(new[] { code, InterpolatedStringHandlerArgumentAttribute, GetInterpolatedStringCustomHandlerType("CustomHandler", "partial struct", useBoolReturns: false) }, expectedOutput: "s.Field:1");
Semantics\ReadOnlyStructsTests.cs (5)
333var comp = CompileAndVerify(csharp); 619var verifier = CompileAndVerify(csharp, expectedOutput: "123"); 661var verifier = CompileAndVerify(csharp, expectedOutput: "123"); 798var verifier = CompileAndVerify(csharp, expectedOutput: 1036var verifier = CompileAndVerify(csharp, expectedOutput: "123");
Semantics\RecordStructTests.cs (54)
30private CompilationVerifier CompileAndVerify( 48var verifier = CompileAndVerify(src).VerifyDiagnostics(); 104var verifier = CompileAndVerify(src, expectedOutput: @"0 124var verifier = CompileAndVerify(src, expectedOutput: @"False") 211var verifier = CompileAndVerify(comp, expectedOutput: @"True 886var verifier = CompileAndVerify(comp, expectedOutput: "42"); 941var verifier = CompileAndVerify(src); 1743var verifier = CompileAndVerify(src, expectedOutput: @"12345").VerifyDiagnostics(); 1807var verifier = CompileAndVerify(src, expectedOutput: @"12345").VerifyDiagnostics(); 1902var verifier = CompileAndVerify(src, parseOptions: TestOptions.Regular11); 2169var verifier = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, verify: Verification.Skipped); 2587var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 2691var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 2741var verifier = CompileAndVerify(comp, expectedOutput: "(42, 43)"); 2826var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 2867var verifier = CompileAndVerify(new[] { src, IsExternalInitTypeDefinition }, parseOptions: TestOptions.Regular11, verify: Verification.Skipped); 2899var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 3390var verifier = CompileAndVerify(source, expectedOutput: "12"); 3448var verifier = CompileAndVerify(source, expectedOutput: "1"); 3485var verifier = CompileAndVerify(source, expectedOutput: "123"); 3546var verifier = CompileAndVerify(source, expectedOutput: "32"); 3782var verifier = CompileAndVerify(source, expectedOutput: "12"); 3847var verifier = CompileAndVerify(source, expectedOutput: "12"); 4274var verifier = CompileAndVerify(comp, expectedOutput: "TrueTrue"); 4525var verifier = CompileAndVerify(comp, expectedOutput: "TrueTrue - FalseFalseFalseFalse - FalseFalseFalseFalse"); 4622var verifier = CompileAndVerify(comp); 4865var verifier = CompileAndVerify(source, expectedOutput: @" 5109var v = CompileAndVerify(comp, expectedOutput: "C1 { }"); 5313var v = CompileAndVerify(comp, expectedOutput: "C1 { field = 42 }"); 5370var v = CompileAndVerify(comp, expectedOutput: "C1 { field = 42 }"); 5411var v = CompileAndVerify(comp, expectedOutput: "C1 { field = hello }"); 5455var v = CompileAndVerify(comp, expectedOutput: "C1 { I = 42, field1 = hi, field2 = }"); 5511var v = CompileAndVerify(comp, expectedOutput: "C1 { I = 42 }", verify: Verification.Skipped /* init-only */); 6877var verifier = CompileAndVerify(comp, expectedOutput: "42 1"); 7462var verifier = CompileAndVerify(comp, expectedOutput: "42"); 7501var verifier = CompileAndVerify(src, parseOptions: TestOptions.Regular11); 7548var verifier = CompileAndVerify(comp, expectedOutput: "42"); 7589var verifier = CompileAndVerify(comp, expectedOutput: "42"); 7624var verifier = CompileAndVerify(comp, expectedOutput: "4243", verify: Verification.Skipped /* init-only */); 7664var verifier = CompileAndVerify(comp, expectedOutput: "4243"); 7698var verifier = CompileAndVerify(comp, expectedOutput: "4243"); 7732var verifier = CompileAndVerify(comp, expectedOutput: "4243"); 8139var verifier = CompileAndVerify(src, expectedOutput: @" 8227var verifier = CompileAndVerify(comp, expectedOutput: "Identity({ A = 10, B = 20 }) Identity(30) Identity(40) { A = 30, B = 40 }"); 8403var verifier = CompileAndVerify(comp, expectedOutput: "Identity({ A = 10, B = 20 }) Identity(40) Identity(30) { A = 30, B = 40 }"); 8578var verifier = CompileAndVerify(comp, expectedOutput: "M2 { A = 10, B = 20 }"); 8749var verifier = CompileAndVerify(comp, expectedOutput: "{ A = 10, B = 30 }"); 8946var verifier = CompileAndVerify(comp, expectedOutput: "{ A = 10, B = 30 }"); 10447var verifier = CompileAndVerify(comp, expectedOutput: "{ Property = 44 }"); 10462var verifier = CompileAndVerify(comp, expectedOutput: "{ Item = { Property = 44 } }"); 10512var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 10552var verifier = CompileAndVerify(comp, expectedOutput: "42 - 42"); 10869var verifier = CompileAndVerify(source, expectedOutput: 11071var verifier = CompileAndVerify(source, expectedOutput:
Semantics\RecordTests.cs (115)
27private CompilationVerifier CompileAndVerify( 876var verifier = CompileAndVerify(src, expectedOutput: @" 1558var verifier = CompileAndVerify(src, expectedOutput: "True"); 1609var verifier = CompileAndVerify(src, expectedOutput: "True", parseOptions: TestOptions.Regular10); 1689var verifier = CompileAndVerify(src, expectedOutput: "12"); 2016var verifier = CompileAndVerify(src, expectedOutput: @"0 2055var verifier = CompileAndVerify(src, expectedOutput: @"0 1 2095var verifier = CompileAndVerify(src, expectedOutput: @"0 1 2379var verifier = CompileAndVerify(src, expectedOutput: "2").VerifyDiagnostics(); 2426var verifier = CompileAndVerify( 4923var v = CompileAndVerify(comp, expectedOutput: "C1 { }"); 4998var v = CompileAndVerify(comp, expectedOutput: "C1 { }"); 5075var v = CompileAndVerify(comp, expectedOutput: "C1 { }"); 5460var v = CompileAndVerify(comp, expectedOutput: "C1 { field = 42 }"); 5515var v = CompileAndVerify(comp, expectedOutput: "C1 { field = 42 }"); 5554var v = CompileAndVerify(comp, expectedOutput: "C1 { field = hello }"); 5595var v = CompileAndVerify(comp, expectedOutput: "C1 { field = hello } C1 { field = 42 }", verify: Verification.Skipped /* init-only */); 5677var v = CompileAndVerify(comp, expectedOutput: "C1 { field1 = hi, field2 = }"); 5731var v = CompileAndVerify(comp, expectedOutput: "C1 { Property = 42 }", verify: Verification.Skipped /* init-only */); 5795var v = CompileAndVerify(comp, expectedOutput: "C1 { A1 = 42, A2 = 100, B1 = 43, B2 = 101 }", verify: Verification.Skipped /* init-only */); 7647var verifier = CompileAndVerify(source, expectedOutput: @"1 7689var verifier = CompileAndVerify(source, expectedOutput: @"1 7729var verifier = CompileAndVerify(source, expectedOutput: @"1 7763var verifier = CompileAndVerify(source, expectedOutput: @"1 7797var verifier = CompileAndVerify(source, expectedOutput: @"1 7832var verifier = CompileAndVerify(source, expectedOutput: @"1 8066var verifier = CompileAndVerify(src, expectedOutput: @" 8243var verifier = CompileAndVerify(src, expectedOutput: "11").VerifyDiagnostics(); 8289var verifier = CompileAndVerify(src, expectedOutput: @" 8341var verifier = CompileAndVerify(src, expectedOutput: @" 8423var verifier = CompileAndVerify(src, expectedOutput: @" 9513var verifier = CompileAndVerify(src, expectedOutput: @" 9544var verifier = CompileAndVerify(@" 9593var verifier = CompileAndVerify(src, expectedOutput: @" 10595var verifier = CompileAndVerify(comp, expectedOutput: "(, )").VerifyDiagnostics( 11347var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 11561var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 11797var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 12601var verifierA = CompileAndVerify(compA, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12641var verifierB = CompileAndVerify(compB, expectedOutput: "(1, 2, 3, 4) (1, 2, 3, 4) (10, 2, 30, 4)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12693var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 3, 4) (10, 20, 30, 40)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12750var verifier = CompileAndVerify(comp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12782var verifier = CompileAndVerify(comp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics( 12837var verifier = CompileAndVerify(comp).VerifyDiagnostics(); 12909var verifier = CompileAndVerify(comp, expectedOutput: "(2, 0)").VerifyDiagnostics( 12952var verifier = CompileAndVerify(comp, expectedOutput: "(2, 100) RAN (0, 0)").VerifyDiagnostics( 13010var verifier = CompileAndVerify(comp, expectedOutput: "RAN", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13065var verifier = CompileAndVerify(comp, expectedOutput: "1 RAN 2", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13187var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 42) RAN (10, 20, 42)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13227var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 42) (10, 20, 42)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13504var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 3, 4, 100, 200)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 14102var verifier = CompileAndVerify(source, expectedOutput: "12"); 14160var verifier = CompileAndVerify(source, expectedOutput: "1"); 14197var verifier = CompileAndVerify(source, expectedOutput: "123"); 14258var verifier = CompileAndVerify(source, expectedOutput: "32"); 14378var verifier = CompileAndVerify(source, expectedOutput: "02"); 14592var verifier = CompileAndVerify(source, expectedOutput: "1"); 14670var verifier = CompileAndVerify(source, expectedOutput: "0101"); 14719var verifier = CompileAndVerify(source, expectedOutput: "01201"); 14768var verifier = CompileAndVerify(source, expectedOutput: "0101"); 14852var verifier = CompileAndVerify(source, expectedOutput: "0123456"); 15074var verifier = CompileAndVerify(source, expectedOutput: "12"); 15109var verifier = CompileAndVerify(source, expectedOutput: "12"); 15141var verifier = CompileAndVerify(source, expectedOutput: "12"); 15244var verifier = CompileAndVerify(source, expectedOutput: "12"); 15284var verifier = CompileAndVerify(source, expectedOutput: "123"); 15361var verifier = CompileAndVerify(source, expectedOutput: "1"); 15440var verifier = CompileAndVerify(source, expectedOutput: "12"); 15476var verifier = CompileAndVerify(source, expectedOutput: "12"); 15621var verifier = CompileAndVerify(source, expectedOutput: "1"); 15655var verifier = CompileAndVerify(source, expectedOutput: "2"); 19023var verifier = CompileAndVerify(comp, expectedOutput: modifiers == "abstract " ? null : 19096var verifier = CompileAndVerify(comp, expectedOutput: modifiers == "abstract " ? null : 20330var verifier = CompileAndVerify(source, expectedOutput: 20435var verifier = CompileAndVerify(source, expectedOutput: 20863var verifier = CompileAndVerify(src2, 21033var verifier = CompileAndVerify(RuntimeUtilities.IsCoreClrRuntime ? src2 : new[] { src2, IsExternalInitTypeDefinition }, 21123var verifier = CompileAndVerify(src, expectedOutput: @" 21370var verifier = CompileAndVerify(src, expectedOutput: @" 22058var verifier = CompileAndVerify(src, expectedOutput: @" 22127var verifier = CompileAndVerify(src, expectedOutput: @"1").VerifyDiagnostics(); 22545var verifier = CompileAndVerify(comp, expectedOutput: 22614var verifier = CompileAndVerify(source, expectedOutput: 22705var verifier = CompileAndVerify(comp, expectedOutput: 22818var verifier = CompileAndVerify(comp, expectedOutput: 22931var verifier = CompileAndVerify(comp, expectedOutput: 23031var verifier = CompileAndVerify(comp, expectedOutput: 23218var verifier = CompileAndVerify(source, expectedOutput: 23386var verifier = CompileAndVerify(comp, expectedOutput: 23843var verifier = CompileAndVerify(comp, expectedOutput: 24647var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 24751var verifier = CompileAndVerify(src, expectedOutput: @"2").VerifyDiagnostics(); 24798var verifier = CompileAndVerify(src, expectedOutput: @" 24978var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 25015var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Skipped /* init-only */); 25045var verifier = CompileAndVerify(comp, expectedOutput: "42", verify: Verification.Skipped /* init-only */); 25107var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25167var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25244var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25301var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25376var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25460var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25530var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator, 25598var comp = CompileAndVerify(new[] { source, IsExternalInitTypeDefinition }, expectedOutput: "Main", 27733var verifier = CompileAndVerify(src, expectedOutput: "True"); 27786var verifier = CompileAndVerify(src, expectedOutput: "True"); 28042var verifier = CompileAndVerify(comp); 29229var verifier = CompileAndVerify(comp, expectedOutput: "42 - 42"); 29261var verifier = CompileAndVerify(comp, expectedOutput: "43 - 43"); 29296var verifier = CompileAndVerify(comp, expectedOutput: "42 - 42", verify: Verification.Skipped /* init-only */); 29354var verifier = CompileAndVerify(comp, expectedOutput: "42"); 29392var verifier = CompileAndVerify(comp, expectedOutput: "42"); 29426var verifier = CompileAndVerify(comp, expectedOutput: "42"); 29768var verifier = CompileAndVerify(comp, expectedOutput: "42"); 29805var verifier = CompileAndVerify(comp, expectedOutput: "42");
Semantics\RefEscapingTests.cs (6)
1024var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3740var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3790var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3840var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3922var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 4026var compiled = CompileAndVerify(comp, verify: Verification.Passes);
Semantics\RefExtensionMethodsTests.cs (4)
103var verifier = CompileAndVerify(code, expectedOutput: "2"); 155var verifier = CompileAndVerify(code, expectedOutput: "2"); 1527var verifier = CompileAndVerify(compilation, expectedOutput: "10"); 1583var verifier = CompileAndVerify(compilation, expectedOutput: "0");
Semantics\RefFieldTests.cs (50)
211var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 285var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 426var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 829var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 936var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1110var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1168var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1284var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1321var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1355var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1400var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1445var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1690var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1728var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1765var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1805var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1843var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("explicit ctor")); 1988var verifier = CompileAndVerify(compB, verify: Verification.Skipped); 2538var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 5990var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 6395var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 6797var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 6922var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 7923var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 7969var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8126var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8195var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8232var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8269var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8314var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("2")); 8364var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8433var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8504var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8567var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 8641var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput(@"(1, Hello world)")); 9259var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 9648var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput( 17701var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 18312var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 19868var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")); 20618var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")); 20792var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("4242")); 20916var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("4242")); 21247var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: IncludeExpectedOutput("42")); 27797var verifier = CompileAndVerify(comp, expectedOutput: 27870var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: 28074var verifier = CompileAndVerify(comp, expectedOutput: "(3, 3)"); 28841var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, expectedOutput: "0"); 28898var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, expectedOutput: "0"); 28972var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, expectedOutput: """
Semantics\RefLocalsAndReturnsTests.cs (2)
2367var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 2435var verifier = CompileAndVerify(comp, verify: Verification.Skipped);
Semantics\ScriptSemanticsTests.cs (3)
121var compiled = CompileAndVerify(script); 167var compiled = CompileAndVerify(script); 213var compiled = CompileAndVerify(script);
Semantics\SemanticErrorTests.cs (9)
4557var compilationVerifier = CompileAndVerify(compilation1); 6478var verifier = CompileAndVerify(text, parseOptions: TestOptions.Regular11); 6990var verifier = CompileAndVerify(text, parseOptions: TestOptions.Regular11). 7104var verifier = CompileAndVerify(source, new[] { CSharpRef }, parseOptions: TestOptions.Regular11); 7175var verifier = CompileAndVerify(source, new[] { CSharpRef }, parseOptions: TestOptions.Regular11); 7799var compilationVerifier = CompileAndVerify(compilation1); 12932var verifier = CompileAndVerify(text, parseOptions: TestOptions.Regular11); 16035var c = CompileAndVerify(text, expectedOutput: "7788", verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe); 20373var verifier = CompileAndVerify(source: text, expectedOutput: @"ffffffffffffffffffffffffffffffffffffffffffffffff
Semantics\StructConstructorTests.cs (43)
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: "(, )"); 2089var verifier = CompileAndVerify(comp, 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: 3179var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: 3907var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular11); 3946var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: "explicit ctor"); 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)); 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\SwitchTests.cs (4)
1113var comp = CompileAndVerify(text, expectedOutput: ""); 2857var comp = CompileAndVerify(source, expectedOutput: @"1001"); 2890var comp = CompileAndVerify(source, expectedOutput: @"1001"); 2986var comp = CompileAndVerify(text, expectedOutput: "1 1 1 1");
Semantics\TopLevelStatementsTests.cs (10)
5644var verifier = CompileAndVerify(comp, expectedOutput: "42"); 6064var verifier = CompileAndVerify( 6135var verifier = CompileAndVerify( 9307var verifier = CompileAndVerify(comp, expectedOutput: "42"); 9339var verifier = CompileAndVerify(comp, expectedOutput: "42"); 9355var verifier = CompileAndVerify(comp, expectedOutput: "42"); 9371var verifier = CompileAndVerify(comp, expectedOutput: "42"); 9387var verifier = CompileAndVerify(comp, expectedOutput: "42"); 9464var verifier = CompileAndVerify(comp, expectedOutput: "42"); 9586var verifier = CompileAndVerify(comp, expectedOutput: "Program");
Semantics\UninitializedNonNullableFieldTests.cs (5)
874var verifier = CompileAndVerify(source, options: WithNullableEnable(), parseOptions: TestOptions.Regular11); 1015var verifier = CompileAndVerify(comp, expectedOutput: "ok"); 1065var verifier = CompileAndVerify(source, parseOptions: TestOptions.Regular11); 1131var verifier = CompileAndVerify(comp, expectedOutput: "ok ok ok ok"); 1797var verifier = CompileAndVerify(new[] { source }, options: WithNullableEnable(), parseOptions: TestOptions.Regular11);
Semantics\UnsafeTests.cs (3)
3176var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 9251var compilation = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 9368var compilation = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails);
Semantics\UserDefinedConversionTests.cs (12)
1157var verifier = CompileAndVerify(source: source1 + source3 + source5, options: TestOptions.UnsafeReleaseExe, expectedOutput: ""); 1284var verifier = CompileAndVerify(source, expectedOutput: "23"); 1310var verifier = CompileAndVerify(source, expectedOutput: "a"); 1343var verifier = CompileAndVerify(source, expectedOutput: "b"); 1369var verifier = CompileAndVerify(source, expectedOutput: "1"); 1439var verifier = CompileAndVerify(source, expectedOutput: "a"); 1471var verifier = CompileAndVerify(source: source1, expectedOutput: ""); 1719var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1772var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1829var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 1864var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Skipped); 1909var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Skipped);
Semantics\UsingDeclarationTests.cs (4)
626var verifier = CompileAndVerify(source, expectedOutput: """ 695var verifier = CompileAndVerify(source); 727var verifier = CompileAndVerify(source, expectedOutput: """ 762var verifier = CompileAndVerify(source, expectedOutput: """
Semantics\Utf8StringsLiteralsTests.cs (19)
417var verifier = CompileAndVerify(comp, expectedOutput: @" 1650var verifier = CompileAndVerify(comp, expectedOutput: @" 1703var verifier = CompileAndVerify(comp, expectedOutput: @" 1756var verifier = CompileAndVerify(comp, expectedOutput: @" 1818var verifier = CompileAndVerify(comp, expectedOutput: @" 1878var verifier = CompileAndVerify(comp, expectedOutput: @" 2005var verifier = CompileAndVerify(comp, expectedOutput: @" 2038var verifier = CompileAndVerify(comp, expectedOutput: "{ 0x63 0x61 0x74 }", verify: Verification.Fails).VerifyDiagnostics(); 3331var verifier = CompileAndVerify(comp, verify: Verification.Fails).VerifyDiagnostics(); 3367var verifier = CompileAndVerify(comp, verify: Verification.Fails).VerifyDiagnostics(); 3430var verifier = CompileAndVerify(comp, expectedOutput: @"ArgumentOutOfRangeException", verify: Verification.Fails).VerifyDiagnostics(); 3478var verifier = CompileAndVerify(comp, expectedOutput: @" 3520var verifier = CompileAndVerify(comp, expectedOutput: @" 3569var verifier = CompileAndVerify(comp, expectedOutput: @" 3618var verifier = CompileAndVerify(comp, expectedOutput: @" 3668var verifier = CompileAndVerify(comp, expectedOutput: @" 3715var verifier = CompileAndVerify(comp, expectedOutput: @" 3756var verifier = CompileAndVerify(comp, expectedOutput: @" 4045var verifier = CompileAndVerify(comp, expectedOutput: @"
Semantics\WarningVersionTests.cs (6)
154var verifier = CompileAndVerify( 232var verifier = CompileAndVerify( 318var verifier = CompileAndVerify( 442var verifier = CompileAndVerify( 529var verifier = CompileAndVerify( 616var verifier = CompileAndVerify(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (223)
DocumentationComments\DocumentationCommentCompilerTests.cs (4)
1282var verifier = CompileAndVerify(compilation, symbolValidator: module => 1339var verifier = CompileAndVerify(compilation, symbolValidator: module => 1402var verifier = CompileAndVerify(compilation, symbolValidator: module => 1465var verifier = CompileAndVerify(compilation, symbolValidator: module =>
Symbols\AnonymousTypesSymbolTests.cs (1)
45var verifier = CompileAndVerify(
Symbols\CheckedUserDefinedOperatorsTests.cs (7)
3932var verifier = CompileAndVerify(compilation1, expectedOutput: @" 4036var verifier = CompileAndVerify(compilation1, expectedOutput: @" 4892var verifier = CompileAndVerify(compilation1, expectedOutput: @" 5002var verifier = CompileAndVerify(compilation1, expectedOutput: @" 5770var verifier = CompileAndVerify(compilation1, expectedOutput: 6038var verifier = CompileAndVerify(compilation1, expectedOutput: 6154var verifier = CompileAndVerify(compilation1, expectedOutput:
Symbols\ConversionTests.cs (1)
2031var verifier = CompileAndVerify(comp, expectedOutput:
Symbols\CovariantReturnTests.cs (3)
1570var c = CompileAndVerify(SourceView(comp, assignments), verify: Verification.Skipped); 3240var verifier = CompileAndVerify(comp, verify: Verification.Skipped); 3403var verifier = CompileAndVerify(comp, verify: Verification.Skipped);
Symbols\CSharpCompilerFeatureRequiredTests.cs (1)
68protected override CompilationVerifier CompileAndVerify(CSharpCompilation compilation)
Symbols\DefaultInterfaceImplementationTests.cs (5)
49799var verifier = CompileAndVerify(compilation1, expectedOutput: !ExecutionConditionUtil.IsMonoOrCoreClr ? null : @"M1", verify: VerifyOnMonoOrCoreClr); 50661var verifier = CompileAndVerify(compilation0, expectedOutput: !ExecutionConditionUtil.IsMonoOrCoreClr ? null : @"M1", verify: VerifyOnMonoOrCoreClr); 50714var verifier = CompileAndVerify(compilation0, expectedOutput: !ExecutionConditionUtil.IsMonoOrCoreClr ? null : @"M1", verify: VerifyOnMonoOrCoreClr); 50767var verifier = CompileAndVerify(compilation0, expectedOutput: !ExecutionConditionUtil.IsMonoOrCoreClr ? null : @"A", verify: VerifyOnMonoOrCoreClr); 68955var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70,
Symbols\ExtendedPartialMethodsTests.cs (20)
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"); 1136var verifier = CompileAndVerify( 1246var verifier = CompileAndVerify(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, expectedOutput: "1"); 1506var verifier = CompileAndVerify( 1542var verifier = CompileAndVerify( 1987var verifier = CompileAndVerify( 2014var verifier = CompileAndVerify( 2084var verifier = CompileAndVerify( 2138var verifier = CompileAndVerify( 2203var verifier = CompileAndVerify( 2246var verifier = CompileAndVerify( 2258var verifier = CompileAndVerify( 2287var verifier = CompileAndVerify( 2299var verifier = CompileAndVerify( 2345var verifier = CompileAndVerify( 2394var verifier = CompileAndVerify( 2428var verifier = CompileAndVerify(source2, references: new[] { reference }, parseOptions: TestOptions.RegularWithExtendedPartialMethods); 2486var verifier = CompileAndVerify(
Symbols\ExtensionMethodTests.cs (9)
879var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify); 946var compilation = CompileAndVerify(source, verify: Verification.FailsILVerify); 2141var compilation = CompileAndVerify(source, expectedOutput: 2263var compilation = CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: "orange, apple"); 2302var compilation = CompileAndVerify(source, expectedOutput: 2383var compilation = CompileAndVerify(source, expectedOutput: 2653var compilation = CompileAndVerify(source, expectedOutput: 2752private CompilationVerifier CompileAndVerify(string source, string expectedOutput = null, Action<ModuleSymbol> validator = null, 3303var compilationVerifier = CompileAndVerify(compilation1);
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1389var verifier = CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Skipped);
Symbols\GenericConstraintConversionTests.cs (2)
867var compilation = CompileAndVerify(source); 921var compilation = CompileAndVerify(source);
Symbols\GenericConstraintTests.cs (14)
1140var compilation = CompileAndVerify(source, expectedOutput: 1203var compilation = CompileAndVerify(source); 1243var compilation = CompileAndVerify(source); 1295var compilation = CompileAndVerify(source, expectedOutput: 1351var compilation = CompileAndVerify(source); 1467var compilation = CompileAndVerify(source, expectedOutput: 1586var compilation = CompileAndVerify(source, expectedOutput: 1653var compilation = CompileAndVerify(source, expectedOutput: "2, 1"); 1713var compilation = CompileAndVerify(source, expectedOutput: "1, 2"); 2464var compilation = CompileAndVerify(source, expectedOutput: 2525var compilation = CompileAndVerify(source); 4539var compilation = CompileAndVerify(source, expectedOutput: 5092var compilation = CompileAndVerify(source); 5693var csVerifier = CompileAndVerify(csCompilation);
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 (2)
124var compilation = CompileAndVerify(source); 2793var compilation2 = CompileAndVerify(source2, references: new[] { reference1 }, expectedOutput:
Symbols\Metadata\PE\TypeForwarders.cs (3)
1457var verifier1 = CompileAndVerify(comp1); 1499var verifier2 = CompileAndVerify(comp2, symbolValidator: metadataValidator, sourceSymbolValidator: metadataValidator); 1766var verifier2 = CompileAndVerify(comp2, symbolValidator: metadataValidator);
Symbols\ModuleInitializers\ModuleInitializersTests.cs (6)
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(
Symbols\RequiredMembersTests.cs (10)
491var verifier = CompileAndVerify(comp, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 609var verifier = CompileAndVerify(comp, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 661var verifier = CompileAndVerify(comp, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 704var verifier = CompileAndVerify(comp, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 740var verifier = CompileAndVerify(comp, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 1404var verifier = CompileAndVerify(comp, verify: Verification.Skipped, sourceSymbolValidator: symbolValidator, symbolValidator: symbolValidator); 3317var verifier = CompileAndVerify(comp, symbolValidator: verify, sourceSymbolValidator: verify); 3346var verifier = CompileAndVerify(comp, symbolValidator: verify, sourceSymbolValidator: verify); 3375var verifier = CompileAndVerify(comp, symbolValidator: verify, sourceSymbolValidator: verify); 3405var verifier = CompileAndVerify(comp, symbolValidator: verify, sourceSymbolValidator: verify);
Symbols\Source\EventTests.cs (5)
301var compVerifier = CompileAndVerify(text, expectedOutput: "T1H1H2T2H2T3T4H1H2T5H2T6"); 492var compilationVerifier = CompileAndVerify(source: source, references: new[] { TargetFrameworkUtil.StandardCSharpReference, libAssemblyRef }, 519var compilationVerifier = CompileAndVerify(source: source, 578var compilationVerifier = CompileAndVerify( 810var compVerifier = CompileAndVerify(source, new[] { TargetFrameworkUtil.StandardCSharpReference, CompileIL(ilSource) },
Symbols\Source\ExpressionBodiedMethodTests.cs (3)
20var comp = CompileAndVerify(@" 341var verifier = CompileAndVerify(comp, expectedOutput: 370var verifier = CompileAndVerify(comp, expectedOutput:
Symbols\Source\ExpressionBodiedPropertyTests.cs (2)
445var verifier = CompileAndVerify(comp, expectedOutput: 475var verifier = CompileAndVerify(comp, sourceSymbolValidator: srcValidator);
Symbols\Source\FieldTests.cs (1)
477var verifier = new CompilationVerifier(compilation);
Symbols\Source\FileModifierTests.cs (27)
209var verifier = CompileAndVerify(source, expectedOutput: "1", symbolValidator: symbolValidator); 259var verifier = CompileAndVerify(new[] { ("", "file1.cs"), (source, "file2.cs") }, expectedOutput: "1", symbolValidator: symbolValidator); 306var verifier = CompileAndVerify(source, expectedOutput: "E2", symbolValidator: symbolValidator); 358var verifier = CompileAndVerify(source, expectedOutput: "(<>FE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855__E)1", symbolValidator: symbolValidator); 434var verifier = CompileAndVerify(source, expectedOutput: "(<>FE3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855__E)1", symbolValidator: symbolValidator); 495var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/MyFile.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: symbolValidator); 538var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/My<>File.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: symbolValidator); 569var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/MyGeneratedFile.g.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: symbolValidator); 808var verifier = CompileAndVerify(comp, expectedOutput: "1", symbolValidator: symbolValidator); 867var verifier = CompileAndVerify(SyntaxFactory.ParseSyntaxTree(source, options: TestOptions.RegularPreview, path: "path/to/My+File.cs", encoding: Encoding.Default), expectedOutput: "1", symbolValidator: validateSymbols); 928var verifier = CompileAndVerify(new[] { (source1 + main, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "1"); 1065var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs"), (main, "file3.cs") }, expectedOutput: "2"); 1131var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (main, "file2.cs") }, expectedOutput: "2"); 1193var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (main, "file2.cs") }, expectedOutput: "2"); 1646var verifier = CompileAndVerify(new[] { (userCode, "file1.cs"), (generatedCode, "file2.cs") }, expectedOutput: "OtherFile.csProgram.cs"); 1693var verifier = CompileAndVerify(new[] { (userCode, "file1.cs"), (generatedCode, "file2.cs") }, expectedOutput: "OtherFile.csProgram.cs"); 1737var verifier = CompileAndVerify(new[] { (userCode, "file1.cs"), (generatedCode, "file2.cs") }, expectedOutput: "OtherFile.cs"); 2213var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "2"); 2253var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "1"); 2634var verifier = CompileAndVerify(source, expectedOutput: "1"); 2771var verifier = CompileAndVerify(new[] { (usings, "file1.cs"), (source, "file2.cs"), (IsExternalInitTypeDefinition, "file3.cs") }, expectedOutput: "1"); 2907var verifier = CompileAndVerify(source, expectedOutput: "1"); 2941var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "1"); 2989var verifier = CompileAndVerify(new[] { (source1, "file1.cs"), (source2, "file2.cs") }, expectedOutput: "2"); 3347var verifier = CompileAndVerify(source, expectedOutput: "1"); 3368var verifier = CompileAndVerify(source, expectedOutput: "1"); 3389var verifier = CompileAndVerify(source, expectedOutput: "1");
Symbols\Source\PropertyTests.cs (5)
476var compilation = CompileAndVerify(source, new[] { s_propertiesDll }, expectedOutput: "0"); 662var compilation = CompileAndVerify(source, new[] { s_propertiesDll }, expectedOutput: "0"); 697var verifier = CompileAndVerify(source, new[] { s_propertiesDll }, expectedOutput: "0"); 2018var compilation2 = CompileAndVerify(source2, new[] { reference1 }); 2776var verifier = CompileAndVerify(
Symbols\Source\RecordTests.cs (18)
19private CompilationVerifier CompileAndVerify(CSharpTestSource src, string? expectedOutput = null) 298var verifier = CompileAndVerify(@" 351var verifier = CompileAndVerify(@" 415var verifier = CompileAndVerify(@" 434var verifier = CompileAndVerify(@" 454var verifier = CompileAndVerify(@" 522var verifier = CompileAndVerify(@" 548var verifier = CompileAndVerify(@" 609var verifier = CompileAndVerify(@" 671var verifier = CompileAndVerify(@" 753var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 806var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics(); 903var verifier = CompileAndVerify(comp, verify: Verification.FailsPEVerify).VerifyDiagnostics( 951var verifier = CompileAndVerify(@" 1036var v1 = CompileAndVerify(@" 1048var v2 = CompileAndVerify(@" 1171var verifier = CompileAndVerify(src).VerifyDiagnostics(); 1526var verifier = CompileAndVerify(comp, expectedOutput: "", verify: Verification.Passes).VerifyDiagnostics();
Symbols\StaticAbstractMembersInInterfacesTests.cs (46)
8394var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 8777var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 9318var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 9609var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10088var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10544var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10821var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 10993var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11206var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11371var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 11714var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 12001var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13157var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13242var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 13333var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14045var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 14547var verifier = CompileAndVerify(compilation2, verify: Verification.Skipped).VerifyDiagnostics(); 14685var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 15103var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 15375var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 16500var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16585var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 16789var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20816var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 20933var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21044var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21179var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 21596var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 24414var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 24603var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 24914var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 26942var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27143var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 27579var verifier = CompileAndVerify(compilation2, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29275var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 29391var verifier = CompileAndVerify(compilation1, sourceSymbolValidator: validate, symbolValidator: validate, verify: Verification.Skipped).VerifyDiagnostics(); 30174var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30353var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 30811var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31110var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31166var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31224var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31272var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31315var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31369var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics(); 31418var verifier = CompileAndVerify(compilation1, verify: Verification.Skipped).VerifyDiagnostics();
Symbols\SymbolErrorTests.cs (1)
18361var verifier = CompileAndVerify(comp, verify: Verification.Skipped).
Symbols\UnsignedRightShiftTests.cs (7)
112var verifier = CompileAndVerify(compilation1, expectedOutput: @" 1163var verifier = CompileAndVerify(compilation1, expectedOutput: @" 1976var verifier = CompileAndVerify(compilation1, expectedOutput: @">>>").VerifyDiagnostics(); 2228var verifier = CompileAndVerify(compilation1, expectedOutput: @">>>").VerifyDiagnostics(); 2370var verifier = CompileAndVerify(compilation1, expectedOutput: @"Passed 1").VerifyDiagnostics(); 2498var verifier = CompileAndVerify(compilation1, expectedOutput: @" 2596var verifier = CompileAndVerify(compilation1, expectedOutput: @"
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\LineSpanDirectiveTests.cs (1)
608var verifier = CompileAndVerify(source, options: TestOptions.DebugDll);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (13)
BasicCompilationUtils.cs (1)
26var verifier = Instance.CompileAndVerifyCommon(compilation, verify: verify);
CSharpTestBase.cs (12)
713internal CompilationVerifier CompileAndVerifyWithMscorlib40( 749internal CompilationVerifier CompileAndVerifyWithMscorlib46( 785internal CompilationVerifier CompileAndVerifyExperimental( 827internal CompilationVerifier CompileAndVerifyWithWinRt( 863internal CompilationVerifier CompileAndVerifyWithCSharp( 899internal CompilationVerifier CompileAndVerify( 936internal CompilationVerifier CompileAndVerify( 979internal CompilationVerifier CompileAndVerifyFieldMarshal(CSharpTestSource source, Dictionary<string, byte[]> expectedBlobs, bool isField = true) => 989internal CompilationVerifier CompileAndVerifyFieldMarshal(CSharpTestSource source, Func<string, PEAssembly, byte[]> getExpectedBlob, bool isField = true) => 1415public CompilationVerifier CompileWithCustomILSource(string cSharpSource, string ilSource, Action<CSharpCompilation> compilationVerifier = null, bool importInternals = true, string expectedOutput = null, TargetFramework targetFramework = TargetFramework.Standard) 1452internal CompilationVerifier CompileAndVerifyException<T>(string source, string expectedMessage = null, bool allowUnsafe = false, Verification verify = default) where T : Exception 1458internal CompilationVerifier CompileAndVerifyException<T>(CSharpCompilation comp, string expectedMessage = null, Verification verify = default) where T : Exception
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (33)
CodeGen\WinMdEventTests.cs (5)
180var verifier = CompileAndVerifyWithWinRt(source, options: TestOptions.ReleaseWinMD); 216var verifier = CompileAndVerifyWithWinRt(source, options: TestOptions.ReleaseWinMD); 280var verifier = CompileAndVerifyWithWinRt(source, parseOptions: TestOptions.Regular10, options: TestOptions.ReleaseWinMD); 373var verifier = CompileAndVerifyWithWinRt(source, parseOptions: TestOptions.Regular10, options: TestOptions.ReleaseWinMD); 462var verifier = CompileAndVerifyWithWinRt(source, options: TestOptions.ReleaseWinMD);
CodeGen\WinRTCollectionTests.cs (21)
90var verifier = this.CompileAndVerifyOnWin8Only(source, expectedOutput: expectedOutput); 188var verifier = this.CompileAndVerifyOnWin8Only( 253var verifier = this.CompileAndVerifyOnWin8Only( 436var verifier = CompileAndVerifyWithWinRt(source, 1833var verifier = CompileAndVerifyWithWinRt(source, 3194var verifier = CompileAndVerifyWithWinRt(source, 4437var verifier = CompileAndVerifyWithWinRt(source, 4803var verifier = CompileAndVerifyWithWinRt(source, 4989var verifier = CompileAndVerifyWithWinRt(source, 5186var verifier = CompileAndVerifyWithWinRt(source, 5407var verifier = CompileAndVerifyWithWinRt(source, 5544var verifier = CompileAndVerifyWithWinRt(source, 5814var verifier = CompileAndVerifyWithWinRt(source, 6041var verifier = CompileAndVerifyWithWinRt(source, 6240var verifier = CompileAndVerifyWithWinRt(source, 6599var verifier = CompileAndVerifyWithWinRt(source, 6759var verifier = CompileAndVerifyWithWinRt( 7031var verifier = CompileAndVerifyWithWinRt( 7158var verifier = CompileAndVerifyWithWinRt( 7279var verifier = CompileAndVerifyWithWinRt( 7358var verifier = CompileAndVerifyWithWinRt(source, options: TestOptions.ReleaseWinMD);
Metadata\WinMdEventTests.cs (5)
328var verifier = this.CompileAndVerify( 2441var verifier = CompileAndVerify( 2577var cv = this.CompileAndVerifyOnWin8Only(text); 2637var cv = this.CompileAndVerifyOnWin8Only(text); 2701var cv = this.CompileAndVerifyOnWin8Only(text);
Metadata\WinMdMetadataTests.cs (1)
206var verifier = this.CompileAndVerifyOnWin8Only(source,
WinRTUtil.cs (1)
15internal static CompilationVerifier CompileAndVerifyOnWin8Only(
Microsoft.CodeAnalysis.Test.Utilities (16)
BaseCompilerFeatureRequiredTests.cs (1)
617protected abstract CompilationVerifier CompileAndVerify(TCompilation compilation);
CommonTestBase.cs (8)
70internal CompilationVerifier CompileAndVerifyCommon( 97CompilationVerifier result = null; 99var verifier = Emit(compilation, 129internal CompilationVerifier CompileAndVerifyFieldMarshalCommon(Compilation compilation, Dictionary<string, byte[]> expectedBlobs, bool isField = true) 141internal CompilationVerifier CompileAndVerifyFieldMarshalCommon(Compilation compilation, Func<string, PEAssembly, byte[]> getExpectedBlob, bool isField = true) 146internal static void RunValidators(CompilationVerifier verifier, Action<PEAssembly> assemblyValidator, Action<IModuleSymbol> symbolValidator) 171internal CompilationVerifier Emit( 185var verifier = new CompilationVerifier(compilation, VisualizeRealIL, dependencies);
CompilationVerifier.cs (7)
469public CompilationVerifier VerifyIL( 483public CompilationVerifier VerifyIL( 495public CompilationVerifier VerifyMethodBody( 531public CompilationVerifier VerifyMissing( 553private CompilationVerifier VerifyILImpl( 641public CompilationVerifier VerifyMemberInIL(string methodName, bool expected) 647public CompilationVerifier VerifyDiagnostics(params DiagnosticDescription[] expected)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (32)
Attributes\AttributeTests_MarshalAs.vb (2)
23Private Sub VerifyFieldMetadataDecoding(verifier As CompilationVerifier, blobs As Dictionary(Of String, Byte())) 45Private Sub VerifyParameterMetadataDecoding(verifier As CompilationVerifier, blobs As Dictionary(Of String, Byte()))
CodeGen\CodeGenSelectCase.vb (1)
15Private Shared Sub VerifySynthesizedStringHashMethod(compVerifier As CompilationVerifier, expected As Boolean)
CodeGen\CodeGenVBCore.vb (1)
3300) As CompilationVerifier
CodeGen\WinRTCollectionTests.vb (2)
6282Dim verifier As CompilationVerifier = CompileAndVerify(source, 6336Private Shared Sub AssertNoErrorsOrWarnings(verifier As CompilationVerifier)
Emit\CompilationEmitTests.vb (2)
889Dim reference = CompilationVerifier.LoadTestEmittedExecutableForSymbolValidation(image, OutputKind.DynamicallyLinkedLibrary) 964Dim reference = CompilationVerifier.LoadTestEmittedExecutableForSymbolValidation(image, OutputKind.DynamicallyLinkedLibrary)
Emit\DynamicAnalysis\DynamicInstrumentationTests.vb (22)
58Dim verifier As CompilationVerifier = CompileAndVerify(source, checker.ExpectedOutput) 161Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput, TestOptions.ReleaseExe.WithParseOptions(parseOptions)) 244Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 330Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 461Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 541Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 725Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1038Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1118Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1206Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1272Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1369Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1441Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1534Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1646Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1736Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 1869Dim verifier As CompilationVerifier = CompileAndVerify(source, expectedOutput) 2796Private Shared Sub AssertNotInstrumented(verifier As CompilationVerifier, qualifiedMethodName As String) 2800Private Shared Sub AssertInstrumented(verifier As CompilationVerifier, qualifiedMethodName As String, Optional expected As Boolean = True) 2814Private Overloads Function CompileAndVerify(source As XElement, Optional expectedOutput As XCData = Nothing, Optional options As VisualBasicCompilationOptions = Nothing) As CompilationVerifier 2822Private Overloads Function CompileAndVerify(source As XElement, Optional expectedOutput As String = Nothing, Optional options As VisualBasicCompilationOptions = Nothing) As CompilationVerifier 2830Private Overloads Function CompileAndVerify(source As String, Optional expectedOutput As String = Nothing, Optional options As VisualBasicCompilationOptions = Nothing) As CompilationVerifier
Emit\NoPiaEmbedTypes.vb (1)
4200Private Shared Sub AssertTheseDiagnostics(verifier As CompilationVerifier, diagnostics As XElement)
ExpressionTrees\CodeGenExprLambda.vb (1)
1819Optional verify As Verification = Nothing) As CompilationVerifier
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Metadata\PE\VisualBasicCompilerFeatureRequiredTests.vb (1)
81Protected Overrides Function CompileAndVerify(compilation As VisualBasicCompilation) As CompilationVerifier
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (14)
BasicTestBase.vb (14)
43) As CompilationVerifier 76Optional verify As Verification = Nothing) As CompilationVerifier 106Optional verify As Verification = Nothing) As CompilationVerifier 141) As CompilationVerifier 180) As CompilationVerifier 221) As CompilationVerifier 254) As CompilationVerifier 285) As CompilationVerifier 319) As CompilationVerifier 352Friend Function CompileWithCustomILSource(source As XElement, ilSource As XCData) As CompilationVerifier 369Optional expectedOutput As String = Nothing) As CompilationVerifier 396Optional isField As Boolean = True) As CompilationVerifier 405Optional isField As Boolean = True) As CompilationVerifier 418Optional isField As Boolean = True) As CompilationVerifier
Roslyn.Test.PdbUtilities (9)
Reader\PdbTestUtilities.cs (1)
26public static ISymUnmanagedReader3 CreateSymReader(this CompilationVerifier verifier)
Reader\PdbValidation.cs (8)
36public static CompilationVerifier VerifyPdb( 37this CompilationVerifier verifier, 50public static CompilationVerifier VerifyPdb( 51this CompilationVerifier verifier, 64public static CompilationVerifier VerifyPdb( 65this CompilationVerifier verifier, 79public static CompilationVerifier VerifyPdb( 80this CompilationVerifier verifier,