mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-07-15 00:52:46 +08:00
Merge pull request #241 from jsalling/cleanup/float-testing
Cleanup floating point print testing, update docs
This commit is contained in:
@ -642,6 +642,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; \
|
||||
@ -670,7 +671,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;
|
||||
|
Reference in New Issue
Block a user