Lines Matching refs:actual
596 static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
610 if (actual != NULL)
613 UnityPrint(actual);
624 const char* actual,
639 if (actual != NULL)
642 UnityPrintLen(actual, length);
657 UNITY_INTERNAL_PTR actual,
662 if (expected == actual) { return 0; }
673 /* print and return true if just actual is NULL */
674 if (actual == NULL)
692 const UNITY_INT actual,
698 if ((mask & expected) != (mask & actual))
704 UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)actual);
712 const UNITY_INT actual,
719 if (expected != actual)
725 UnityPrintNumberByStyle(actual, style);
733 const UNITY_INT actual,
742 if ((threshold == actual) && (compare & UNITY_EQUAL_TO)) { return; }
743 if ((threshold == actual)) { failed = 1; }
747 if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
748 if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
752 if (((UNITY_UINT)actual > (UNITY_UINT)threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
753 if (((UNITY_UINT)actual < (UNITY_UINT)threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
760 UnityPrintNumberByStyle(actual, style);
781 UNITY_INTERNAL_PTR actual,
797 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
803 if (expected == actual)
808 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
822 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
833 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
845 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
853 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
890 actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
897 #define UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff) \
898 if (UNITY_IS_INF(expected) && UNITY_IS_INF(actual) && (((expected) < 0) == ((actual) < 0))) return 1; \
900 (diff) = (actual) - (expected); \
906 #define UNITY_NAN_CHECK UNITY_IS_NAN(expected) && UNITY_IS_NAN(actual)
912 #define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
917 UnityPrintFloat(actual); \
920 #define UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual) \
925 static int UnityFloatsWithin(UNITY_FLOAT delta, UNITY_FLOAT expected, UNITY_FLOAT actual)
928 UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
934 UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* actual,
942 UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_actual = actual;
951 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
968 if (expected == actual)
973 if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
1014 const UNITY_FLOAT actual,
1021 if (!UnityFloatsWithin(delta, expected, actual))
1024 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
1033 const UNITY_FLOAT actual,
1039 if (UnityFloatsWithin(delta, expected, actual))
1045 UnityPrintFloat((UNITY_DOUBLE)actual);
1053 const UNITY_FLOAT actual,
1065 if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
1066 if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
1068 if ((compare & UNITY_EQUAL_TO) && UnityFloatsWithin(threshold * UNITY_FLOAT_PRECISION, threshold, actual)) { failed = 0; }
1074 UnityPrintFloat(actual);
1085 void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
1101 is_trait = UNITY_IS_INF(actual) && (actual > 0);
1105 is_trait = UNITY_IS_INF(actual) && (actual < 0);
1110 is_trait = UNITY_IS_NAN(actual) ? 1 : 0;
1115 is_trait = !UNITY_IS_INF(actual) && !UNITY_IS_NAN(actual);
1136 UnityPrintFloat((UNITY_DOUBLE)actual);
1153 static int UnityDoublesWithin(UNITY_DOUBLE delta, UNITY_DOUBLE expected, UNITY_DOUBLE actual)
1156 UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
1162 UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* actual,
1170 UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_actual = actual;
1179 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
1196 if (expected == actual)
1201 if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
1242 const UNITY_DOUBLE actual,
1248 if (!UnityDoublesWithin(delta, expected, actual))
1251 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
1260 const UNITY_DOUBLE actual,
1266 if (UnityDoublesWithin(delta, expected, actual))
1272 UnityPrintFloat((UNITY_DOUBLE)actual);
1280 const UNITY_DOUBLE actual,
1292 if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; }
1293 if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; }
1295 if ((compare & UNITY_EQUAL_TO) && UnityDoublesWithin(threshold * UNITY_DOUBLE_PRECISION, threshold, actual)) { failed = 0; }
1301 UnityPrintFloat(actual);
1312 void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
1328 is_trait = UNITY_IS_INF(actual) && (actual > 0);
1332 is_trait = UNITY_IS_INF(actual) && (actual < 0);
1337 is_trait = UNITY_IS_NAN(actual) ? 1 : 0;
1342 is_trait = !UNITY_IS_INF(actual) && !UNITY_IS_NAN(actual);
1363 UnityPrintFloat(actual);
1381 const UNITY_INT actual,
1390 if (actual > expected)
1392 Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
1396 Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
1401 if ((UNITY_UINT)actual > (UNITY_UINT)expected)
1403 Unity.CurrentTestFailed = (((UNITY_UINT)actual - (UNITY_UINT)expected) > delta);
1407 Unity.CurrentTestFailed = (((UNITY_UINT)expected - (UNITY_UINT)actual) > delta);
1419 UnityPrintNumberByStyle(actual, style);
1428 UNITY_INTERNAL_PTR actual,
1444 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
1450 if (expected == actual)
1455 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
1472 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)actual;
1478 actual_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT8*)actual;
1488 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)actual;
1494 actual_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT16*)actual;
1505 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)actual;
1511 actual_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT64*)actual;
1523 actual_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)actual;
1529 actual_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT32*)actual;
1585 actual = (UNITY_INTERNAL_PTR)((const char*)actual + increment);
1591 const char* actual,
1600 if (expected && actual)
1602 for (i = 0; expected[i] || actual[i]; i++)
1604 if (expected[i] != actual[i])
1613 if (expected || actual)
1622 UnityPrintExpectedAndActualStrings(expected, actual);
1630 const char* actual,
1640 if (expected && actual)
1642 for (i = 0; (i < length) && (expected[i] || actual[i]); i++)
1644 if (expected[i] != actual[i])
1653 if (expected || actual)
1662 UnityPrintExpectedAndActualStringsLen(expected, actual, length);
1670 const char** actual,
1687 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
1693 if ((const void*)expected == (const void*)actual)
1698 if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg))
1710 act = actual[j];
1753 UNITY_INTERNAL_PTR actual,
1761 UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
1770 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
1780 if (expected == actual)
1785 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))