1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Add macros for testing inequalities between floats, doubles

This commit is contained in:
Jonathan Reichelt Gjertsen
2021-05-24 14:53:29 +02:00
parent 27ef0eb44e
commit 410de1a02b
7 changed files with 559 additions and 0 deletions

View File

@@ -595,6 +595,20 @@ specified delta comparison values requires a custom-implemented floating point
array assertion.
##### `TEST_ASSERT_LESS_THAN_FLOAT (threshold, actual)`
Asserts that the `actual` parameter is less than `threshold` (exclusive).
For example, if the threshold value is 1.0f, the assertion will fail if it is
greater than 1.0f.
##### `TEST_ASSERT_GREATER_THAN_FLOAT (threshold, actual)`
Asserts that the `actual` parameter is greater than `threshold` (exclusive).
For example, if the threshold value is 1.0f, the assertion will fail if it is
less than 1.0f.
##### `TEST_ASSERT_FLOAT_IS_INF (actual)`
Asserts that `actual` parameter is equivalent to positive infinity floating
@@ -670,6 +684,20 @@ specified delta comparison values requires a custom implemented double array
assertion.
##### `TEST_ASSERT_LESS_THAN_DOUBLE (threshold, actual)`
Asserts that the `actual` parameter is less than `threshold` (exclusive).
For example, if the threshold value is 1.0, the assertion will fail if it is
greater than 1.0.
##### `TEST_ASSERT_GREATER_THAN_DOUBLE (threshold, actual)`
Asserts that the `actual` parameter is greater than `threshold` (exclusive).
For example, if the threshold value is 1.0, the assertion will fail if it is
less than 1.0.
##### `TEST_ASSERT_DOUBLE_IS_INF (actual)`
Asserts that `actual` parameter is equivalent to positive infinity floating