Skip to content

Conversation

@jeffhandley
Copy link
Member

This is a follow-up to #118291 that augments the tests to exercise the removed IEquatable constraint on ArgumentOutOfRangeException.ThrowIfEqual and ArgumentOutOfRangeException.ThrowIfNotEqual.

@jeffhandley jeffhandley self-assigned this Sep 2, 2025
Copilot AI review requested due to automatic review settings September 2, 2025 11:43
@jeffhandley jeffhandley added area-System.Runtime test-enhancement Improvements of test source code labels Sep 2, 2025
Copy link
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 enhances the test coverage for ArgumentOutOfRangeException.ThrowIfEqual and ArgumentOutOfRangeException.ThrowIfNotEqual methods following the removal of IEquatable constraints in PR #118291. The changes add test cases for types that don't implement IEquatable to ensure the methods work correctly with the relaxed type constraints.

Key changes:

  • Added test cases for nullable value types (int?)
  • Added test cases for enum types (ConsoleKey)
  • Verified both throwing and non-throwing scenarios for these new type categories

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

@jeffhandley jeffhandley merged commit 8c7b356 into dotnet:main Sep 2, 2025
91 checks passed
@jeffhandley jeffhandley deleted the jeffhandley/exception-tests branch September 2, 2025 21:48
filipnavara pushed a commit to filipnavara/runtime that referenced this pull request Sep 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Runtime test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants