Skip to content

Remove duplicate test cases in MultithreadableTaskAnalyzer#13483

Merged
JanProvaznik merged 1 commit intomainfrom
dev/ygerges/delete-dup-tests
Apr 2, 2026
Merged

Remove duplicate test cases in MultithreadableTaskAnalyzer#13483
JanProvaznik merged 1 commit intomainfrom
dev/ygerges/delete-dup-tests

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

The deleted test methods are already tested in MultiThreadableTaskCodeFixProviderTests which covers both the analyzer and the codefix.

The deleted test methods are already tested in MultiThreadableTaskCodeFixProviderTests which covers both the analyzer and the codefix
@Youssef1313 Youssef1313 marked this pull request as ready for review April 1, 2026 20:50
Copilot AI review requested due to automatic review settings April 1, 2026 20:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces redundant unit test coverage in the ThreadSafeTaskAnalyzer test suite by removing analyzer-only test cases that are already exercised via the code-fix test harness, and it slightly simplifies test code by using an unqualified Roslyn severity enum.

Changes:

  • Removed duplicate analyzer test methods that are already covered by MultiThreadableTaskCodeFixProviderTests (which validates both analyzer diagnostics and code fixes).
  • Simplified DiagnosticSeverity usage in code-fix tests by adding a Microsoft.CodeAnalysis using and dropping the fully-qualified reference.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/ThreadSafeTaskAnalyzer.Tests/MultiThreadableTaskCodeFixProviderTests.cs Adds Microsoft.CodeAnalysis import and uses DiagnosticSeverity.Warning directly in the helper that builds expected diagnostics.
src/ThreadSafeTaskAnalyzer.Tests/MultiThreadableTaskAnalyzerTests.cs Deletes analyzer-only tests for scenarios that are already validated through code-fix tests, reducing duplication.

@JanProvaznik JanProvaznik changed the title Remove duplicate test cases Remove duplicate test cases in MultithreadableTaskAnalyzer Apr 2, 2026
@JanProvaznik JanProvaznik merged commit 926e304 into main Apr 2, 2026
14 checks passed
@JanProvaznik JanProvaznik deleted the dev/ygerges/delete-dup-tests branch April 2, 2026 11:24
dfederm pushed a commit to dfederm/msbuild that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants