Skip to content

Commit 35825a0

Browse files
committed
Revert test changes
1 parent 23517e1 commit 35825a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/EditorFeatures/Test/Diagnostics/DiagnosticAnalyzerServiceTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,9 @@ internal async Task TestAdditionalFileAnalyzer(bool registerFromInitialize, bool
686686

687687
var expectedCount = (analysisScope, testMultiple) switch
688688
{
689-
(BackgroundAnalysisScope.None, _) => 0,
690-
(BackgroundAnalysisScope.VisibleFilesAndFilesWithPreviouslyReportedDiagnostics or BackgroundAnalysisScope.OpenFiles or BackgroundAnalysisScope.FullSolution, false) => 1,
691-
(BackgroundAnalysisScope.VisibleFilesAndFilesWithPreviouslyReportedDiagnostics or BackgroundAnalysisScope.OpenFiles, true) => 2,
689+
(BackgroundAnalysisScope.None or BackgroundAnalysisScope.VisibleFilesAndFilesWithPreviouslyReportedDiagnostics, _) => 0,
690+
(BackgroundAnalysisScope.OpenFiles or BackgroundAnalysisScope.FullSolution, false) => 1,
691+
(BackgroundAnalysisScope.OpenFiles, true) => 2,
692692
(BackgroundAnalysisScope.FullSolution, true) => 4,
693693
_ => throw ExceptionUtilities.Unreachable(),
694694
};
@@ -704,11 +704,11 @@ internal async Task TestAdditionalFileAnalyzer(bool registerFromInitialize, bool
704704
d => d.Id == analyzer.Descriptor.Id && d.DataLocation.UnmappedFileSpan.Path == additionalDoc.FilePath);
705705

706706
var text = await additionalDoc.GetTextAsync();
707-
if (analysisScope is BackgroundAnalysisScope.None)
707+
if (analysisScope is BackgroundAnalysisScope.None or BackgroundAnalysisScope.VisibleFilesAndFilesWithPreviouslyReportedDiagnostics)
708708
{
709709
Assert.Empty(applicableDiagnostics);
710710
}
711-
else if (analysisScope is BackgroundAnalysisScope.VisibleFilesAndFilesWithPreviouslyReportedDiagnostics or BackgroundAnalysisScope.OpenFiles &&
711+
else if (analysisScope == BackgroundAnalysisScope.OpenFiles &&
712712
firstAdditionalDocument != additionalDoc)
713713
{
714714
Assert.Empty(applicableDiagnostics);

0 commit comments

Comments
 (0)