Base:
method
GetDiagnostics
Microsoft.CodeAnalysis.Compilation.GetDiagnostics(System.Threading.CancellationToken)
776 references to GetDiagnostics
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
1564Assert.Empty(compilation.GetDiagnostics().Where(diagnostic => diagnostic.Severity > DiagnosticSeverity.Hidden));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (18)
BreakingChanges.cs (1)
67Assert.Equal(0, comp.GetDiagnostics().Count());
CodeGen\CodeGenOverridingAndHiding.cs (1)
3169Assert.Equal(0, comp2.GetDiagnostics().Count());
CodeGen\CodeGenTupleTest.cs (3)
10956Assert.Equal("7.0", Compilation.GetRequiredLanguageVersion(comp.GetDiagnostics()[1])); 10957Assert.Equal("7.0", Compilation.GetRequiredLanguageVersion(comp.GetDiagnostics()[2])); 10958Assert.Null(Compilation.GetRequiredLanguageVersion(comp.GetDiagnostics()[3]));
CodeGen\GotoTest.cs (6)
1130compilation.GetDiagnostics().Verify( 1174compilation.GetDiagnostics().Verify( 1180compilation.GetDiagnostics().Verify( 1189compilation.GetDiagnostics().Verify( 1202compilation.GetDiagnostics().Verify( 1214compilation.GetDiagnostics().Verify(
CodeGen\PatternTests.cs (5)
100compilation.GetDiagnostics().Verify(); 123compilation.GetDiagnostics().Verify(); 153compilation.GetDiagnostics().Verify(); 201compilation.GetDiagnostics().Verify(); 3316compilation.GetDiagnostics().Verify(
Emit\CompilationEmitTests.cs (2)
2702Assert.False(libComp.GetDiagnostics().Any()); 2759Assert.False(exeComp.GetDiagnostics().Any());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
PDB\CSharpPDBTestBase.cs (1)
28compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
PDB\PDBUsingTests.cs (1)
1488compilation.GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Info).Verify();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (143)
Attributes\AttributeTests.cs (3)
7865compilation.GetDiagnostics(); 7880Assert.NotEmpty(compilation.GetDiagnostics()); 8385Assert.NotEmpty(compilation.GetDiagnostics());
Attributes\AttributeTests_Assembly.cs (22)
32Assert.Empty(other.GetDiagnostics()); 145Assert.Empty(other.GetDiagnostics()); 155Assert.Empty(other.GetDiagnostics()); 165Assert.Empty(other.GetDiagnostics()); 268Assert.Empty(other.GetDiagnostics()); 278Assert.Empty(other.GetDiagnostics()); 288Assert.Empty(other.GetDiagnostics()); 298Assert.Empty(other.GetDiagnostics()); 519Assert.Empty(other.GetDiagnostics()); 525Assert.Empty(other.GetDiagnostics()); 535Assert.Empty(other.GetDiagnostics()); 545Assert.Empty(other.GetDiagnostics()); 555Assert.Empty(other.GetDiagnostics()); 561Assert.Empty(other.GetDiagnostics()); 870Assert.Empty(comp.GetDiagnostics()); 893Assert.Empty(comp.GetDiagnostics()); 1081var diagnostics = consoleappCompilation.GetDiagnostics(); 1202consoleappCompilation.GetDiagnostics().Verify(); 1272var diagnostics = consoleappCompilation.GetDiagnostics(); 1375var diagnostics = consoleappCompilation.GetDiagnostics(); 1420var diagnostics = compilation.GetDiagnostics(); 2273compilation.GetDiagnostics();
Attributes\AttributeTests_Security.cs (1)
1679CreateCompilationWithMscorlib46(source).GetDiagnostics();
Attributes\AttributeTests_WellKnownAttributes.cs (16)
8295var diags = comp.GetDiagnostics(); 8328var diags = comp.GetDiagnostics(); 8359var diags = comp.GetDiagnostics(); 8390var diags = comp.GetDiagnostics(); 8430var diags = comp.GetDiagnostics(); 8461var diags = comp.GetDiagnostics(); 8498var diags = comp.GetDiagnostics(); 8706var diags = comp2.GetDiagnostics(); 8749var diags = comp2.GetDiagnostics(); 8849var diags = comp2.GetDiagnostics(); 8949var diags = comp2.GetDiagnostics(); 9132var diags = comp2.GetDiagnostics(); 9183var diags = comp2.GetDiagnostics(); 9324var diags = comp.GetDiagnostics(); 9462var diags = comp.GetDiagnostics(); 9511var diags = comp2.GetDiagnostics();
Attributes\InternalsVisibleToAndStrongNameTests.cs (12)
184Assert.Empty(comp.GetDiagnostics()); 313Assert.Empty(comp.GetDiagnostics()); 359Assert.Empty(comp.GetDiagnostics()); 386Assert.NotEmpty(other.GetDiagnostics()); 399var err = other.GetDiagnostics().Single(); 839Assert.Empty(c2.GetDiagnostics()); 888Assert.Empty(c2.GetDiagnostics()); 921Assert.Empty(requestor.GetDiagnostics()); 1110Assert.Empty(requestor.GetDiagnostics()); 1275Assert.Empty(requestor.GetDiagnostics()); 1388Assert.Empty(requestor.GetDiagnostics()); 1611var err = other.GetDiagnostics().Single();
Diagnostics\GetDiagnosticsTests.cs (6)
118var diag = compilation.GetDiagnostics().Single(); 434var diagnostics = compilation.GetDiagnostics(); 463var diagnostics = compilation.GetDiagnostics(); 514var diagnostics = compilation.GetDiagnostics(); 548var compilerDiagnostics = compilation.GetDiagnostics(); 1431var compilationDiagnostics = compilation.GetDiagnostics();
FlowAnalysis\FlowDiagnosticTests.cs (1)
1874var bindingDiags = comp.GetDiagnostics().ToArray();
Semantics\ExperimentalAttributeTests.cs (31)
65var diag = comp.GetDiagnostics().Single(); 120foreach (var diag in comp.GetDiagnostics()) 185foreach (var diag in comp.GetDiagnostics()) 294foreach (var diag in comp.GetDiagnostics()) 442foreach (var diag in comp.GetDiagnostics()) 512foreach (var diag in comp.GetDiagnostics()) 1072var diag = comp.GetDiagnostics().Single(); 1101var diag = comp.GetDiagnostics().Single(); 1132var diag = comp.GetDiagnostics().Single(); 1163var diag = comp.GetDiagnostics().Single(); 1194var diag = comp.GetDiagnostics().Single(); 1813var diag = comp.GetDiagnostics().Single(); 1854var diag = comp.GetDiagnostics().Single(); 1934var diag = comp.GetDiagnostics().Single(); 1975var diag = comp.GetDiagnostics().Single(); 2055var diag = comp.GetDiagnostics().Single(); 2120var diag = comp.GetDiagnostics().Single(); 2146var diag = comp.GetDiagnostics().Single(); 2172var diag = comp.GetDiagnostics().Single(); 2198var diag = comp.GetDiagnostics().Single(); 2224var diag = comp.GetDiagnostics().Single(); 2250var diag = comp.GetDiagnostics().Single(); 2276var diag = comp.GetDiagnostics().Single(); 2302var diag = comp.GetDiagnostics().Single(); 2328var diag = comp.GetDiagnostics().Single(); 2359var diag = comp.GetDiagnostics().Single(); 2390var diag = comp.GetDiagnostics().Single(); 2416var diag = comp.GetDiagnostics().Single(); 2442var diag = comp.GetDiagnostics().Single(); 2467var diag = comp.GetDiagnostics().Single(); 2492var diag = comp.GetDiagnostics().Single();
Semantics\OutVarTests.cs (26)
20902compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21015compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21116compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21214compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21348compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21579compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21776compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 21978compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22129compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22224compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22391compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22558compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22652compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22766compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22857compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 22941compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 23002compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 31261compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 31434compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 33653compilation.GetDiagnostics().Verify( 33761compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).Verify( 33859compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).Verify( 33958compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).Verify( 34056compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).Verify( 34141compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).Verify( 34197compilation.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_BadAttributeArgument).Verify(
Semantics\PatternMatchingTests.cs (1)
5055CreateCompilation(program).GetDiagnostics();
Semantics\PatternMatchingTests_Scope.cs (18)
11789compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 11880compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 11975compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12067compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12189compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12409compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12600compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12799compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 12944compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13033compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13194compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13355compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13438compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13517compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13603compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13682compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13743compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify( 13918compilation.GetDiagnostics().Where(d => !exclude.Contains(d.Code)).Verify(
Semantics\PatternSwitchTests.cs (6)
40Assert.True(compilation.GetDiagnostics().HasAnyErrors()); 69Assert.True(compilation.GetDiagnostics().HasAnyErrors()); 126Assert.True(compilation.GetDiagnostics().HasAnyErrors()); 162Assert.True(compilation.GetDiagnostics().HasAnyErrors()); 190Assert.True(compilation.GetDiagnostics().HasAnyErrors()); 246Assert.True(compilation.GetDiagnostics().HasAnyErrors());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (221)
Semantics\AccessCheckTests.cs (7)
985Assert.Empty(other.GetDiagnostics()); 995Assert.Empty(c.GetDiagnostics()); 1005Assert.Empty(other.GetDiagnostics()); 1038Assert.Empty(c.GetDiagnostics()); 1293CreateCompilation(source).GetDiagnostics(); 1320CreateCompilation(source).GetDiagnostics(); 1350CreateCompilation(source).GetDiagnostics();
Semantics\AmbiguousOverrideTests.cs (1)
139var diagnostics = comp.GetDiagnostics();
Semantics\BindingAsyncTasklikeTests.cs (1)
188var diagnostics = compilation.GetDiagnostics();
Semantics\ForEachTests.cs (6)
1091Assert.NotEmpty(CreateCompilation(source).GetDiagnostics()); 1958Assert.NotEmpty(compilation.GetDiagnostics()); 1978Assert.NotEmpty(compilation.GetDiagnostics()); 1997Assert.NotEmpty(compilation.GetDiagnostics()); 2106Assert.NotEmpty(CreateCompilation(source).GetDiagnostics()); 2232comp.GetDiagnostics();
Semantics\ForLoopErrorTests.cs (1)
200DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(),
Semantics\GlobalUsingDirectiveTests.cs (84)
887comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 890comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 893comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 896comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 958comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 961comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 964comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 1062comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 1112comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 1531comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 1551comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 1554comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 1557comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 1591comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 1611comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 1614comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected); 1928comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 1964comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 2074comp2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2084comp3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2097comp4.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2127comp5.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(expected1); 2130comp6.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2140comp7.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2153comp8.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify(expected1); 2156comp9.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2169comp10.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.HDN_UnusedUsingDirective or (int)ErrorCode.HDN_UnusedExternAlias)).Verify( 2251comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2265comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2268comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2271comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2274comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2277comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2280comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2283comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2396comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2413comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2416comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2419comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2422comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2425comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2428comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2431comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2492comp2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2509comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2512comp4.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2515comp5.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2518comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2521comp7.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 2524comp8.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 2527comp9.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 4221comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected1); 4224comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected1); 4227comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify( 4241comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected2); 4249comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected2); 4257comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected1); 4260comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected1); 4263comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.ERR_DuplicateAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify( 4277comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected3); 4285comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected3); 4293comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected3); 4301comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify(expected3); 4309comp.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadExternAlias or (int)ErrorCode.HDN_UnusedUsingDirective)).Verify( 4375comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4378comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4381comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4384comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4387comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 4394comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 4401comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 4471comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4474comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4477comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4480comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4483comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 4490comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 4497comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify( 4926GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4929GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4932GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected1); 4945GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 4948GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(expected2); 4951GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective).Verify(
Semantics\ImportsTests.cs (1)
147comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Semantics\InheritanceBindingTests.cs (1)
8239var actualErrors = comp.GetDiagnostics();
Semantics\InteractiveUsingTests.cs (10)
142CreateCompilation(source).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).Verify(expectedDiagnostics); 143CreateSubmission(source).GetDiagnostics().Verify(expectedDiagnostics); 161CreateCompilation(source, options: options).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).Verify(expectedDiagnostics); 162CreateSubmission(source, options: options).GetDiagnostics().Verify(expectedDiagnostics); 179CreateCompilation(source).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).Verify(expectedDiagnostics); 180CreateSubmission(source).GetDiagnostics().Verify(expectedDiagnostics); 251CreateCompilation(source).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).Verify(expectedDiagnostics); 252CreateSubmission(source).GetDiagnostics().Verify(expectedDiagnostics); 270CreateCompilation(source, options: options).GetDiagnostics().Where(d => d.Severity > DiagnosticSeverity.Hidden).Verify(expectedDiagnostics); 271CreateSubmission(source, options: options).GetDiagnostics().Verify(expectedDiagnostics);
Semantics\LambdaTests.cs (3)
387Assert.Equal(0, comp2.GetDiagnostics().Count()); 475var errs = comp.GetDiagnostics(); 532Assert.Equal(0, csProject.GetDiagnostics().Count());
Semantics\MethodBodyModelTests.cs (8)
127foreach (var e in comp.GetDiagnostics()) 418Assert.Equal(1, comp.GetDiagnostics().Count()); 442Assert.Equal(1, comp.GetDiagnostics().Count()); 465Assert.Equal(1, comp.GetDiagnostics().Count()); 488Assert.Equal(1, comp.GetDiagnostics().Count()); 511Assert.Equal(1, comp.GetDiagnostics().Count()); 617var diags = comp.GetDiagnostics(); 797Assert.Equal(string.Empty, string.Join(Environment.NewLine, comp.GetDiagnostics()));
Semantics\NullableReferenceTypesTests.cs (74)
98650comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 99338comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 99463comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 100115comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 100160comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 100234comp3.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 100265comp6.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 108330comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 108394comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 108541comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 108703comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify(); 108774comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 109194comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify( 109310comp1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation).Verify(); 111951comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_UninitializedNonNullableField).Verify( 112025comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.WRN_UninitializedNonNullableField).Verify( 112489var diagnostics = comp.GetDiagnostics(); 125127var diagnostics = comp.GetDiagnostics(); 125136diagnostics = comp.GetDiagnostics(); 125145diagnostics = comp.GetDiagnostics(); 125156diagnostics = comp.GetDiagnostics(); 125165diagnostics = comp.GetDiagnostics(); 125176diagnostics = comp.GetDiagnostics(); 125186diagnostics = comp.GetDiagnostics(); 125196diagnostics = comp.GetDiagnostics(); 125202diagnostics = comp.GetDiagnostics(); 125207diagnostics = comp.GetDiagnostics(); 125211diagnostics = comp.GetDiagnostics(); 125222diagnostics = comp.GetDiagnostics(); 125232diagnostics = comp.GetDiagnostics(); 125243diagnostics = comp.GetDiagnostics(); 125462var diagnostics = comp.GetDiagnostics(); 125471diagnostics = comp.GetDiagnostics(); 125480diagnostics = comp.GetDiagnostics(); 125491diagnostics = comp.GetDiagnostics(); 125500diagnostics = comp.GetDiagnostics(); 125511diagnostics = comp.GetDiagnostics(); 125521diagnostics = comp.GetDiagnostics(); 125531diagnostics = comp.GetDiagnostics(); 125537diagnostics = comp.GetDiagnostics(); 125542diagnostics = comp.GetDiagnostics(); 125546diagnostics = comp.GetDiagnostics(); 125557diagnostics = comp.GetDiagnostics(); 125567diagnostics = comp.GetDiagnostics(); 125578diagnostics = comp.GetDiagnostics(); 126001var diagnostics = comp.GetDiagnostics(); 126005diagnostics = comp.GetDiagnostics(); 126009diagnostics = comp.GetDiagnostics(); 126015diagnostics = comp.GetDiagnostics(); 126019diagnostics = comp.GetDiagnostics(); 126025diagnostics = comp.GetDiagnostics(); 126030diagnostics = comp.GetDiagnostics(); 126035diagnostics = comp.GetDiagnostics(); 126041diagnostics = comp.GetDiagnostics(); 126046diagnostics = comp.GetDiagnostics(); 126050diagnostics = comp.GetDiagnostics(); 126056diagnostics = comp.GetDiagnostics(); 126061diagnostics = comp.GetDiagnostics(); 126067diagnostics = comp.GetDiagnostics(); 126147var diagnostics = comp.GetDiagnostics(); 126151diagnostics = comp.GetDiagnostics(); 126155diagnostics = comp.GetDiagnostics(); 126161diagnostics = comp.GetDiagnostics(); 126165diagnostics = comp.GetDiagnostics(); 126171diagnostics = comp.GetDiagnostics(); 126176diagnostics = comp.GetDiagnostics(); 126181diagnostics = comp.GetDiagnostics(); 126187diagnostics = comp.GetDiagnostics(); 126192diagnostics = comp.GetDiagnostics(); 126196diagnostics = comp.GetDiagnostics(); 126202diagnostics = comp.GetDiagnostics(); 126207diagnostics = comp.GetDiagnostics(); 126213diagnostics = comp.GetDiagnostics(); 145254comp.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_UseDefViolation).Verify(
Semantics\OperatorTests.cs (2)
6272CreateCompilation(text).GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify( 6293CreateCompilation(text).GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Semantics\OverloadResolutionPerfTests.cs (1)
312var diagnostics = comp.GetDiagnostics().Where(d => d is not { Severity: DiagnosticSeverity.Info, Code: (int)ErrorCode.INF_TooManyBoundLambdas });
Semantics\OverloadResolutionTests.cs (4)
2302Assert.Empty(cCommon.GetDiagnostics()); 2308Assert.Empty(cCS.GetDiagnostics()); 2332cFinal.GetDiagnostics(); 7838Assert.Equal("(30,19): error CS0121: The call is ambiguous between the following methods or properties: 'A.B.X.Test(int)' and 'A.C.X.Test(int)'", DiagnosticFormatter.Instance.Format(comp.GetDiagnostics()[0], EnsureEnglishUICulture.PreferredOrNull));
Semantics\QueryTests.cs (4)
1658foreach (var dd in compilation.GetDiagnostics()) Console.WriteLine(dd); 3109Assert.NotEmpty(compilation.GetDiagnostics()); 4071.GetDiagnostics() 4113.GetDiagnostics()
Semantics\RefEscapingTests.cs (1)
48Assert.True(comp.GetDiagnostics().All(d => d.Severity != DiagnosticSeverity.Error));
Semantics\RefLocalsAndReturnsTests.cs (1)
2886.GetDiagnostics()
Semantics\SemanticErrorTests.cs (3)
1693var diagnostics = CreateCompilation(text).GetDiagnostics(); 3254var errs = comp.GetDiagnostics(); 16723Assert.False(comp.GetDiagnostics().Any());
Semantics\UninitializedNonNullableFieldTests.cs (3)
2752var actualAdditionalLocations = comp.GetDiagnostics().Single().AdditionalLocations; 2773var actualAdditionalLocations = comp.GetDiagnostics().Single().AdditionalLocations; 2802var diagnostics = comp.GetDiagnostics();
Semantics\UnsafeTests.cs (1)
5189var compilationDiagnostics = compilation.GetDiagnostics();
Semantics\UseSiteErrorTests.cs (2)
1237foreach (var diag in compilation.GetDiagnostics()) 2442var diagnostics = compilation.GetDiagnostics();
Semantics\VarianceTests.cs (2)
114var errors = comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error); 227var errors = comp.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (271)
Compilation\CompilationAPITests.cs (15)
628Assert.Empty(comp.GetDiagnostics()); 639var errs = comp.GetDiagnostics(); 696Assert.Empty(comp.GetDiagnostics()); 707var errs = comp.GetDiagnostics(); 834var error = comp.GetDiagnostics(); 835Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue); 889Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue); 893var e = comp.GetDiagnostics(cancellationToken: default(CancellationToken)); 894Assert.Equal(0, comp.GetDiagnostics(cancellationToken: default(CancellationToken)).Count()); 898error = comp.GetDiagnostics(cancellationToken: CancellationToken.None); 899Assert.InRange(comp.GetDiagnostics().Count(), 0, int.MaxValue); 902Assert.Equal(0, comp.GetDiagnostics().Count()); 910Assert.Equal(0, comp.GetDiagnostics().Count()); 1943compilation.GetDiagnostics().Verify( 1956compilation.GetDiagnostics().Verify(
Compilation\GetSemanticInfoTests.cs (1)
5893var diag = comp.GetDiagnostics();
Compilation\LoadDirectiveTests.cs (1)
61compilation.GetDiagnostics().Verify(
Compilation\SemanticModelAPITests.cs (1)
4366compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
DocumentationComments\DocumentationCommentCompilerTests.cs (4)
3419CreateCompilationUtil(source).GetDiagnostics().VerifyWithFallbackToErrorCodeOnlyForNonEnglish( 5862Assert.NotEmpty(comp.GetDiagnostics()); 5884Assert.Equal(2, comp.GetDiagnostics().Count()); 7401CreateCompilationUtil(source).GetDiagnostics().VerifyWithFallbackToErrorCodeOnlyForNonEnglish(
DocumentationComments\DocumentationModeTests.cs (1)
388comp.GetDiagnostics().Verify(fallbackToErrorCodeOnlyForNonEnglish: fallbackToErrorCodeOnlyForNonEnglish, expected: makeExpectedDiagnostics(includeElement));
DocumentationComments\TypeDocumentationCommentTests.cs (1)
140Assert.Equal(0, comp.GetDiagnostics().Count());
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (2)
326Assert.False(compilation.GetDiagnostics().Any()); 359Assert.False(compilation.GetDiagnostics().Any());
Symbols\CheckedUserDefinedOperatorsTests.cs (61)
146compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 154compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 189compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 210compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 229compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 251compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 313compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 349compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 374compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 399compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 571compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 634compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 641compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 658compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 684compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(); 692compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 710compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(); 743compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 1364compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1397compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1420compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1483compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1519compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1546compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1572compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1625compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1753compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 1785compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 1808compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1823compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1841compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1925compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(); 1933compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 1951compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(); 1985compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 2050compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 2058compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2076compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 2173compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify( 2216compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify( 2273compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)). 2284compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)). 2317compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)). 2367compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)). 2378compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)). 2411compilation.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)). 2431compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2607compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2639compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2658compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2717compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2751compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2774compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2797compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 2907compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 2965compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 3017compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(); 3025compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 3043compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(); 3073compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected); 3131compilation.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(expected);
Symbols\CompilationCreationTests.cs (2)
2823var diagnostics = compilation.GetDiagnostics().ToArray(); 2863var diags = compilation.GetDiagnostics().ToArray();
Symbols\ConversionTests.cs (4)
790var diagnostics = compilation.GetDiagnostics(); 810var diagnostics = compilation.GetDiagnostics(); 856var diagnostics = compilation.GetDiagnostics(); 878var diagnostics = compilation.GetDiagnostics();
Symbols\DefaultInterfaceImplementationTests.cs (9)
26803compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_EventNeedsBothAccessors).Verify( 27137compilation1.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_EventNeedsBothAccessors).Verify( 27227compilation2.GetDiagnostics().Where(d => d.Code != (int)ErrorCode.ERR_EventNeedsBothAccessors).Verify( 51060compilation1.GetDiagnostics().VerifyErrorCodes(expected); 51081compilation3.GetDiagnostics().VerifyErrorCodes(expected); 68533compilation3.GetDiagnostics().VerifyErrorCodes( 68596compilation3.GetDiagnostics().VerifyErrorCodes( 68693compilation2.GetDiagnostics().VerifyErrorCodes( 68704compilation3.GetDiagnostics().VerifyErrorCodes(
Symbols\ExtensionMethodTests.cs (1)
2616CreateCompilation(text).GetDiagnostics();
Symbols\GenericConstraintTests.cs (1)
5858Assert.NotEmpty(compilation.GetDiagnostics());
Symbols\InterfaceImplementationTests.cs (7)
909Assert.False(comp.GetDiagnostics().Any(), string.Join("\n", comp.GetDiagnostics())); 970Assert.False(comp1.GetDiagnostics().Any(), string.Join("\n", comp1.GetDiagnostics())); 976Assert.False(comp2.GetDiagnostics().Any(), string.Join("\n", comp2.GetDiagnostics())); 1057Assert.False(comp.GetDiagnostics().Any());
Symbols\Metadata\MetadataMemberTests.cs (1)
395Assert.False(compilation.GetDiagnostics().Any());
Symbols\MissingSpecialMember.cs (4)
198comp.GetDiagnostics(); 205comp.GetDiagnostics(); 348comp.GetDiagnostics(); 433comp.GetDiagnostics();
Symbols\OverriddenOrHiddenMembersTests.cs (6)
900Assert.False(comp.GetDiagnostics().Any()); 1136Assert.Empty(comp.GetDiagnostics()); 1154Assert.Empty(comp.GetDiagnostics()); 1862Assert.Equal(0, comp.GetDiagnostics().Count()); 2198c2.GetDiagnostics().Verify(); 2241c2.GetDiagnostics().Verify();
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (5)
120Assert.False(comp2.GetDiagnostics().Any()); 349var d = comp1.GetDiagnostics(); 350Assert.False(comp1.GetDiagnostics().Any()); 357foreach (var diag in comp1.GetDiagnostics()) 384Assert.False(comp2.GetDiagnostics().Any());
Symbols\Source\BaseClassTests.cs (3)
1617Assert.Equal(0, c1.GetDiagnostics().Count()); 1618Assert.Equal(0, c2.GetDiagnostics().Count()); 1623Assert.Equal(0, c2.GetDiagnostics().Count());
Symbols\Source\ClsComplianceTests.cs (1)
3758CreateCompilationWithMscorlib40AndSystemCore(source, new[] { libRef }).GetDiagnostics();
Symbols\Source\EnumTests.cs (13)
173DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), 185DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), 205DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), new ErrorDescription { Code = (int)ErrorCode.ERR_IdentifierExpected }); 216DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), new ErrorDescription { Code = (int)ErrorCode.ERR_DuplicateNameInClass }); 290DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp1.GetDiagnostics(), new ErrorDescription { Code = (int)ErrorCode.ERR_IdentifierExpectedKW }, 328DiagnosticsUtils.VerifyErrorCodes(comp.GetDiagnostics()); 398DiagnosticsUtils.VerifyErrorCodes(comp.GetDiagnostics()); 427DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), new ErrorDescription { Code = (int)ErrorCode.ERR_DuplicateCaseLabel }); 470DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), new ErrorDescription { Code = (int)ErrorCode.ERR_NonInterfaceInInterfaceList }, 490DiagnosticsUtils.VerifyErrorCodesNoLineColumn(comp.GetDiagnostics(), new ErrorDescription { Code = (int)ErrorCode.ERR_EOFExpected }, 710DiagnosticsUtils.VerifyErrorCodes(comp.GetDiagnostics(), 723DiagnosticsUtils.VerifyErrorCodes(comp.GetDiagnostics()); // ok 731DiagnosticsUtils.VerifyErrorCodes(comp.GetDiagnostics(),
Symbols\Source\ExternAliasTests.cs (2)
89comp.GetDiagnostics().Verify(); 141comp.GetDiagnostics().Verify();
Symbols\Source\FileModifierTests.cs (3)
1799comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_FileTypeNested).Verify(); 1858comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_FileTypeNested).Verify(); 1866comp.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_FileTypeNested).Verify();
Symbols\Source\MethodTests.cs (9)
585Assert.Equal(0, comp.GetDiagnostics().Count()); 769Assert.Equal(0, comp1.GetDiagnostics().Count()); 770Assert.Equal(0, comp2.GetDiagnostics().Count()); 771Assert.Equal(0, comp.GetDiagnostics().Count()); 1058Assert.Equal(0, comp1.GetDiagnostics().Count()); 1059Assert.Equal(0, comp2.GetDiagnostics().Count()); 1060Assert.Equal(0, comp.GetDiagnostics().Count()); 1163Assert.Equal(0, comp.GetDiagnostics().Count()); 1257Assert.Equal(0, comp.GetDiagnostics().Count());
Symbols\Source\PropertyTests.cs (5)
518var actualErrors = compilation.GetDiagnostics(); 623var actualErrors = compilation.GetDiagnostics(); 1654var diagnostics = comp.GetDiagnostics(); 1691var diagnostics = comp.GetDiagnostics(); 1726var diagnostics = comp.GetDiagnostics();
Symbols\Source\UsingAliasTests.cs (1)
667var discarded = comp.GetDiagnostics();
Symbols\StaticAbstractMembersInInterfacesTests.cs (93)
4017compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 4062compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 4107compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 4455compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 4500compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 4545compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 5706compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 5753compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 5781compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 5830compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 7242compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify( 7336compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).Verify( 7441compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).Verify( 7547compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify( 7641compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify( 7740compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify( 7857compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).Verify( 7977compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_UnimplementedInterfaceMember).Verify( 8074compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify( 8171compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_InterfacesCantContainConversionOrEqualityOperators or (int)ErrorCode.ERR_UnimplementedInterfaceMember)).Verify( 8676compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 9131compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 9215compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 9991compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature).Verify( 10295compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 10415compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature or (int)ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers)).Verify( 12200compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify( 12299compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_RuntimeDoesNotSupportDefaultInterfaceImplementation).Verify(builder.ToArrayAndFree()); 12350compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 12484compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 12495compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify( 12649compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 12684compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 17610compilation1.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( 17753compilation1.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( 17889compilation1.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( 18032compilation1.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( 18144compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify( 18291compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify( 18511compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(expected); 18703compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify(expected); 18811compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(expected2); 18860compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify(expected3); 18912compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify( 18941compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify( 18965compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or 19007compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or (int)ErrorCode.WRN_EqualityOpWithoutGetHashCode)).Verify( 19068compilation2.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify( 19078compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType)).Verify( 19120compilation2.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( 19130compilation3.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( 19182compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch)).Verify( 19237compilation3.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_CheckedOperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify( 22050compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.WRN_ExternMethodNoImplementation or (int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_OperatorNeedsMatch)).Verify( 22200compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.WRN_ExternMethodNoImplementation or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify( 22266compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OpTFRetType or (int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify( 22311compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.ERR_BadAbstractEqualityOperatorSignature)).Verify( 27895compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28038compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28147compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28304compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28440compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28473compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28528compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28538compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28580compilation2.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 28590compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 29862compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.WRN_ExternMethodNoImplementation).Verify( 29992compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 30058compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_GenericConstraintNotSatisfiedInterfaceWithStaticAbstractMembers).Verify( 30535compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 30666compilation3.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32272compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32313compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32348compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32389compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32431compilation1.GetDiagnostics().Where(d => d.Code is not ((int)ErrorCode.ERR_OperatorNeedsMatch or (int)ErrorCode.WRN_EqualityOpWithoutEquals or 32477compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32519compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32555compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32597compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32659compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32697compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32729compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32767compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32799compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32837compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32869compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32907compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32939compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 32977compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 33009compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify( 33047compilation1.GetDiagnostics().Where(d => d.Code is not (int)ErrorCode.ERR_CheckedOperatorNeedsMatch).Verify(
Symbols\SymbolDistinguisherTests.cs (1)
744var diagnostics = compilation2.GetDiagnostics();
Symbols\SymbolErrorTests.cs (2)
20402comp3.GetDiagnostics().Verify(expected); 20406comp4.GetDiagnostics().Verify(expected);
Symbols\TypeTests.cs (10)
200Assert.Equal(0, comp1.GetDiagnostics().Count()); 201Assert.Equal(0, comp2.GetDiagnostics().Count()); 202Assert.Equal(0, comp.GetDiagnostics().Count()); 382Assert.Equal(0, comp.GetDiagnostics().Count()); 401Assert.Equal(0, comp.GetDiagnostics().Count()); 420Assert.Equal(0, comp.GetDiagnostics().Count()); 443Assert.Equal(0, comp.GetDiagnostics().Count()); 1236Assert.Equal(4, comp.GetDiagnostics().Count()); 1386Assert.Empty(comp.GetDiagnostics()); 1407Assert.Empty(comp.GetDiagnostics());
Symbols\TypeUnificationTests.cs (1)
420DiagnosticsUtils.VerifyErrorCodes(comp.GetDiagnostics(),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (111)
Diagnostics\DiagnosticTest.cs (5)
148var actualErrors = comp.GetDiagnostics(); 2437Assert.Equal(1, compilation.GetDiagnostics().Length); 2438Assert.Equal(1, compilation.GetDiagnostics().Length); 2486AssertEx.Equal(CreateCompilation(tree).GetDiagnostics(), CreateCompilation(tree).GetDiagnostics());
Parsing\AnonymousFunctionParsingTests.cs (23)
113CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 213CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 311CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 412CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 513CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 627CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify(); 768CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 877CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 2578CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 2726CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 2875CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 2994CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify(); 3140CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 3254CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 3404CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 3557CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 3711CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 3839CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify(); 3994CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 4117CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 4276CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 4438CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify( 4601CreateCompilation(test, parseOptions: TestOptions.Regular8).GetDiagnostics().Verify(
Parsing\ParserErrorMessageTests.cs (1)
5870CreateCompilation(test).GetDiagnostics().Verify(
Parsing\StatementAttributeParsingTests.cs (81)
79CreateCompilation(test).GetDiagnostics().Verify( 144CreateCompilation(test).GetDiagnostics().Verify( 228CreateCompilation(test).GetDiagnostics().Verify( 325CreateCompilation(test).GetDiagnostics().Verify( 410CreateCompilation(test).GetDiagnostics().Verify( 495CreateCompilation(test).GetDiagnostics().Verify( 561CreateCompilation(test).GetDiagnostics().Verify( 627CreateCompilation(test).GetDiagnostics().Verify( 701CreateCompilation(test).GetDiagnostics().Verify( 775CreateCompilation(test).GetDiagnostics().Verify( 850CreateCompilation(test).GetDiagnostics().Verify( 931CreateCompilation(test).GetDiagnostics().Verify( 1009CreateCompilation(test).GetDiagnostics().Verify( 1083CreateCompilation(test).GetDiagnostics().Verify( 1185CreateCompilation(test).GetDiagnostics().Verify( 1319CreateCompilation(test).GetDiagnostics().Verify( 1395CreateCompilation(test).GetDiagnostics().Verify( 1472CreateCompilation(test).GetDiagnostics().Verify( 1559CreateCompilation(test).GetDiagnostics().Verify( 1681CreateCompilation(test).GetDiagnostics().Verify( 1754CreateCompilation(test).GetDiagnostics().Verify( 1824CreateCompilation(test).GetDiagnostics().Verify( 1894CreateCompilation(test).GetDiagnostics().Verify( 1964CreateCompilation(test).GetDiagnostics().Verify( 2061CreateCompilation(test).GetDiagnostics().Verify( 2152CreateCompilation(test).GetDiagnostics().Verify( 2228CreateCompilation(test).GetDiagnostics().Verify( 2301CreateCompilation(test).GetDiagnostics().Verify( 2394CreateCompilation(test).GetDiagnostics().Verify( 2507CreateCompilation(test).GetDiagnostics().Verify( 2619CreateCompilation(test).GetDiagnostics().Verify( 2716CreateCompilation(test).GetDiagnostics().Verify( 2795CreateCompilation(test).GetDiagnostics().Verify( 2898CreateCompilation(test).GetDiagnostics().Verify( 2983CreateCompilation(test).GetDiagnostics().Verify( 3086CreateCompilation(test).GetDiagnostics().Verify( 3171CreateCompilation(test).GetDiagnostics().Verify( 3247CreateCompilation(test).GetDiagnostics().Verify( 3324CreateCompilation(test).GetDiagnostics().Verify( 3407CreateCompilation(test).GetDiagnostics().Verify( 3492CreateCompilation(test).GetDiagnostics().Verify( 3574CreateCompilation(test).GetDiagnostics().Verify( 3664CreateCompilation(test).GetDiagnostics().Verify( 3745CreateCompilation(test).GetDiagnostics().Verify( 3819CreateCompilation(test).GetDiagnostics().Verify( 3912CreateCompilation(test).GetDiagnostics().Verify( 3995CreateCompilation(test).GetDiagnostics().Verify( 4083CreateCompilation(test).GetDiagnostics().Verify( 4168CreateCompilation(test).GetDiagnostics().Verify( 4244CreateCompilation(test).GetDiagnostics().Verify( 4324CreateCompilation(test).GetDiagnostics().Verify( 4412CreateCompilation(test).GetDiagnostics().Verify( 4501CreateCompilation(test).GetDiagnostics().Verify( 4601CreateCompilation(test).GetDiagnostics().Verify( 4676CreateCompilation(test).GetDiagnostics().Verify( 4748CreateCompilation(test).GetDiagnostics().Verify( 4846CreateCompilation(test).GetDiagnostics().Verify( 4945CreateCompilation(test).GetDiagnostics().Verify( 5025CreateCompilation(test).GetDiagnostics().Verify( 5094CreateCompilation(test).GetDiagnostics().Verify( 5182CreateCompilation(test).GetDiagnostics().Verify( 5263CreateCompilation(test).GetDiagnostics().Verify( 5349CreateCompilation(test).GetDiagnostics().Verify( 5423CreateCompilation(test).GetDiagnostics().Verify( 5507CreateCompilation(test).GetDiagnostics().Verify( 5596CreateCompilation(test).GetDiagnostics().Verify( 5717CreateCompilation(test).GetDiagnostics().Verify( 5814CreateCompilation(test).GetDiagnostics().Verify( 5916CreateCompilation(test).GetDiagnostics().Verify( 6188CreateCompilation(test).GetDiagnostics().Verify( 6274CreateCompilation(test).GetDiagnostics().Verify( 6358CreateCompilation(test).GetDiagnostics().Verify( 6437CreateCompilation(test).GetDiagnostics().Verify( 6521CreateCompilation(test).GetDiagnostics().Verify( 6611CreateCompilation(test).GetDiagnostics().Verify( 6747CreateCompilation(test).GetDiagnostics().Verify( 6856CreateCompilation(tree).GetDiagnostics().Verify( 7119CreateCompilation(test).GetDiagnostics().Verify( 7226CreateCompilation(test).GetDiagnostics().Verify( 7328CreateCompilation(test).GetDiagnostics().Verify( 7437CreateCompilation(test).GetDiagnostics().Verify(
Syntax\LambdaUtilitiesTests.cs (1)
44compilation.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (5)
CSharpTestBase.cs (3)
1360var compileDiagnostics = comp.GetDiagnostics(); 2124var actualDiagnostics = compilation.GetDiagnostics().Where(d => d.Severity != DiagnosticSeverity.Hidden); 2135var actualDiagnostics = compilation.GetDiagnostics().Where(d => d.Severity != DiagnosticSeverity.Hidden);
DiagnosticTestUtilities.cs (2)
48var actualErrors = comp.GetDiagnostics(); 86var actualErrors = comp.GetDiagnostics();
SemanticSearch.BuildTask.UnitTests (3)
GenerateFilteredReferenceAssembliesTaskTests.cs (3)
130c.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify( 178c.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify( 227c.GetDiagnostics().Where(d => d.Severity == DiagnosticSeverity.Error).Verify(
StackDepthTest (1)
Program.cs (1)
82var diag = comp.GetDiagnostics();