Skip to content

Cleanup dead asserts inside Assert.Throws - #12831

Merged
JanProvaznik merged 1 commit into
mainfrom
dev/ygerges/dead-asserts
Nov 25, 2025
Merged

JanProvaznik merged 1 commit into
mainfrom
dev/ygerges/dead-asserts

Conversation

@Youssef1313

Copy link
Copy Markdown
Member

Fixes #

Context

Changes Made

Testing

Notes

Copilot AI review requested due to automatic review settings November 25, 2025 14:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes dead/unreachable assertion statements that were incorrectly placed inside Assert.Throws blocks. When code inside Assert.Throws throws an exception (which is the expected behavior), any subsequent code in that block becomes unreachable, making the inner assertions ineffective and misleading.

  • Removes Assert.False calls that were unreachable inside Assert.Throws blocks
  • Keeps the actual method calls that trigger the expected exceptions

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