-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add macros for testing inequalities between floats, doubles #560
Add macros for testing inequalities between floats, doubles #560
Conversation
Tests are passing in my fork where I've enabled workflows for the branch https://github.com/jonathangjertsen/Unity/runs/2656539535?check_suite_focus=true (there is another unrelated failure which is fixed by #557) |
7b24a4f
to
c66b567
Compare
c66b567
to
410de1a
Compare
# Conflicts: # README.md # docs/UnityAssertionsReference.md
Any thoughts, @mvandervoord? I found myself wanting this feature again today. |
People have been wanting this for awhile. Thanks for the hard work! Do you have any interest in expanding this to support GREATER_THAN_OR_EQUAL (maybe just GE?) and LESS_THAN_OR_EQUAL and maybe NOT_EQUAL so we have a complete set of comparitors? |
Sure, will do. I think it should be GREATER_THAN_OR_EQUAL rather than GE for consistency |
Added:
|
The CI pipeline is not running since it's awaiting approval by a maintainer - but it is passing in my fork: jonathangjertsen#2 |
Is there anything else required for this to be merged (or at least reviewed)? |
Fixes issue #559
Also fixed some formatting errors in the assertions reference.
I did not do the
<=
/>=
variants because I'm not sure what the API should be (TEST_ASSERT_LESS_OR_EQUAL_FLOAT(threshold, actual)
?TEST_ASSERT_LESS_OR_WITHIN_FLOAT(threshold, delta, actual)
?), and I can't think of a case where they would be useful.