1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-26 18:01:35 +01:00

Finish clean up of float support options

This commit is contained in:
jsalling
2016-12-29 23:52:03 -06:00
parent e92f2c2762
commit 4c78cde202
2 changed files with 16 additions and 27 deletions

View File

@@ -686,6 +686,7 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
}
/*-----------------------------------------------*/
#ifndef UNITY_EXCLUDE_FLOAT
/* Wrap this define in a function with variable types as float or double */
#define UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff) \
if (isinf(expected) && isinf(actual) && (isneg(expected) == isneg(actual))) return 1; \
@@ -714,7 +715,6 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
UnityPrint(UnityStrDelta)
#endif /* UNITY_EXCLUDE_FLOAT_PRINT */
#ifndef UNITY_EXCLUDE_FLOAT
static int UnityFloatsWithin(UNITY_FLOAT delta, UNITY_FLOAT expected, UNITY_FLOAT actual)
{
UNITY_FLOAT diff;