@@ -356,11 +356,11 @@ void UnityPrintFloat(const UNITY_DOUBLE input_number)
356356 {
357357 UnityPrint ("0" );
358358 }
359- else if (isnan (number ))
359+ else if (UNITY_IS_NAN (number ))
360360 {
361361 UnityPrint ("nan" );
362362 }
363- else if (isinf (number ))
363+ else if (UNITY_IS_INF (number ))
364364 {
365365 UnityPrint ("inf" );
366366 }
@@ -895,15 +895,15 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
895895#ifndef UNITY_EXCLUDE_FLOAT
896896/* Wrap this define in a function with variable types as float or double */
897897#define UNITY_FLOAT_OR_DOUBLE_WITHIN (delta , expected , actual , diff ) \
898- if (isinf (expected) && isinf (actual) && (((expected) < 0) == ((actual) < 0))) return 1; \
898+ if (UNITY_IS_INF (expected) && UNITY_IS_INF (actual) && (((expected) < 0) == ((actual) < 0))) return 1; \
899899 if (UNITY_NAN_CHECK) return 1; \
900900 (diff) = (actual) - (expected); \
901901 if ((diff) < 0) (diff) = -(diff); \
902902 if ((delta) < 0) (delta) = -(delta); \
903- return !(isnan (diff) || isinf (diff) || ((diff) > (delta)))
903+ return !(UNITY_IS_NAN (diff) || UNITY_IS_INF (diff) || ((diff) > (delta)))
904904 /* This first part of this condition will catch any NaN or Infinite values */
905905#ifndef UNITY_NAN_NOT_EQUAL_NAN
906- #define UNITY_NAN_CHECK isnan (expected) && isnan (actual)
906+ #define UNITY_NAN_CHECK UNITY_IS_NAN (expected) && UNITY_IS_NAN (actual)
907907#else
908908 #define UNITY_NAN_CHECK 0
909909#endif
@@ -954,12 +954,12 @@ void UnityAssertWithinFloatArray(const UNITY_FLOAT delta,
954954#endif
955955 }
956956
957- if (isinf (in_delta ))
957+ if (UNITY_IS_INF (in_delta ))
958958 {
959959 return ; /* Arrays will be force equal with infinite delta */
960960 }
961961
962- if (isnan (in_delta ))
962+ if (UNITY_IS_NAN (in_delta ))
963963 {
964964 /* Delta must be correct number */
965965 UnityPrintPointlessAndBail ();
@@ -1098,21 +1098,21 @@ void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
10981098 {
10991099 case UNITY_FLOAT_IS_INF :
11001100 case UNITY_FLOAT_IS_NOT_INF :
1101- is_trait = isinf (actual ) && (actual > 0 );
1101+ is_trait = UNITY_IS_INF (actual ) && (actual > 0 );
11021102 break ;
11031103 case UNITY_FLOAT_IS_NEG_INF :
11041104 case UNITY_FLOAT_IS_NOT_NEG_INF :
1105- is_trait = isinf (actual ) && (actual < 0 );
1105+ is_trait = UNITY_IS_INF (actual ) && (actual < 0 );
11061106 break ;
11071107
11081108 case UNITY_FLOAT_IS_NAN :
11091109 case UNITY_FLOAT_IS_NOT_NAN :
1110- is_trait = isnan (actual ) ? 1 : 0 ;
1110+ is_trait = UNITY_IS_NAN (actual ) ? 1 : 0 ;
11111111 break ;
11121112
11131113 case UNITY_FLOAT_IS_DET : /* A determinate number is non infinite and not NaN. */
11141114 case UNITY_FLOAT_IS_NOT_DET :
1115- is_trait = !isinf (actual ) && !isnan (actual );
1115+ is_trait = !UNITY_IS_INF (actual ) && !UNITY_IS_NAN (actual );
11161116 break ;
11171117
11181118 case UNITY_FLOAT_INVALID_TRAIT : /* Supress warning */
@@ -1182,12 +1182,12 @@ void UnityAssertWithinDoubleArray(const UNITY_DOUBLE delta,
11821182#endif
11831183 }
11841184
1185- if (isinf (in_delta ))
1185+ if (UNITY_IS_INF (in_delta ))
11861186 {
11871187 return ; /* Arrays will be force equal with infinite delta */
11881188 }
11891189
1190- if (isnan (in_delta ))
1190+ if (UNITY_IS_NAN (in_delta ))
11911191 {
11921192 /* Delta must be correct number */
11931193 UnityPrintPointlessAndBail ();
@@ -1325,21 +1325,21 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
13251325 {
13261326 case UNITY_FLOAT_IS_INF :
13271327 case UNITY_FLOAT_IS_NOT_INF :
1328- is_trait = isinf (actual ) && (actual > 0 );
1328+ is_trait = UNITY_IS_INF (actual ) && (actual > 0 );
13291329 break ;
13301330 case UNITY_FLOAT_IS_NEG_INF :
13311331 case UNITY_FLOAT_IS_NOT_NEG_INF :
1332- is_trait = isinf (actual ) && (actual < 0 );
1332+ is_trait = UNITY_IS_INF (actual ) && (actual < 0 );
13331333 break ;
13341334
13351335 case UNITY_FLOAT_IS_NAN :
13361336 case UNITY_FLOAT_IS_NOT_NAN :
1337- is_trait = isnan (actual ) ? 1 : 0 ;
1337+ is_trait = UNITY_IS_NAN (actual ) ? 1 : 0 ;
13381338 break ;
13391339
13401340 case UNITY_FLOAT_IS_DET : /* A determinate number is non infinite and not NaN. */
13411341 case UNITY_FLOAT_IS_NOT_DET :
1342- is_trait = !isinf (actual ) && !isnan (actual );
1342+ is_trait = !UNITY_IS_INF (actual ) && !UNITY_IS_NAN (actual );
13431343 break ;
13441344
13451345 case UNITY_FLOAT_INVALID_TRAIT : /* Supress warning */
0 commit comments