651 references to Verify
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractUserDiagnosticTest.cs (1)
71
DiagnosticExtensions.
Verify
(diagnostics, expected);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
RemoveUnusedParametersTests.cs (1)
1221
diagnostics.
Verify
(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (28)
CommandLineTests.cs (28)
900
diags.
Verify
(
908
diags.
Verify
(
916
diags.
Verify
();
924
diags.
Verify
();
931
diags.
Verify
(Diagnostic(ErrorCode.ERR_BadResourceVis).WithArguments("publi"));
936
diags.
Verify
(Diagnostic(ErrorCode.FTL_InvalidInputFileName).WithArguments(@"D:rive\relative\path"));
941
diags.
Verify
(Diagnostic(ErrorCode.FTL_InvalidInputFileName).WithArguments(@"inva\l*d?path"));
946
diags.
Verify
(Diagnostic(ErrorCode.ERR_NoFileSpec).WithArguments(""));
951
diags.
Verify
(Diagnostic(ErrorCode.ERR_NoFileSpec).WithArguments(""));
956
diags.
Verify
(
963
diags.
Verify
(
970
diags.
Verify
();
977
diags.
Verify
(
984
diags.
Verify
(
991
diags.
Verify
(
998
diags.
Verify
(
1005
diags.
Verify
(
1012
diags.
Verify
(
1020
diags.
Verify
(
1028
diags.
Verify
(
1035
diags.
Verify
();
1042
diags.
Verify
(
1051
diags.
Verify
(); // Now checked during emit.
1060
diags.
Verify
(
1866
diagnostics.
Verify
();
1872
diagnostics.
Verify
();
1878
diagnostics.
Verify
();
1884
diagnostics.
Verify
(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Diagnostics\MockDiagnosticAnalyzerTests.cs (1)
59
actualDiagnostics.
Verify
(expectedDiagnostics);
EditAndContinue\Helpers\EditingTestBase.cs (3)
92
tree1.GetDiagnostics().
Verify
();
93
tree2.GetDiagnostics().
Verify
();
158
tree.GetDiagnostics().
Verify
();
RemoveUnusedParametersTests.cs (1)
1221
diagnostics.
Verify
(
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
BreakingChanges.cs (2)
26
SyntaxFactory.ParseSyntaxTree(test).GetDiagnostics().
Verify
(Diagnostic(ErrorCode.ERR_PPDirectiveExpected, @"de\u0066in\U00000065"));
279
SyntaxFactory.ParseSyntaxTree(test).GetDiagnostics().
Verify
(Diagnostic(ErrorCode.ERR_GlobalAttributesNotFirst, "assembly"));
PDB\CSharpPDBTestBase.cs (1)
28
compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
();
PDB\PDBUsingTests.cs (1)
946
compilation.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (25)
Diagnostics\GetDiagnosticsTests.cs (2)
460
effectiveDiagnostics.
Verify
(expected);
784
group1.
Verify
(
Semantics\PatternMatchingTests.cs (5)
4173
SyntaxFactory.ParseExpression("A is B < C, D > E").GetDiagnostics().
Verify
();
4174
SyntaxFactory.ParseExpression("A as B < C, D > E").GetDiagnostics().
Verify
(
4180
SyntaxFactory.ParseExpression("A as B < C, D > ?? string.Empty").GetDiagnostics().
Verify
();
4181
SyntaxFactory.ParseExpression("A is B < C, D > ?? string.Empty").GetDiagnostics().
Verify
(
5648
compilation.GetEmitDiagnostics().Where(d => d.Severity != DiagnosticSeverity.Warning).
Verify
(
Semantics\PatternMatchingTests_Scope.cs (18)
11789
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
11880
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
11975
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12067
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12189
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12404
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12563
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12750
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12895
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
12984
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13145
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13306
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13389
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13468
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13554
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13633
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13694
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
13869
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (11)
UsingDebugInfoTests.cs (11)
638
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
673
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
718
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
756
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
797
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
829
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
885
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
936
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
1021
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
1069
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
1111
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (178)
Semantics\GlobalUsingDirectiveTests.cs (117)
887
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
890
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
893
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
896
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
958
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
961
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
964
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
1062
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
1112
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
1531
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
1551
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
1554
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
1557
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
1591
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
1611
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
1614
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
1928
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
1964
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2074
comp2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2084
comp3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2097
comp4.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2127
comp5.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(expected1);
2130
comp6.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2140
comp7.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2153
comp8.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(expected1);
2156
comp9.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2169
comp10.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(
2216
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(expected);
2219
comp2.GetSemanticModel(comp2.SyntaxTrees[2]).GetDeclarationDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).
Verify
(expected);
2251
comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2265
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2268
comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2271
comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2274
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2277
comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2280
comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2283
comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2301
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2308
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2338
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2341
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2344
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2396
comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2413
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2416
comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2419
comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2422
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2425
comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2428
comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2431
comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2492
comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2509
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2512
comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2515
comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2518
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2521
comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2524
comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2527
comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
2557
CompileAndVerify(comp2).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2561
CompileAndVerify(comp3).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2571
CompileAndVerify(comp4).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2578
CompileAndVerify(comp5).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2588
CompileAndVerify(comp6).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2598
CompileAndVerify(comp7).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2608
CompileAndVerify(comp8).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2611
CompileAndVerify(comp9).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2635
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2642
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2671
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2674
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2677
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2711
CompileAndVerify(comp2).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2715
CompileAndVerify(comp3).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2725
CompileAndVerify(comp4).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2732
CompileAndVerify(comp5).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2742
CompileAndVerify(comp6).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2752
CompileAndVerify(comp7).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2762
CompileAndVerify(comp8).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
2765
CompileAndVerify(comp9).Diagnostics.Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2789
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2796
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
2825
comp2.GetSemanticModel(comp2.SyntaxTrees[1]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2828
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected);
2831
comp2.GetSemanticModel(comp2.SyntaxTrees[0]).GetDeclarationDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4221
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected1);
4224
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected1);
4227
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(
4241
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected2);
4249
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected2);
4257
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected1);
4260
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected1);
4263
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(
4277
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected3);
4285
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected3);
4293
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected3);
4301
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(expected3);
4309
comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).
Verify
(
4375
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4378
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4381
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4384
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4387
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4394
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4401
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4471
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4474
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4477
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4480
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4483
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4490
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4497
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
4926
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4929
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4932
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected1);
4945
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
4948
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(expected2);
4951
GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
Semantics\ImportsTests.cs (1)
147
comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
();
Semantics\InteractiveUsingTests.cs (5)
142
CreateCompilation(source).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).
Verify
(expectedDiagnostics);
161
CreateCompilation(source, options: options).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).
Verify
(expectedDiagnostics);
179
CreateCompilation(source).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).
Verify
(expectedDiagnostics);
251
CreateCompilation(source).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).
Verify
(expectedDiagnostics);
270
CreateCompilation(source, options: options).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).
Verify
(expectedDiagnostics);
Semantics\NullableReferenceTypesTests.cs (17)
94922
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
95610
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
95735
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
96387
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
96432
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
96506
comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
96537
comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
104602
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
104666
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
104813
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
104975
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
();
105046
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
105466
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
(
105582
comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).
Verify
();
108223
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_UninitializedNonNullableField).
Verify
(
108297
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_UninitializedNonNullableField).
Verify
(
140967
comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_UseDefViolation).
Verify
(
Semantics\OperatorTests.cs (2)
6271
CreateCompilation(text).GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
(
6292
CreateCompilation(text).GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
();
Semantics\OutVarTests.cs (25)
20891
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21001
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21102
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21200
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21334
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21561
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21726
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
21919
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22070
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22165
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22332
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22499
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22593
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22707
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22798
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22882
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
22943
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
31202
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
31375
compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).
Verify
(
33702
compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).
Verify
(
33800
compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).
Verify
(
33899
compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).
Verify
(
33997
compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).
Verify
(
34082
compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).
Verify
(
34138
compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).
Verify
(
Semantics\PrimaryConstructorTests.cs (4)
7406
Verify
(builder.ToArrayAndFree());
8866
comp.GetEmitDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).
Verify
(
10771
diagnostics.
Verify
(
10779
diagnostics.
Verify
();
Semantics\QueryTests.cs (2)
4073
.
Verify
(
4115
.
Verify
();
Semantics\RefLocalsAndReturnsTests.cs (1)
2789
.
Verify
(
Semantics\Utf8StringsLiteralsTests.cs (4)
3883
CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).
Verify
();
3929
CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).
Verify
();
3973
CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).
Verify
();
4016
CompileAndVerify(comp, expectedOutput: @"called", verify: Verification.Fails).Diagnostics.Where(d => d.Code is not (int)ErrorCode.WRN_SameFullNameThisAggAgg).
Verify
();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (165)
Compilation\CompilationAPITests.cs (2)
57
tree.GetDiagnostics().
Verify
(
119
tree.GetDiagnostics().
Verify
();
Compilation\SemanticModelAPITests.cs (1)
4366
compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
();
Compilation\UsedAssembliesTests.cs (2)
111
CompileAndVerify(comp2, verify: Verification.Skipped).Diagnostics.Where(d => d.Code != (int)ErrorCode.WRN_NoRuntimeMetadataVersion).
Verify
(after);
121
CompileAndVerify(comp3, verify: Verification.Skipped).Diagnostics.Where(d => d.Code != (int)ErrorCode.WRN_NoRuntimeMetadataVersion).
Verify
(after);
Symbols\CheckedUserDefinedOperatorsTests.cs (61)
146
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
154
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
189
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
210
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
229
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
251
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
313
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
349
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
374
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
399
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
571
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
634
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
641
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
658
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
684
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
();
692
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
710
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
();
743
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
1364
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1397
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1420
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1483
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1519
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1546
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1572
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1625
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1753
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
1785
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
1808
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1823
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1841
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1925
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
();
1933
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
1951
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
();
1985
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
2050
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
2058
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2076
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
2173
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
2216
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
2274
Verify
(expected);
2285
Verify
(
2318
Verify
(expected);
2368
Verify
(expected);
2379
Verify
(
2412
Verify
(expected);
2431
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2607
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2639
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2658
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2717
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2751
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2774
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2797
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
2907
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
2965
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
3017
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
();
3025
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
3043
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
();
3073
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
3131
compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(expected);
Symbols\DefaultInterfaceImplementationTests.cs (3)
26618
compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_EventNeedsBothAccessors).
Verify
(
26952
compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_EventNeedsBothAccessors).
Verify
(
27042
compilation2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_EventNeedsBothAccessors).
Verify
(
Symbols\Source\FileModifierTests.cs (3)
1518
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_FileTypeNested).
Verify
();
1577
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_FileTypeNested).
Verify
();
1585
comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_FileTypeNested).
Verify
();
Symbols\StaticAbstractMembersInInterfacesTests.cs (93)
4017
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
4062
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
4107
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
4455
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
4500
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
4545
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
5706
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
5753
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
5781
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
5830
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
7242
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).
Verify
(
7336
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).
Verify
(
7441
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).
Verify
(
7547
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).
Verify
(
7641
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).
Verify
(
7740
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).
Verify
(
7857
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).
Verify
(
7977
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).
Verify
(
8074
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).
Verify
(
8171
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).
Verify
(
8676
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
9131
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
9215
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
9991
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).
Verify
(
10295
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
10415
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature or (int)ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers)).
Verify
(
12200
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
12299
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation).
Verify
(builder.ToArrayAndFree());
12350
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
12484
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
12495
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
12649
compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
12684
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
17634
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadIncDecRetType or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).
Verify
(
17777
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadIncDecRetType or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).
Verify
(
17913
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
18056
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
18168
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).
Verify
(
18315
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).
Verify
(
18535
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).
Verify
(expected);
18727
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).
Verify
(expected);
18835
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).
Verify
(expected2);
18884
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).
Verify
(expected3);
18936
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
18965
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
18990
(int)ErrorCode.WRN_EqualityOpWithoutGetHashCode or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
19031
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
19092
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).
Verify
(
19102
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).
Verify
(
19144
compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
19154
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).
Verify
(
19206
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).
Verify
(
19261
compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
22074
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.WRN_ExternMethodNoImplementation or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_OperatorNeedsMatch)).
Verify
(
22224
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.WRN_ExternMethodNoImplementation or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
22290
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
22335
compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
27919
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28062
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28171
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28328
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28464
compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28497
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28552
compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28562
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28604
compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
28614
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
29886
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.WRN_ExternMethodNoImplementation).
Verify
(
30016
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
30082
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers).
Verify
(
30559
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
30690
compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32296
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32337
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32372
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32413
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32456
(int)ErrorCode.WRN_EqualityOpWithoutGetHashCode or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).
Verify
(
32501
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32543
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32579
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32621
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32683
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32721
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32753
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32791
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32823
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32861
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32893
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32931
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
32963
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
33001
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
33033
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
33071
compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).
Verify
(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (157)
Diagnostics\LineSpanDirectiveTests.cs (7)
42
treeB.GetDiagnostics().
Verify
();
88
treeB.GetDiagnostics().
Verify
();
187
treeB.GetDiagnostics().
Verify
();
237
treeB.GetDiagnostics().
Verify
();
305
treeB.GetDiagnostics().
Verify
();
357
treeB.GetDiagnostics().
Verify
();
415
treeB.GetDiagnostics().
Verify
();
IncrementalParsing\IncrementalParsingTests.cs (8)
71
oldTree.GetDiagnostics().
Verify
(
75
newTree.GetDiagnostics().
Verify
(
2409
startTree.GetDiagnostics().
Verify
();
2422
parsedTree.GetDiagnostics().
Verify
(
2438
startTree.GetDiagnostics().
Verify
();
2452
parsedTree.GetDiagnostics().
Verify
(
2468
startTree.GetDiagnostics().
Verify
();
2480
parsedTree.GetDiagnostics().
Verify
(
LexicalAndXml\PreprocessorTests.cs (3)
3241
node.GetDiagnostics().
Verify
(
3264
node.GetDiagnostics().
Verify
(
3287
node.GetDiagnostics().
Verify
(
LexicalAndXml\XmlDocCommentTests.cs (9)
1806
firstComment.GetDiagnostics().
Verify
(
2446
doc.GetDiagnostics().
Verify
(
2472
doc.GetDiagnostics().
Verify
(
2546
doc.GetDiagnostics().
Verify
(
2572
doc.GetDiagnostics().
Verify
(
2792
tree.GetDiagnostics().
Verify
(
2844
tree.GetDiagnostics().
Verify
(
2888
tree.GetDiagnostics().
Verify
(
2921
tree.GetDiagnostics().
Verify
(
Parsing\AsyncParsingTests.cs (2)
2442
UsingTree("class async { async async { get; } }").GetDiagnostics().
Verify
();
2545
UsingTree("interface async { async this[async i] { get; } }").GetDiagnostics().
Verify
();
Parsing\CrefParsingTests.cs (1)
818
UsingNode("operator }}}(A{A{T}})").GetDiagnostics().
Verify
();
Parsing\ExpressionParsingTests.cs (10)
3836
tree.GetDiagnostics().
Verify
();
3926
tree.GetDiagnostics().
Verify
();
4017
tree.GetDiagnostics().
Verify
();
4104
tree.GetDiagnostics().
Verify
();
4198
tree.GetDiagnostics().
Verify
();
4501
tree.GetDiagnostics().
Verify
();
4592
tree.GetDiagnostics().
Verify
();
4685
tree.GetDiagnostics().
Verify
();
6526
tree.GetDiagnostics().
Verify
(
6563
tree.GetDiagnostics().
Verify
(
Parsing\LambdaParameterParsingTests.cs (1)
647
tree.GetDiagnostics().
Verify
(
Parsing\LocalFunctionParsingTests.cs (9)
546
tree.GetDiagnostics().
Verify
();
615
tree.GetDiagnostics().
Verify
(
720
UsingTree(code, TestOptions.Regular9).GetDiagnostics().
Verify
();
806
UsingTree(code, TestOptions.Regular9).GetDiagnostics().
Verify
();
1143
tree.GetDiagnostics().
Verify
(
1182
file.SyntaxTree.GetDiagnostics().
Verify
();
1247
file.SyntaxTree.GetDiagnostics().
Verify
(
1291
file.SyntaxTree.GetDiagnostics().
Verify
();
1706
file.SyntaxTree.GetDiagnostics().
Verify
();
Parsing\MemberDeclarationParsingTests.cs (2)
80
d.GetDiagnostics().
Verify
(
106
cu.GetDiagnostics().
Verify
(
Parsing\ParserErrorMessageTests.cs (54)
1654
firstDiag.
Verify
(Diagnostic(ErrorCode.ERR_SyntaxError, "for").WithArguments("foreach"));
3844
tree.GetDiagnostics().
Verify
();
5601
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5604
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5623
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5626
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5688
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5691
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5707
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5710
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5750
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5753
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5785
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5788
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5819
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5822
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
5856
tree.GetDiagnostics().
Verify
();
5859
tree.GetDiagnostics().
Verify
();
6108
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6126
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6139
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6147
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6168
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6175
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6198
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6211
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6240
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6253
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
();
6309
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)).GetDiagnostics().
Verify
();
6310
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().
Verify
();
6321
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6322
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
();
6345
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6346
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
();
6376
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp4)).GetDiagnostics().
Verify
();
6377
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().
Verify
();
6404
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().
Verify
();
6405
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6432
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp3)).GetDiagnostics().
Verify
();
6433
SyntaxFactory.ParseSyntaxTree(text, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6446
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6447
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
(
6465
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6466
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
(
6489
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6490
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
(
6509
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6510
SyntaxFactory.ParseSyntaxTree(text, options: TestOptions.RegularWithDocumentationComments.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
();
6527
tree.GetCompilationUnitRoot().GetDiagnostics().
Verify
(
6541
SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp2)).GetDiagnostics().
Verify
();
6542
SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp1)).GetDiagnostics().
Verify
();
6636
SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp6)).GetDiagnostics().
Verify
();
6638
SyntaxFactory.ParseSyntaxTree(source, options: CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp5)).GetDiagnostics().
Verify
();
6788
SyntaxFactory.ParseSyntaxTree(source).GetDiagnostics().
Verify
(
Parsing\ParserRegressionTests.cs (1)
830
actualErrors.
Verify
(expectedErrors);
Parsing\ParsingErrorRecoveryTests.cs (12)
53
file.GetDiagnostics().
Verify
(
5038
file.GetDiagnostics().
Verify
(
5186
file.GetDiagnostics().
Verify
(
5355
file.GetDiagnostics().
Verify
(
6319
file.GetDiagnostics().
Verify
(
6800
syntaxTree.GetDiagnostics().
Verify
(
6856
diags.
Verify
(
6884
diags.
Verify
(
6988
tree.GetDiagnostics().
Verify
(
7019
tree.GetDiagnostics().
Verify
(
7053
tree.GetDiagnostics().
Verify
(
7078
tree.GetDiagnostics().
Verify
(
Parsing\ParsingTests.cs (6)
61
actualErrors.
Verify
(expectedErrors);
68
actualErrors.
Verify
(expectedErrors);
75
actualErrors.Take(1).
Verify
(expectedFirstError);
117
actualErrors.
Verify
(expectedErrors);
137
actualErrors.
Verify
(expectedErrors);
156
actualErrors.
Verify
(expectedErrors);
Parsing\PatternParsingTests.cs (14)
302
SyntaxFactory.ParseExpression("e is A<B> && e").GetDiagnostics().
Verify
();
303
SyntaxFactory.ParseExpression("e is A<B> || e").GetDiagnostics().
Verify
();
304
SyntaxFactory.ParseExpression("e is A<B> ^ e").GetDiagnostics().
Verify
();
305
SyntaxFactory.ParseExpression("e is A<B> | e").GetDiagnostics().
Verify
();
306
SyntaxFactory.ParseExpression("e is A<B> & e").GetDiagnostics().
Verify
();
307
SyntaxFactory.ParseExpression("e is A<B>[]").GetDiagnostics().
Verify
();
308
SyntaxFactory.ParseExpression("new { X = e is A<B> }").GetDiagnostics().
Verify
();
309
SyntaxFactory.ParseExpression("e is A<B>").GetDiagnostics().
Verify
();
311
SyntaxFactory.ParseExpression("(item is Dictionary<string, object>[])").GetDiagnostics().
Verify
();
312
SyntaxFactory.ParseExpression("A is B < C, D > [ ]").GetDiagnostics().
Verify
();
313
SyntaxFactory.ParseExpression("A is B < C, D > [ ] E").GetDiagnostics().
Verify
();
314
SyntaxFactory.ParseExpression("A < B > C").GetDiagnostics().
Verify
();
320
SyntaxFactory.ParseExpression("from s in a where s is string where s.Length > 1 select s").GetDiagnostics().
Verify
();
321
SyntaxFactory.ParseExpression("M(out int? x)").GetDiagnostics().
Verify
();
Parsing\RecordParsing.cs (5)
265
tree.GetDiagnostics().
Verify
();
309
tree.GetDiagnostics().
Verify
();
331
tree.GetDiagnostics().
Verify
();
334
tree.GetDiagnostics().
Verify
();
1218
tree.GetDiagnostics().
Verify
();
Parsing\StatementParsingTests.cs (3)
3459
tree.GetDiagnostics(root).
Verify
(
3504
tree.GetDiagnostics().
Verify
();
3529
tree.GetDiagnostics(tree.GetRoot()).
Verify
(
Parsing\TopLevelStatementsParsingTests.cs (1)
1624
tree.GetDiagnostics().
Verify
();
Syntax\LambdaUtilitiesTests.cs (1)
44
compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
();
Syntax\SyntaxFactoryTests.cs (7)
415
literal.GetDiagnostics().
Verify
();
429
literal.GetDiagnostics().
Verify
();
443
expression.Token.GetDiagnostics().
Verify
();
457
expression.Token.GetDiagnostics().
Verify
();
466
token.GetDiagnostics().
Verify
();
613
parsedWith8.GetDiagnostics().
Verify
();
616
parsedWithPreview.GetDiagnostics().
Verify
();
Syntax\SyntaxNodeTests.cs (1)
361
compilationUnit.GetDiagnostics().
Verify
(
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CSharpTestBase.cs (3)
1293
comp2.GetEmitDiagnostics().Where(d => shouldCompare(d)).
Verify
(
2038
actualDiagnostics.
Verify
(expectedDiagnostics);
2049
actualDiagnostics.
Verify
(expectedDiagnostics);
DiagnosticExtensions.cs (2)
18
actual.Select(info => new CSDiagnostic(info, NoLocation.Singleton)).
Verify
(expected);
23
actual.Select(info => new CSDiagnostic(info, NoLocation.Singleton)).
Verify
(expected);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
Diagnostics\AbstractUserDiagnosticTest.cs (1)
71
DiagnosticExtensions.
Verify
(diagnostics, expected);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
74
actualDiagnostics.
Verify
(expectedDiagnostics);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticExtensions.cs (1)
63
Verify
((IEnumerable<Diagnostic>)actual, expected);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (54)
CommandLineArgumentsTests.vb (25)
50
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Identifier expected.", "= ^^ ^^ "))
57
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Identifier expected.", "= ^^ ^^ "))
63
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Expression expected.", "OnlyEqualsNoValue1= ^^ ^^ "))
69
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Expression expected.", "OnlyEqualsNoValue1= ^^ ^^ "))
86
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Identifier expected.", "then ^^ ^^ =bar"))
91
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Syntax error in conditional compilation expression.", "bar= ^^ ^^ then"))
112
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Identifier expected.", "GOO=23:: ^^ , ^^ ,:::"))
117
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Identifier expected.", "GOO=23, ^^ : ^^ BAR"))
138
errors.
Verify
()
143
errors.
Verify
()
148
errors.
Verify
()
153
errors.
Verify
()
159
errors.
Verify
()
163
errors.
Verify
()
171
errors.
Verify
()
184
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Conversion from 'String' to 'Double' cannot occur in a constant expression.", "RRR=1+""3"" ^^ ^^ "))
188
errors.
Verify
(
195
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("End of statement expected.", "A=CHR ^^ ^^ (128)"))
199
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("End of statement expected.", "A=ASCW ^^ ^^ (""G"")"))
203
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("End of statement expected.", "B=1 ^^ ^^ 1"))
207
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("End of statement expected.", "B=1 ^^ ^^ C=1"))
211
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Overflow.", "A=111111111111111111111111 ^^ ^^ "))
215
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Syntax error in conditional compilation expression.", "A= 2 + " + vbCrLf + " ^^ ^^ 2"))
219
errors.
Verify
()
285
errors.
Verify
(Diagnostic(ERRID.ERR_ConditionalCompilationConstantNotValid).WithArguments("Identifier expected.", " ^^ 'Blah' ^^ "))
CommandLineTests.vb (29)
1165
diags.
Verify
()
1172
diags.
Verify
()
1179
diags.
Verify
()
1187
diags.
Verify
()
1195
diags.
Verify
()
1203
diags.
Verify
()
1211
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1217
diags.
Verify
()
1225
diags.
Verify
()
1232
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", "publi"))
1237
diags.
Verify
(Diagnostic(ERRID.FTL_InvalidInputFileName).WithArguments("D:rive\relative\path"))
1242
diags.
Verify
(Diagnostic(ERRID.FTL_InvalidInputFileName).WithArguments("inva\l*d?path"))
1247
diags.
Verify
(Diagnostic(ERRID.ERR_ArgumentRequired).WithArguments("resource", ":<resinfo>"))
1252
diags.
Verify
(Diagnostic(ERRID.ERR_ArgumentRequired).WithArguments("resource", ":<resinfo>"))
1257
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1262
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1267
diags.
Verify
()
1274
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1279
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1284
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1289
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1294
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1299
diags.
Verify
()
1306
diags.
Verify
()
1313
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1318
diags.
Verify
()
1325
diags.
Verify
(Diagnostic(ERRID.ERR_InvalidSwitchValue).WithArguments("resource", " "))
1333
diags.
Verify
(Diagnostic(ERRID.FTL_InvalidInputFileName).WithArguments("iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii").WithLocation(1, 1))
7791
actual.
Verify
(expected)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (3)
EditAndContinue\Helpers\EditingTestBase.vb (3)
121
tree1.GetDiagnostics().
Verify
()
122
tree2.GetDiagnostics().
Verify
()
179
tree.GetDiagnostics().
Verify
()
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
CodeGen\WinRTCollectionTests.vb (1)
6337
verifier.Diagnostics.AsEnumerable().Where(Function(d) d.Severity > DiagnosticSeverity.Info).
Verify
()
Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator.ExpressionCompiler.UnitTests (2)
ImportDebugInfoTests.vb (2)
491
comp.GetDiagnostics().Where(Function(d) d.Severity > DiagnosticSeverity.Info).
Verify
()
555
comp.GetDiagnostics().Where(Function(d) d.Severity > DiagnosticSeverity.Info).
Verify
()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\GetDiagnosticsTests.vb (1)
531
group1.
Verify
(
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (3)
Parser\ParseXml.vb (2)
3538
tree1.GetDiagnostics().
Verify
(commonExpectedErrors.Concat({Diagnostic(ERRID.ERR_MissingXmlEndTag, String.Format(squiggleTemplate, "e"))}).ToArray())
3541
tree2.GetDiagnostics().
Verify
(commonExpectedErrors.Concat({Diagnostic(ERRID.ERR_MissingXmlEndTag, String.Format(squiggleTemplate, "ee"))}).ToArray())
TestSyntaxNodes.vb (1)
2113
compilationUnit.GetDiagnostics().
Verify
(
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
ParserTestUtilities.vb (1)
93
tree.GetDiagnostics().
Verify
(expectedDiagnostics)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2401
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
2418
comp.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).
Verify
();
Roslyn.Test.PdbUtilities (1)
Reader\PdbValidation.cs (1)
536
result.Diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error).
Verify
();