Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the outcome logic for OrConstraintResult by correcting the order of condition checks in the Or method. The fix ensures that Success outcomes properly short-circuit the evaluation, returning Success immediately when either operand is successful, which aligns with logical OR semantics.
- Corrected the
Ormethod logic to prioritizeSuccessoutcomes overUndecided - Enhanced test infrastructure with better equality implementations and value handling
- Added comprehensive test coverage for node equality, negation, and mapping behaviors
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Source/aweXpect.Core/Core/Nodes/OrNode.cs |
Fixed Or method logic and improved GetHashCode implementation |
Source/aweXpect.Core/Core/Nodes/AndNode.cs |
Enhanced GetHashCode implementation for consistency |
Source/aweXpect.Core/Core/Nodes/ExpectationNode.cs |
Improved GetHashCode to consider constraint and inner node |
Tests/aweXpect.Core.Tests/TestHelpers/DummyNode.cs |
Added equality implementation and reason tracking |
Tests/aweXpect.Core.Tests/TestHelpers/DummyConstraintResult.cs |
Enhanced with value support and additional constructor |
| Various test files | Added comprehensive test coverage for node behaviors and edge cases |
|
🚀 Benchmark ResultsDetails
|
👽 Mutation ResultsaweXpectDetails
The final mutation score is NaN%Coverage Thresholds: high:80 low:60 break:0aweXpect.CoreDetails
The final mutation score is 93.46%Coverage Thresholds: high:80 low:60 break:0 |
|
This is addressed in release v2.23.0. |

This PR fixes the outcome logic for
OrConstraintResultby correcting the order of condition checks in theOrmethod. The fix ensures thatSuccessoutcomes properly short-circuit the evaluation, returningSuccessimmediately when either operand is successful, which aligns with logical OR semantics.Key changes:
Ormethod logic to prioritizeSuccessoutcomes overUndecided