765 references to Fails
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (376)
CodeGen\CodeGenAsyncLocalsTests.cs (2)
1301var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1406verifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"1", verify: Verification.Fails);
CodeGen\CodeGenAsyncSpillTests.cs (4)
3713verify: Verification.Fails // localloc is not verifiable. 3720verify: Verification.Fails // localloc is not verifiable. 3755verify: Verification.Fails // localloc is not verifiable. 3762verify: Verification.Fails // localloc is not verifiable.
CodeGen\CodeGenAsyncTests.cs (5)
875CompileAndVerify(source, expectedOutput: "0", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 917CompileAndVerify(source, options: TestOptions.UnsafeDebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: debugSymbolValidator, verify: Verification.Fails) 919CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: releaseSymbolValidator, verify: Verification.Fails) 976CompileAndVerify(source, options: TestOptions.UnsafeDebugExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "11", symbolValidator: debugSymbolValidator, verify: Verification.Fails) 978CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe.WithMetadataImportOptions(MetadataImportOptions.All), expectedOutput: "10", symbolValidator: releaseSymbolValidator, verify: Verification.Fails)
CodeGen\CodeGenAwaitForeachTests.cs (1)
2563CompileAndVerify(comp, expectedOutput: "1 2 3 Done", verify: Verification.Fails);
CodeGen\CodeGenCheckedTests.cs (1)
391var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails);
CodeGen\CodeGenConditionalOperatorTests.cs (1)
3015CompileAndVerify(source, expectedOutput: expectedOutput, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails);
CodeGen\CodeGenDeconstructTests.cs (1)
7665CompileAndVerify(compilation, expectedOutput: "10", verify: Verification.Fails);
CodeGen\CodeGenDynamicTests.cs (4)
337CompileAndVerifyWithMscorlib40(source, new[] { systemCoreRef, csrtRef }, verify: Verification.Fails).VerifyIL("C.F", @" 9593", allowUnsafe: true, verify: Verification.Fails); 9663", allowUnsafe: true, verify: Verification.Fails); 9734", allowUnsafe: true, verify: Verification.Fails);
CodeGen\CodeGenExprLambdaTests.cs (1)
2481CompileAndVerifyUtil(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: TrimExpectedOutput(expectedOutput), verify: Verification.Fails);
CodeGen\CodeGenForEachTests.cs (3)
5367verify: Verification.Fails, 5407verify: Verification.Fails, 5453verify: Verification.Fails,
CodeGen\CodeGenInParametersTests.cs (24)
1130", verify: Verification.Fails); 752var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 800var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"42 854var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"42 917var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 938comp = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "42", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 977var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 998comp = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "42", parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 1038var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: "42"); 1089var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails, expectedOutput: @"hi 1126var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1333var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1376var comp = CompileAndVerify(text, parseOptions: TestOptions.Regular, verify: Verification.Fails); 1616var verifier = CompileAndVerify(text, verify: Verification.Fails, expectedOutput: "6"); 1752var result = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"47"); 1838result = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"47"); 1937CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2005CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2067CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2124CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2184CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2263CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2278CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2344var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"
CodeGen\CodeGenLocalFunctionTests.cs (4)
4635VerifyOutput(source, "2", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 4661VerifyOutput(source, "2", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 4688VerifyOutput(source, "2", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 4728VerifyOutput(src, $"10{Environment.NewLine}4", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails);
CodeGen\CodeGenMscorlib.cs (2)
765CompileAndVerify(comp, verify: Verification.Fails). 894CompileAndVerify(comp, verify: Verification.Fails).
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (3)
480CompileAndVerify(comp, expectedOutput: "BlueTrue", verify: Verification.Fails).VerifyIL("Test.Main", @" 610CompileAndVerify(comp, expectedOutput: "P10", verify: Verification.Fails).VerifyIL("Test.Main", @" 1626var verifier = CompileAndVerify(compilation, expectedOutput: "3402", verify: Verification.Fails with { ILVerifyMessage = ilVerifyMessage, PEVerifyMessage = peVerifyMessage });
CodeGen\CodeGenReadonlyStructTests.cs (12)
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"); 1092CompileAndVerify(comp, expectedOutput: "24", verify: Verification.Fails); 1109CompileAndVerify(comp, expectedOutput: "10", verify: Verification.Fails).VerifyIL("Test.Main", @" 1151CompileAndVerify(comp, expectedOutput: "12345", verify: Verification.Fails).VerifyIL("Test.Main", @" 1200CompileAndVerify(comp, expectedOutput: "30", verify: Verification.Fails).VerifyIL("Test.Main", @" 1261CompileAndVerify(comp, expectedOutput: "overflow", verify: Verification.Fails).VerifyIL("Test.M", expectedIL); 1267CompileAndVerify(comp, verify: Verification.Fails).VerifyIL("Test.M", expectedIL); 1298CompileAndVerify(comp, expectedOutput: "SpanOpCalled|PointerOpCalled", verify: Verification.Fails); 1320CompileAndVerify(comp, expectedOutput: "SpanOpCalled", verify: Verification.Fails); 2554CompileAndVerify(csharp, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "42"); 2561{ true, null, Verification.Fails }
CodeGen\CodeGenRefConditionalOperatorTests.cs (4)
93var comp = CompileAndVerify(source, expectedOutput: "44", verify: Verification.Fails); 250var comp = CompileAndVerify(source, expectedOutput: "67", verify: Verification.Fails); 1240verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 1355var verifier = CompileAndVerify(comp, expectedOutput: "0run", verify: Verification.Fails);
CodeGen\CodeGenRefLocalTests.cs (28)
37var verifier = CompileAndVerify(src, verify: Verification.Fails); 67verify: Verification.Fails); 92verify: Verification.Fails, 561}", verify: Verification.Fails, expectedOutput: @"42 1775CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M", @" 1893CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M<T>", @" 2172CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M()", @" 2205var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2276var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2428var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2495var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2843CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M()", @" 2880var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 2951var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3048var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3118CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M(ref int, ref int, object)", @" 3158var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3235var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3341var comp = CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails); 3450CompileAndVerify(text, options: TestOptions.DebugDll, verify: Verification.Fails).VerifyIL("Program.M(D, ref int, ref int, object)", @" 3612verify: Verification.Fails, targetFramework: TargetFramework.Net70); 3665verify: Verification.Fails, targetFramework: TargetFramework.Net70); 3879CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 4222verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4311var verifier = CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails); 4348verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4408verify(TestOptions.UnsafeDebugExe, Verification.Fails, @" 4462verify(TestOptions.UnsafeDebugExe, Verification.Fails, @"
CodeGen\CodeGenRefOutTests.cs (5)
543var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 630var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 692var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails); 778var verifier = CompileAndVerify(comp, expectedOutput: "0run", verify: Verification.Fails); 830var verifier = CompileAndVerify(comp, expectedOutput: "run", verify: Verification.Fails);
CodeGen\CodeGenRefReadonlyReturnTests.cs (13)
62var comp = CompileAndVerify(source, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails); 87comp = CompileAndVerify(source, verify: Verification.Fails); 294}", verify: Verification.Fails); 883var comp = CompileAndVerifyWithMscorlib40(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular, verify: Verification.Fails); 915comp = CompileAndVerify(text, new[] { ValueTupleRef, SystemRuntimeFacadeRef }, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature(), verify: Verification.Fails, targetFramework: TargetFramework.Mscorlib40); 1235}", verify: Verification.Fails).VerifyIL("Test.M", @" 1264}", verify: Verification.Fails).VerifyIL("Test.M", @" 1291}", verify: Verification.Fails).VerifyIL("Test.M", @" 1319}", verify: Verification.Fails).VerifyIL("Test.M", @" 1348}", verify: Verification.Fails).VerifyIL("Test.M", @" 1377}", verify: Verification.Fails).VerifyIL("Test.M", @" 1404}", verify: Verification.Fails).VerifyIL("Test.M", @" 1461}", verify: Verification.Fails, expectedOutput: "optional-provided");
CodeGen\CodeGenRefReturnTests.cs (15)
62}", verify: Verification.Fails, expectedOutput: @"42 131CompileAndVerify(text, parseOptions: TestOptions.Regular10, verify: Verification.Fails).VerifyIL("Program.M(out int)", @" 158CompileAndVerifyRef(text, verify: Verification.Fails).VerifyIL("Program.M(ref int)", @" 765var compilation = CompileAndVerifyRef(text, verify: Verification.Fails); 1303CompileAndVerifyRef(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 1492CompileAndVerifyRef(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("Program.Main()", @" 1643CompileAndVerify(text, parseOptions: TestOptions.Regular, expectedOutput: "42", verify: Verification.Fails).VerifyIL("Program.M()", @" 1716CompileAndVerify(text, parseOptions: TestOptions.Regular, expectedOutput: "42", verify: Verification.Fails).VerifyIL("Program.M()", @" 1902CompileAndVerifyRef(text, expectedOutput: "12", verify: Verification.Fails) 2000CompileAndVerifyRef(text, expectedOutput: "1234", verify: Verification.Fails) 2105CompileAndVerifyRef(text, expectedOutput: "1True", verify: Verification.Fails) 2203CompileAndVerifyRef(text, expectedOutput: "1TrueTrue1TrueTrueTrueTrue1TrueTrue", verify: Verification.Fails) 2969var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "2"); 3082var v = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "2"); 3633CompileAndVerify(text, expectedOutput: "37", parseOptions: TestOptions.Regular10, verify: Verification.Fails).VerifyIL("Program.Main()", @"
CodeGen\CodeGenShortCircuitOperatorTests.cs (3)
5181var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 5543var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput: @"--- 7324var comp = CompileAndVerify(source, options: TestOptions.DebugExe, expectedOutput: @"", verify: Verification.Fails);
CodeGen\CodeGenStackAllocInitializerTests.cs (32)
53verify: Verification.Fails).VerifyIL("Program.MakeBlock", 126verify: Verification.Fails).VerifyIL("Test.M<T>(T)", 216CompileAndVerify(comp, verify: Verification.Fails).VerifyIL("Test.M<T>(T)", 316verify: Verification.Fails).VerifyIL("C.Main", 371verify: Verification.Fails).VerifyIL("C.Main", 432verify: Verification.Fails).VerifyIL("C.Main", 530verify: Verification.Fails, expectedOutput: @"424242").VerifyIL("C.Main", 570verify: Verification.Fails, expectedOutput: @"ffffffffffffffffffffffff").VerifyIL("C.Main", 614verify: Verification.Fails, expectedOutput: @"ABCDDD").VerifyIL("C.Main", 672verify: Verification.Fails, expectedOutput: @"123456789").VerifyIL("C.Main", 728verify: Verification.Fails, expectedOutput: @"123").VerifyIL("C.Main", 870CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"123") 952verify: Verification.Fails, targetFramework: TargetFramework.Net70); 980verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1051CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @"123") 1108verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1137verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1162verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1207verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1236verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1264verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1292verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1319verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1347verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1372verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1498verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net70); 1524verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, targetFramework: TargetFramework.Net70).VerifyDiagnostics(); 1528verifier = CompileAndVerify(comp, expectedOutput: ExecutionConditionUtil.IsCoreClr ? output : null, verify: Verification.Fails); 1580verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe, targetFramework: TargetFramework.Net70); 1637verify: Verification.Fails, targetFramework: TargetFramework.Net70); 1674verify: Verification.Fails, targetFramework: TargetFramework.Net70, 1701verify: Verification.Fails,
CodeGen\CodeGenStructsAndEnum.cs (2)
2099var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: "True"); 2214var compilation = CompileAndVerify(source, verify: Verification.Fails, expectedOutput: @"353
CodeGen\CodeGenTests.cs (20)
5162var compilation = CompileAndVerify(source, expectedOutput: @"hi", verify: Verification.Fails); 5254var compilation = CompileAndVerify(source, expectedOutput: @"hihi", verify: Verification.Fails); 5275compilation = CompileAndVerify(source, expectedOutput: @"hihi", verify: Verification.Fails, parseOptions: TestOptions.Regular.WithPEVerifyCompatFeature()); 14930CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"" 16290CompileAndVerify(comp, expectedOutput: "24", verify: Verification.Fails); 16292CompileAndVerify(comp, expectedOutput: "24", verify: Verification.Fails); 16313CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("Test.Main", @" 16335CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("Test.Main", @" 16389CompileAndVerify(comp, expectedOutput: "12345", verify: Verification.Fails).VerifyIL("Test.Main", @" 16422CompileAndVerify(comp, expectedOutput: "12345", verify: Verification.Fails).VerifyIL("Test.Main", @" 16482CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16501CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16538CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16560CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16603CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16658CompileAndVerify(comp, expectedOutput: "6", verify: Verification.Fails).VerifyIL("Test.Main", @" 16747CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails); 16749CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails); 16771CompileAndVerify(comp, expectedOutput: "SpanOpCalled", verify: Verification.Fails); 16773CompileAndVerify(comp, expectedOutput: "SpanOpCalled", verify: Verification.Fails);
CodeGen\CodeGenTupleTest.cs (3)
23446var comp = CompileAndVerify(source, expectedOutput: "42qq", references: new[] { libComp.ToMetadataReference() }, options: TestOptions.DebugExe, verify: Verification.Fails); 23502var comp = CompileAndVerifyWithMscorlib40(source, expectedOutput: "42qq", references: s_valueTupleRefs.Concat(new[] { libCompRef }).ToArray(), options: TestOptions.DebugExe, verify: Verification.Fails); 23848CompileAndVerify(comp, expectedOutput: "42qq", verify: Verification.Fails);
CodeGen\FixedSizeBufferTests.cs (8)
50}", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 115CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 439CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 504CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 574expectedOutput: "12", verify: Verification.Fails).Compilation; 607CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails) 758CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "133", verify: Verification.Fails) 1122}", options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails);
CodeGen\ForeachTest.cs (4)
66}", options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("Test.Main", @" 449CompileAndVerify(comp, expectedOutput: "RedGreenBlue", verify: Verification.Fails).VerifyIL("Test.Main", @" 548CompileAndVerify(comp, expectedOutput: "123", verify: Verification.Fails).VerifyIL("Test.Main", @" 696CompileAndVerify(comp, expectedOutput: "123", verify: Verification.Fails).VerifyIL("Test.Main", @"
CodeGen\GotoTest.cs (1)
984CompileAndVerify(compilation, expectedOutput: expectedOutput, verify: Verification.Fails);
CodeGen\ObjectAndCollectionInitializerTests.cs (2)
3534CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), expectedOutput: "1", verify: Verification.Fails); 3581var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithAllowUnsafe(true), verify: Verification.Fails, expectedOutput:
CodeGen\UnsafeTests.cs (161)
59var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 244var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 291var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 338var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 372var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "123", verify: Verification.Fails); 409var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "456", verify: Verification.Fails); 437var compVerifierOptimized = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "2", verify: Verification.Fails); 456var compVerifierUnoptimized = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "2", verify: Verification.Fails); 500var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails); 553After: 7 2", verify: Verification.Fails); 599var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"ab", verify: Verification.Fails); 647var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 694var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 712compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 752var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 776compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 827var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 849compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 903var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 926compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 970var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1008compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"34", verify: Verification.Fails); 1084var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1204var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 1251-1", verify: Verification.Fails); 1277var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "210", verify: Verification.Fails); 1297var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "1", verify: Verification.Fails).VerifyIL("C.Main", @" 1338var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"1", verify: Verification.Fails); 1396var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"123", verify: Verification.Fails); 1454var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1524var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1586var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 1659var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"12", verify: Verification.Fails); 1725var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"a", verify: Verification.Fails); 1770var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"a", verify: Verification.Fails); 1814var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"h", verify: Verification.Fails); 1871var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: @"hTrue", verify: Verification.Fails); 1956var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"hTrue", verify: Verification.Fails); 2027var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2095var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2163var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"01", verify: Verification.Fails); 2234var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"970104", verify: Verification.Fails); 2325CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2387CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2450CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2506CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2567CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2628CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2688CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2764CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2848CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 2978CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3029CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3094CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3178CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3258CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3314CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3359CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3413CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3463CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3515CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3569CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3622CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3676CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3726CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3776CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3825CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3865CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3906CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 3964CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4028CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4095CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails). 4157var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4217var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4305var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"0", verify: Verification.Fails); 4356var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4418var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"2", verify: Verification.Fails); 4658var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"20", verify: Verification.Fails); 4732var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4792var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 4884var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2123 4973var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"5456"); 5033var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"23", verify: Verification.Fails); 5111var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"3", verify: Verification.Fails); 5539var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @""); 5666var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: @"00", verify: Verification.Fails); 5868CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5869CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5919CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5920CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 5956CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 6046CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 6367CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6368CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6430CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6431CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", expectedIL); 6537CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL, sequencePoints: "C.Main"); 6538CompileAndVerify(string.Format(template, "checked "), options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL, sequencePoints: "C.Main"); 6594CompileAndVerify(string.Format(template, "unchecked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6595CompileAndVerify(string.Format(template, "checked"), options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("C.Main", expectedIL); 6664CompileAndVerifyException<NotSupportedException>(text, "Type is not supported.", allowUnsafe: true, verify: Verification.Fails); 6735CompileAndVerifyException<NotSupportedException>(text, "Type is not supported.", allowUnsafe: true, verify: Verification.Fails); 6760CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "12", verify: Verification.Fails).VerifyIL("C.Main", @" 6936CompileAndVerifyException<NotSupportedException>(text, "Type is not supported.", allowUnsafe: true, verify: Verification.Fails); 7156CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7221CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7286CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7351CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("S.Main", @" 7421CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails).VerifyIL("C.Test", @" 7529var comp = CompileAndVerify(text, options: TestOptions.UnsafeDebugDll, verify: Verification.Fails); 76992", verify: Verification.Fails).VerifyIL("S.Main", @" 7783CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @" 7847CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "4", verify: Verification.Fails).VerifyIL("S.Main", @" 7906CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "I0", verify: Verification.Fails).VerifyIL("S.Main", @" 7974CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "8", verify: Verification.Fails).VerifyIL("S.Main", @" 8081CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyIL("S.Main", @" 8148CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "44", verify: Verification.Fails).VerifyIL("S.Main", @" 8206CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @" 8262CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "11", verify: Verification.Fails).VerifyIL("S.Main", @" 8321CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "01", verify: Verification.Fails).VerifyIL("S.Main", @" 8376CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "2", verify: Verification.Fails); 8774CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 8875CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 8910CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: expectedOutput); 8945CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 8954CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 8981CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9045CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9092CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9210CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9251CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 9360CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9461CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9496CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9531CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9588CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9645CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9692CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9736CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: expectedOutput, verify: Verification.Fails); 9784CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "011010011010", verify: Verification.Fails).VerifyIL("S.Main", @" 10013CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 10070CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.M", @" 10153CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"123 10194var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 10267CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @" 10290CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "0", verify: Verification.Fails).VerifyIL("T.Main", @" 10340var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10415CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 10684CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyIL("C.Test", @" 10950var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails).VerifyDiagnostics(); 11003var comp = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "ABC", verify: Verification.Fails).VerifyDiagnostics(); 11070CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "b", verify: Verification.Fails); 11114var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "hello", verify: Verification.Fails); 11183var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 11263var verifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @" 11379var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11425var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11474var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F6543210", verify: Verification.Fails); 11516var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "F654320F", verify: Verification.Fails); 11613var compVerifier = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, expectedOutput: "System.Byte[]", verify: Verification.Fails); 11686var v = CompileAndVerify(text, options: TestOptions.UnsafeDebugExe, expectedOutput: "System.Byte[]", verify: Verification.Fails);
Emit\CompilationEmitTests.cs (2)
4622CompileAndVerify(source2, references: new[] { metadataRef }, options: TestOptions.ReleaseModule, verify: Verification.Fails); 5047CompileAndVerify(comp, verify: Verification.Fails);
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (1)
1225CompilationVerifier verifier = CompileAndVerify(source + InstrumentationHelperSource, options: TestOptions.UnsafeDebugExe, expectedOutput: expectedOutput, verify: Verification.Fails);
Emit\EmitErrorTests.cs (3)
118verify: Verification.Fails); 152verify: Verification.Fails); 191verify: Verification.Fails);
Emit\EmitMetadataTests.cs (1)
229verify: Verification.Fails,
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (5)
CodeGen\CodeGenCallTests.cs (2)
33463var verifier = CompileAndVerify(source, options: TestOptions.ReleaseExe, verify: Verification.Fails, expectedOutput: expectedOutput).VerifyDiagnostics(); 33506CompileAndVerify(source, options: TestOptions.DebugExe, verify: Verification.Fails, expectedOutput: expectedOutput).VerifyDiagnostics();
Emit\EditAndContinue\EditAndContinueTests.cs (1)
18900using var _ = new EditAndContinueTest(targetFramework: TargetFramework.NetCoreApp, verification: Verification.Fails)
Emit\ManagedAddressTests.cs (1)
66var verifier = CompileAndVerify(comp, expectedOutput: "012", verify: Verification.Fails with
Emit\UnmanagedTypeModifierTests.cs (1)
1474CompileAndVerify(code, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (257)
Attributes\AttributeTests_Assembly.cs (3)
715CompileAndVerify(compilation, verify: Verification.Fails, 744CompileAndVerify(compilation, verify: Verification.Fails, 777CompileAndVerify(compilation, verify: Verification.Fails,
Attributes\AttributeTests_Dynamic.cs (2)
1197CompileAndVerify(comp, verify: Verification.Fails); 1234CompileAndVerify(comp, verify: Verification.Fails);
Attributes\AttributeTests_IsByRefLike.cs (1)
440CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module =>
Attributes\AttributeTests_IsUnmanaged.cs (4)
258CompileAndVerify(text, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 284CompileAndVerify(text, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 318verify: Verification.Fails, 347verify: Verification.Fails,
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
432CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module =>
Attributes\AttributeTests_RefReadOnly.cs (13)
35CompileAndVerify(text, verify: Verification.Fails, symbolValidator: module => 117CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, symbolValidator: module => 399CompileAndVerify(text, verify: Verification.Fails, symbolValidator: module => 471CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, symbolValidator: module => 595CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 649CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 683CompileAndVerify(codeB, verify: Verification.Fails, references: new[] { referenceA }, options: options, symbolValidator: module => 722CompileAndVerify(text, verify: Verification.Fails, options: options, symbolValidator: module => 816CompileAndVerify(codeB, verify: Verification.Fails, options: options, references: new[] { referenceA }, symbolValidator: module => 1065CompileAndVerify(code2, verify: Verification.Fails, symbolValidator: module => 1156CompileAndVerify(code, verify: Verification.Fails, references: new[] { reference }, options: TestOptions.ReleaseModule, symbolValidator: module => 1178var comp1 = CompileAndVerify(code1, options: options, verify: Verification.Fails, symbolValidator: module => 1211CompileAndVerify(text, references: new[] { RefSafetyRulesAttributeLib }, verify: Verification.Fails, symbolValidator: module =>
Attributes\AttributeTests_Synthesized.cs (2)
798verify: ExecutionConditionUtil.IsCoreClr ? Verification.Passes : Verification.Fails); 1275? Verification.Fails
Attributes\AttributeTests_WellKnownAttributes.cs (34)
10423return CompileAndVerify(comp, verify: verify ?? Verification.Fails); 10428return CompileAndVerifyWithSkipLocalsInit(src, TestOptions.UnsafeReleaseDll, parseOptions, verify ?? Verification.Fails); 10502var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10537var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10570var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); 10603var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, parseOptions: TestOptions.RegularWithExtendedPartialMethods, verify: Verification.Fails); 10820var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10850var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 10910var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11537var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11578var comp1 = CompileAndVerify(source1, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11614var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11662var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11696var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11733var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11764var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11810var comp_skip = CompileAndVerify(source_skip, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11933var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 11985var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12057var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12092var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12165var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12226var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12419var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12469var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12524var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12582var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12629var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12658var comp = CompileAndVerify(source, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12686var comp = CompileAndVerify(source, options: TestOptions.UnsafeDebugExe, verify: Verification.Fails); 12714var comp = CompileAndVerify(source, options: TestOptions.DebugModule.WithAllowUnsafe(true), verify: Verification.Fails); 12799var verifier = CompileAndVerify(src, targetFramework: TargetFramework.NetCoreApp, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12866var verifier = CompileAndVerify(comp, verify: Verification.Fails); 13114var verifier = CompileAndVerify(comp, verify: Verification.Fails);
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
2728CompileAndVerify(cb, verify: Verification.Fails).Diagnostics.Verify();
FirstClassSpanTests.cs (1)
1999verify: Verification.Fails,
RefReadonlyParameterTests.cs (17)
2373var verifier = CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails); 2423var verifier = CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails); 3312expectedOutput: "555", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 5091expectedOutput: "111", options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 5480options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 5530CompileAndVerify(source, expectedOutput: "5", verify: Verification.Fails).VerifyDiagnostics(); 5566CompileAndVerify(source, expectedOutput: "10", verify: Verification.Fails).VerifyDiagnostics(); 7948CompileAndVerify(new[] { source, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8183CompileAndVerify(new[] { source1, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8192CompileAndVerify(new[] { source2, RequiresLocationAttributeDefinition }, verify: Verification.Fails, 8276CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8278CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8293CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular11, options: TestOptions.UnsafeDebugExe, 8308CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8310CompileAndVerify(source3, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe, 8356CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, parseOptions: TestOptions.Regular12, options: TestOptions.UnsafeDebugExe, 8358CompileAndVerify(source2, new[] { comp1Ref }, verify: Verification.Fails, options: TestOptions.UnsafeDebugExe,
RefStructInterfacesTests.cs (1)
2975var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: (tS1IsClass == ThreeState.True || tS2IsClass == ThreeState.True ? null : "12"), verify: Verification.Fails);
Semantics\CollectionExpressionTests.cs (28)
1193verify: Verification.Fails, 14291verify: Verification.Fails with { ILVerifyMessage = """ 14707var verifier = CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput("[[1], [2]],"), verify: Verification.Fails); 14947var verifier = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "[1, 2], [2], "); 15214verify: Verification.Fails, 15291verify: Verification.Fails, 15405verify: targetFramework == TargetFramework.Net80 ? Verification.Fails : Verification.FailsPEVerify, 15786verify: Verification.Fails, 15933verify: Verification.Fails, 16105verify: Verification.Fails, 16149verify: Verification.Fails, 16245verify: Verification.Fails, 16365verify: Verification.Fails, 17043verify: Verification.Fails, 17106verify: Verification.Fails, 18256verify: Verification.Fails, 18420verify: Verification.Fails, 18464verify: Verification.Fails, 20025verify: Verification.Fails, 25193verify: Verification.Fails, 25359verify: Verification.Fails, 25426verify: Verification.Fails, 25490verify: Verification.Fails, 25557verify: Verification.Fails, 25683verify: Verification.Fails, 25805verify: Verification.Fails, 29378var verifier = CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: IncludeExpectedOutput("[1, 2, 3],")); 33886var verifier = CompileAndVerify(new[] { source, s_collectionExtensionsWithSpan }, verify: Verification.Fails, expectedOutput: IncludeExpectedOutput("[1, 2, 3, 4, 5, 6],"), targetFramework: TargetFramework.Net80);
Semantics\InlineArrayTests.cs (130)
3135var verifier = CompileAndVerify(comp, expectedOutput: "0 0 111 111", verify: Verification.Fails).VerifyDiagnostics(); 3198var verifier = CompileAndVerify(comp, expectedOutput: "0 0 111 111", verify: Verification.Fails).VerifyDiagnostics(); 3261var verifier = CompileAndVerify(comp, expectedOutput: "0 0 111 111", verify: Verification.Fails).VerifyDiagnostics(); 3337var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 3561var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 3793var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 4018var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4143var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4272var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4403var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 4529var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 4679var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics( 5075var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 6072var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 6168var verifier = CompileAndVerify(comp, expectedOutput: "0 5 111", verify: Verification.Fails).VerifyDiagnostics(); 6248var verifier = CompileAndVerify(comp, expectedOutput: "10 111", verify: Verification.Fails).VerifyDiagnostics(); 6363var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6402var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6445var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6488var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6529var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 6554var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6656var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6682var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6712var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6742var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 6814var verifier = CompileAndVerify(comp, expectedOutput: "0 0", verify: Verification.Fails).VerifyDiagnostics(); 6858var verifier = CompileAndVerify(comp, expectedOutput: "0 4 111", verify: Verification.Fails).VerifyDiagnostics(); 6908var verifier = CompileAndVerify(comp, expectedOutput: "0 5 111", verify: Verification.Fails).VerifyDiagnostics(); 6958var verifier = CompileAndVerify(comp, expectedOutput: "0 5 111", verify: Verification.Fails).VerifyDiagnostics(); 7014var verifier = CompileAndVerify(comp, expectedOutput: "0 9 111", verify: Verification.Fails).VerifyDiagnostics(); 7064var verifier = CompileAndVerify(comp, expectedOutput: "0 10 111", verify: Verification.Fails).VerifyDiagnostics(); 7119var verifier = CompileAndVerify(comp, expectedOutput: "0 9 111", verify: Verification.Fails).VerifyDiagnostics(); 7188var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7258var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 7337var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7473var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7618var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7786var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 7948var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8164var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics( 8373var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8481var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8598var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 8886var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10014var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10061var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10346var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 10391var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11131var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11177var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11223var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11273var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11347var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 11473var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 13211var verifier = CompileAndVerify(comp, expectedOutput: "0 1 0", verify: Verification.Fails).VerifyDiagnostics( 13749var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13807var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13865var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13918var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 13969var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 14020var verifier = CompileAndVerify(comp, expectedOutput: "0 2 0", verify: Verification.Fails).VerifyDiagnostics(); 14637var verifier = CompileAndVerify(comp, verify: Verification.Fails, 14686var verifier = CompileAndVerify(comp, verify: Verification.Fails, 15164var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 15248var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15385var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15440var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15501var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15564var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15618var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 15646var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 15672var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15698var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15894var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15920var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15949var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 15978var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16013var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16048var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16085var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16122var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16183var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16231var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16318var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16433var verifier = CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 16671var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics(); 16941CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics( 16971CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 17009CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 17046CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 17049CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 17163CompileAndVerify(comp, expectedOutput: "111", verify: Verification.Fails).VerifyDiagnostics(); 17541var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics( 17659var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics( 17734var verifier = CompileAndVerify(comp, expectedOutput: "0 111", verify: Verification.Fails).VerifyDiagnostics( 17988CompileAndVerify(comp, expectedOutput: " Throw 111 999 Throw", verify: Verification.Fails).VerifyDiagnostics(); 18168CompileAndVerify(comp, expectedOutput: " 10 1 Throw 0 Throw", verify: Verification.Fails).VerifyDiagnostics(); 18275CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 18303CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 18371CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 18504CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics(); 19982var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20120CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20169var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20320CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20442var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20579CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20628var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 20779CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21389var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 21391CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 21540var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21610CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21657var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21730CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21859var verifier = CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21929CompileAndVerify(comp, expectedOutput: "-1 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 21976var verifier = CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 22049CompileAndVerify(comp, expectedOutput: " 0 1 2 3", verify: Verification.Fails).VerifyDiagnostics(); 22654var verifier = CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 22656CompileAndVerify(comp, expectedOutput: expectedOutput, verify: Verification.Fails).VerifyDiagnostics(); 22834CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 22943CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 22972CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics(); 23000CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics(); 23029CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 23062CompileAndVerify(comp, expectedOutput: "0", verify: Verification.Fails).VerifyDiagnostics( 23088CompileAndVerify(comp, expectedOutput: "s", verify: Verification.Fails).VerifyDiagnostics(); 23110CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics();
Semantics\LockTests.cs (1)
1366verify: Verification.Fails, targetFramework: TargetFramework.Net60).VerifyDiagnostics();
Semantics\OutVarTests.cs (2)
6109CompileAndVerify(compilation, verify: Verification.Fails, expectedOutput: 6143CompileAndVerify(compilation, verify: Verification.Fails, expectedOutput:
Semantics\ParamsCollectionTests.cs (1)
12841Verification.Fails with
Semantics\PatternMatchingTests.cs (1)
2575CompileAndVerify(compilation, verify: Verification.Fails, expectedOutput:
Semantics\PrimaryConstructorTests.cs (4)
8768var verifier = CompileAndVerify(comp, expectedOutput: @"122123124125125", verify: Verification.Fails).VerifyDiagnostics( 12244var verifier = CompileAndVerify(comp, expectedOutput: @"123124125126-1", verify: Verification.Fails).VerifyDiagnostics(); 12317var verifier = CompileAndVerify(comp, expectedOutput: @"123124125126-1-2-3", verify: Verification.Fails).VerifyDiagnostics(); 15834var verifier = CompileAndVerify(comp, expectedOutput: @"122123124125125", verify: Verification.Fails).VerifyDiagnostics(
Semantics\RecordTests.cs (10)
12596var verifierA = CompileAndVerify(compA, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12636var verifierB = CompileAndVerify(compB, expectedOutput: "(1, 2, 3, 4) (1, 2, 3, 4) (10, 2, 30, 4)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12688var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 3, 4) (10, 20, 30, 40)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12745var verifier = CompileAndVerify(comp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 12777var verifier = CompileAndVerify(comp, verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics( 13005var verifier = CompileAndVerify(comp, expectedOutput: "RAN", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13060var verifier = CompileAndVerify(comp, expectedOutput: "1 RAN 2", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13182var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 42) RAN (10, 20, 42)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13222var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 42) (10, 20, 42)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics(); 13502var verifier = CompileAndVerify(comp, expectedOutput: "(1, 2, 3, 4, 100, 200)", verify: ExecutionConditionUtil.IsCoreClr ? Verification.Skipped : Verification.Fails).VerifyDiagnostics();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (76)
Semantics\DynamicTests.cs (3)
1553expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics(); 1575expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics(); 1597expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics();
Semantics\GenericConstraintsTests.cs (3)
2523options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: string.Join(Environment.NewLine, type, size)).VerifyIL("Test.M<T>", @" 2575options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "246").VerifyIL("Test.M<T>", @" 3043verify: Verification.Fails,
Semantics\InterceptorsTests.cs (4)
7434CompileAndVerify(comp, verify: Verification.Fails); 7454verify: Verification.Fails, 7487CompileAndVerify(comp, verify: Verification.Fails); 7507verify: Verification.Fails,
Semantics\InterpolationTests.cs (1)
1114var compilation = CompileAndVerify(comp, verify: Verification.Fails);
Semantics\OverloadResolutionTests.cs (4)
2741CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: @"2 9707parseOptions: TestOptions.Regular12, verify: Verification.Fails).VerifyDiagnostics(expectedDiagnostics); 9710verify: Verification.Fails).VerifyDiagnostics(expectedDiagnostics); 11627CompileAndVerify(code, expectedOutput: @"1", verify: Verification.Fails);
Semantics\RawInterpolationTests.cs (1)
1112var compilation = CompileAndVerify(comp, verify: Verification.Fails);
Semantics\RefFieldTests.cs (2)
26155var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: "12", verify: Verification.Fails); 26299var verifier = CompileAndVerify(new[] { source, UnscopedRefAttributeDefinition }, expectedOutput: "12", verify: Verification.Fails);
Semantics\SemanticErrorTests.cs (2)
7623CompileAndVerify(text, expectedOutput: expectedOutput, verify: Verification.Fails); 16098var c = CompileAndVerify(text, expectedOutput: "7788", verify: Verification.Fails, options: TestOptions.UnsafeReleaseExe);
Semantics\SpanStackSafetyTests.cs (8)
2203CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2239CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: @" 2279}", options: TestOptions.ReleaseExe), verify: Verification.Fails, expectedOutput: @" 2323}", options: TestOptions.ReleaseExe), verify: Verification.Fails, expectedOutput: @" 2622CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics(); 2672CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics(); 2702CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics(); 2725CompileAndVerify(comp, verify: Verification.Fails, expectedOutput: "Done").VerifyDiagnostics();
Semantics\StackAllocInitializerTests.cs (2)
525CompileAndVerify(comp, expectedOutput: "123123123", verify: Verification.Fails); 780CompileAndVerify(comp, expectedOutput: "2", verify: Verification.Fails).VerifyDiagnostics();
Semantics\UnsafeTests.cs (6)
703CompileAndVerify(comp, expectedOutput: "1", verify: Verification.Fails).VerifyDiagnostics( 12133var compilation = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 12250var compilation = CompileAndVerify(text, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails); 12329CompileAndVerify(text, options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails); 12415options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, 12466options: TestOptions.UnsafeReleaseDll, verify: Verification.Fails,
Semantics\Utf8StringsLiteralsTests.cs (40)
422", verify: Verification.Fails).VerifyDiagnostics(); 459", verify: Verification.Fails).VerifyDiagnostics(); 467", verify: Verification.Fails).VerifyDiagnostics(); 1455CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan<char>ReadOnlySpan<byte>", verify: Verification.Fails).VerifyDiagnostics(); 1653", verify: Verification.Fails).VerifyDiagnostics(); 1670", verify: Verification.Fails).VerifyDiagnostics(); 1706", verify: Verification.Fails).VerifyDiagnostics(); 1723", verify: Verification.Fails).VerifyDiagnostics(); 1759", verify: Verification.Fails).VerifyDiagnostics(); 1776", verify: Verification.Fails).VerifyDiagnostics(); 1821", verify: Verification.Fails).VerifyDiagnostics(); 1838", verify: Verification.Fails).VerifyDiagnostics(); 1881", verify: Verification.Fails).VerifyDiagnostics(); 2008", verify: Verification.Fails).VerifyDiagnostics(); 2039var verifier = CompileAndVerify(comp, expectedOutput: "{ 0x63 0x61 0x74 }", verify: Verification.Fails).VerifyDiagnostics(); 2103CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan", verify: Verification.Fails).VerifyDiagnostics(); 2123CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan", verify: Verification.Fails).VerifyDiagnostics(); 2144CompileAndVerify(comp, expectedOutput: @"ReadOnlySpan", verify: Verification.Fails).VerifyDiagnostics(); 2173", verify: Verification.Fails).VerifyDiagnostics(); 2202", verify: Verification.Fails).VerifyDiagnostics(); 2366", verify: Verification.Fails).VerifyDiagnostics(); 3333var verifier = CompileAndVerify(comp, verify: Verification.Fails with { ILVerifyMessage = """ 3385var verifier = CompileAndVerify(comp, verify: Verification.Fails).VerifyDiagnostics(); 3448var verifier = CompileAndVerify(comp, expectedOutput: @"ArgumentOutOfRangeException", verify: Verification.Fails).VerifyDiagnostics(); 3498", verify: Verification.Fails).VerifyDiagnostics(); 3540", verify: Verification.Fails).VerifyDiagnostics(); 3589", verify: Verification.Fails).VerifyDiagnostics(); 3638", verify: Verification.Fails).VerifyDiagnostics(); 3688", verify: Verification.Fails).VerifyDiagnostics(); 3735", verify: Verification.Fails).VerifyDiagnostics(); 3776", verify: Verification.Fails).VerifyDiagnostics(); 3829CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).VerifyDiagnostics(); 3855CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).VerifyDiagnostics(); 3901CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 3947CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 3991CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 4034CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).Verify(); 4065", verify: Verification.Fails).VerifyDiagnostics(); 4136", verify: Verification.Fails).VerifyDiagnostics(); 4301CompileAndVerify(comp, expectedOutput: "801", verify: Verification.Fails).VerifyDiagnostics();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\Metadata\PE\TypeForwarders.cs (1)
1643CompileAndVerify(appCompilation, verify: Verification.Fails,
Symbols\PartialPropertiesTests.cs (2)
2004var verifier = CompileAndVerify(source, options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: "1"); 2919verify: Verification.Fails,
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (19)
CodeGen\WinRTCollectionTests.cs (17)
439verify: Verification.Fails); 1837verify: Verification.Fails); 3197verify: Verification.Fails); 4440verify: Verification.Fails); 4806verify: Verification.Fails); 4992verify: Verification.Fails); 5189verify: Verification.Fails, 5410verify: Verification.Fails); 5547verify: Verification.Fails); 5817verify: Verification.Fails); 6044verify: Verification.Fails); 6243verify: Verification.Fails); 6602verify: Verification.Fails); 6763verify: Verification.Fails); 7035verify: Verification.Fails); 7162verify: Verification.Fails); 7283verify: Verification.Fails);
Metadata\WinMdEventTests.cs (1)
2449verify: OSVersion.IsWin8 ? Verification.Passes : Verification.Fails);
WinRTUtil.cs (1)
26verify: isWin8 ? Verification.Passes : Verification.Fails);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (25)
Attributes\AssemblyAttributes.vb (3)
910CompileAndVerify(compilation, verify:=Verification.Fails, 941CompileAndVerify(compilation, verify:=Verification.Fails, 975CompileAndVerify(compilation, verify:=Verification.Fails,
Attributes\AttributeTests_Conditional.vb (1)
803CompileAndVerify(comp, verify:=Verification.Fails).VerifyIL("C.M", "
Attributes\AttributeTests_WellKnownAttributes.vb (1)
5737Dim validator = CompileAndVerifyEx(source, sourceSymbolValidator:=sourceValidator, symbolValidator:=metadataValidator, verify:=Verification.Fails, targetFramework:=TargetFramework.Mscorlib461)
Attributes\InternalsVisibleToAndStrongNameTests.vb (1)
2215CompileAndVerify(cb, verify:=Verification.Fails).Diagnostics.Verify()
CodeGen\CodeGenIterators.vb (1)
1697Dim verifier = CompileAndVerify(compilation, verify:=Verification.Fails)
CodeGen\WinRTCollectionTests.vb (16)
515verify:=Verification.Fails) 1587verify:=Verification.Fails) 2495verify:=Verification.Fails) 3702verify:=Verification.Fails) 4037verify:=Verification.Fails) 4381verify:=Verification.Fails) 4611verify:=Verification.Fails) 4732verify:=Verification.Fails) 4967verify:=Verification.Fails) 5187verify:=Verification.Fails) 5341verify:=Verification.Fails) 5692verify:=Verification.Fails) 5822verify:=Verification.Fails) 6080verify:=Verification.Fails) 6181verify:=Verification.Fails) 6239verify:=Verification.Fails,
Emit\CompilationEmitTests.vb (2)
3847CompileAndVerify(source2, references:={metadataRef}, options:=TestOptions.ReleaseModule, verify:=Verification.Fails) 4281CompileAndVerify(compilation, verify:=Verification.Fails)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\ReferenceManagerTests.vb (1)
561CompileAndVerify(main, verify:=Verification.Fails, validator:=
Semantics\FieldInitializerBindingTests.vb (1)
1477verify:=Verification.Fails,
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolsTests\DefaultInterfaceImplementationTests.vb (1)
35Return If(ExecutionConditionUtil.IsMonoOrCoreClr, Verification.Fails, Verification.Skipped)
SymbolsTests\Source\ClsComplianceTests.vb (1)
1666CompileAndVerify(source, options:=TestOptions.ReleaseModule, sourceSymbolValidator:=validator(True, True), symbolValidator:=validator(False, True), verify:=Verification.Fails) ' PEVerify doesn't like netmodules