Skip to content

Conversation

burakutkuc
Copy link
Contributor

@burakutkuc burakutkuc commented Jun 5, 2025

Related to ThrowTheSwitch/CMock#509

In addition:

The following guard clause:

if ((threshold == actual) && (compare & UNITY_EQUAL_TO)) { return; }
if ((threshold == actual))                               { failed = 1; }

was replaced with:

if ((threshold == actual) && !(compare & UNITY_EQUAL_TO)) { failed = 1; }

The goal was to align the behavior of the UnityAssertGreaterOrLessOrEqualNumber function with its name.
In the previous implementation, the function would return early without handling "greater or equal" or "less or equal" cases.
With this update, the function properly allows those comparisons when no failure condition is met.

…HEX asserts as unsigned; applied the same unsigned logic across all integer-based comparisons.
@burakutkuc burakutkuc force-pushed the fix-assert-uint-overflow branch from dd48114 to ac52c41 Compare June 13, 2025 13:25
@mvandervoord
Copy link
Member

Hi @burakutkuc -- my apologies for taking so long to get back to you on this. I really appreciate that you've chosen to help this project!

Running the regression tests, it appears there are still some changes to make (see links above). Do you have time to take a look at them?

…y int-uint distinction for hex values in the "array within" feature.
@burakutkuc
Copy link
Contributor Author

Hi @mvandervoord , no worries at all. thanks for getting back.

I’ve reviewed the test results and fixed the issue. it should be all good now.

@mvandervoord mvandervoord merged commit 0bc0fed into ThrowTheSwitch:master Jul 10, 2025
4 checks passed
@joukewitteveen joukewitteveen mentioned this pull request Aug 7, 2025
ml-physec added a commit to ml-physec/Unity that referenced this pull request Aug 7, 2025
ml-physec added a commit to ml-physec/Unity that referenced this pull request Aug 7, 2025
mvandervoord added a commit that referenced this pull request Aug 7, 2025
Update detail-stack implementation after #784
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.

2 participants