mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-07-15 00:52:46 +08:00
Fix For Issue #10 - TEST_ASSERT_EQUAL_FLOAT doesn't fail if actual value is a NaN.
This commit is contained in:
@ -578,7 +578,8 @@ void UnityAssertFloatsWithin(const _UF delta,
|
||||
pos_delta = 0.0f - pos_delta;
|
||||
}
|
||||
|
||||
if (pos_delta < diff)
|
||||
// NOTE: This comparrison is deliberately this way round so that NaNs fail.
|
||||
if ( ! (pos_delta >= diff) )
|
||||
{
|
||||
UnityTestResultsFailBegin(lineNumber);
|
||||
#ifdef UNITY_FLOAT_VERBOSE
|
||||
|
Reference in New Issue
Block a user