{{ message }}
Add macros for testing inequalities between floats, doubles#560
Merged
Conversation
Contributor
Author
7b24a4f to
c66b567
Compare
c66b567 to
410de1a
Compare
# Conflicts: # README.md # docs/UnityAssertionsReference.md
Contributor
Author
|
Any thoughts, @mvandervoord? I found myself wanting this feature again today. |
Member
|
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? |
Contributor
Author
|
Sure, will do. I think it should be GREATER_THAN_OR_EQUAL rather than GE for consistency |
added 4 commits
December 3, 2021 18:23
Contributor
Author
|
Added: |
Contributor
Author
|
The CI pipeline is not running since it's awaiting approval by a maintainer - but it is passing in my fork: jonathangjertsen#2 |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.