mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
Add NOT_EQUAL* and NOT_WITHIN* checks for floats and doubles
This commit is contained in:
11
README.md
11
README.md
@@ -142,14 +142,25 @@ The bit is specified 0-31 for a 32-bit integer.
|
||||
### Numerical Assertions: Floats
|
||||
|
||||
TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)
|
||||
TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual)
|
||||
|
||||
Asserts that the actual value is within plus or minus delta of the expected value.
|
||||
|
||||
TEST_ASSERT_FLOAT_NOT_WITHIN(delta, expected, actual)
|
||||
TEST_ASSERT_DOUBLE_NOT_WITHIN(delta, expected, actual)
|
||||
|
||||
Asserts that the actual value is NOT within plus or minus delta of the expected value.
|
||||
|
||||
TEST_ASSERT_EQUAL_FLOAT(expected, actual)
|
||||
TEST_ASSERT_EQUAL_DOUBLE(expected, actual)
|
||||
|
||||
Asserts that two floating point values are "equal" within a small % delta of the expected value.
|
||||
|
||||
TEST_ASSERT_NOT_EQUAL_FLOAT(expected, actual)
|
||||
TEST_ASSERT_NOT_EQUAL_DOUBLE(expected, actual)
|
||||
|
||||
Asserts that two floating point values are NOT "equal" within a small % delta of the expected value.
|
||||
|
||||
TEST_ASSERT_LESS_THAN_FLOAT(threshold, actual)
|
||||
TEST_ASSERT_LESS_THAN_DOUBLE(threshold, actual)
|
||||
TEST_ASSERT_GREATER_THAN_FLOAT(threshold, actual)
|
||||
|
||||
Reference in New Issue
Block a user