Lines Matching refs:actual
422 static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
436 if (actual != NULL)
439 UnityPrint(actual);
450 const char* actual,
465 if (actual != NULL)
468 UnityPrintLen(actual, length);
482 UNITY_INTERNAL_PTR actual,
486 if (expected == actual) return 0; /* Both are NULL or same pointer */
497 /* print and return true if just actual is NULL */
498 if (actual == NULL)
515 const UNITY_INT actual,
521 if ((mask & expected) != (mask & actual))
527 UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)actual);
535 const UNITY_INT actual,
542 if (expected != actual)
548 UnityPrintNumberByStyle(actual, style);
556 const UNITY_INT actual,
565 if (threshold == actual && compare & UNITY_EQUAL_TO) return;
566 if (threshold == actual) failed = 1;
570 if (actual > threshold && compare & UNITY_SMALLER_THAN) failed = 1;
571 if (actual < threshold && compare & UNITY_GREATER_THAN) failed = 1;
575 if ((UNITY_UINT)actual > (UNITY_UINT)threshold && compare & UNITY_SMALLER_THAN) failed = 1;
576 if ((UNITY_UINT)actual < (UNITY_UINT)threshold && compare & UNITY_GREATER_THAN) failed = 1;
583 UnityPrintNumberByStyle(actual, style);
602 UNITY_INTERNAL_PTR actual,
619 if (expected == actual) return; /* Both are NULL or same pointer */
620 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
631 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
635 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
640 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
645 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
673 actual = (UNITY_INTERNAL_PTR)(length + (const char*)actual);
680 #define UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff) \
681 if (isinf(expected) && isinf(actual) && ((expected < 0) == (actual < 0))) return 1; \
683 diff = actual - expected; \
689 #define UNITY_NAN_CHECK isnan(expected) && isnan(actual)
695 #define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
700 UnityPrintFloat(actual); }
702 #define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
706 static int UnityFloatsWithin(UNITY_FLOAT delta, UNITY_FLOAT expected, UNITY_FLOAT actual)
709 UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
713 UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* actual,
721 UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_actual = actual;
730 if (expected == actual) return; /* Both are NULL or same pointer */
731 if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
756 const UNITY_FLOAT actual,
763 if (!UnityFloatsWithin(delta, expected, actual))
766 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
773 void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
789 is_trait = isinf(actual) && (actual > 0);
793 is_trait = isinf(actual) && (actual < 0);
798 is_trait = isnan(actual) ? 1 : 0;
803 is_trait = !isinf(actual) && !isnan(actual);
821 UnityPrintFloat((UNITY_DOUBLE)actual);
836 static int UnityDoublesWithin(UNITY_DOUBLE delta, UNITY_DOUBLE expected, UNITY_DOUBLE actual)
839 UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
843 UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* actual,
851 UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_actual = actual;
860 if (expected == actual) return; /* Both are NULL or same pointer */
861 if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
886 const UNITY_DOUBLE actual,
892 if (!UnityDoublesWithin(delta, expected, actual))
895 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
903 void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
919 is_trait = isinf(actual) && (actual > 0);
923 is_trait = isinf(actual) && (actual < 0);
928 is_trait = isnan(actual) ? 1 : 0;
933 is_trait = !isinf(actual) && !isnan(actual);
951 UnityPrintFloat(actual);
967 const UNITY_INT actual,
976 if (actual > expected)
977 Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta);
979 Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta);
983 if ((UNITY_UINT)actual > (UNITY_UINT)expected)
984 Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta);
986 Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta);
997 UnityPrintNumberByStyle(actual, style);
1005 const char* actual,
1014 if (expected && actual)
1016 for (i = 0; expected[i] || actual[i]; i++)
1018 if (expected[i] != actual[i])
1027 if (expected != actual)
1036 UnityPrintExpectedAndActualStrings(expected, actual);
1044 const char* actual,
1054 if (expected && actual)
1056 for (i = 0; (i < length) && (expected[i] || actual[i]); i++)
1058 if (expected[i] != actual[i])
1067 if (expected != actual)
1076 UnityPrintExpectedAndActualStringsLen(expected, actual, length);
1084 const char** actual,
1103 if ((const void*)expected == (const void*)actual)
1108 if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
1120 act = actual[j];
1163 UNITY_INTERNAL_PTR actual,
1171 UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
1182 if (expected == actual) return; /* Both are NULL or same pointer */
1183 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))