Lines Matching defs:expected

596 static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
599 if (expected != NULL)
602 UnityPrint(expected);
623 static void UnityPrintExpectedAndActualStringsLen(const char* expected,
628 if (expected != NULL)
631 UnityPrintLen(expected, length);
656 static int UnityIsOneArrayNull(UNITY_INTERNAL_PTR expected,
662 if (expected == actual) { return 0; }
664 /* print and return true if just expected is NULL */
665 if (expected == NULL)
691 const UNITY_INT expected,
698 if ((mask & expected) != (mask & actual))
702 UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)expected);
711 void UnityAssertEqualNumber(const UNITY_INT expected,
719 if (expected != actual)
723 UnityPrintNumberByStyle(expected, style);
780 void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
797 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
803 if (expected == actual)
808 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
821 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
832 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
844 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
852 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
888 expected = (UNITY_INTERNAL_PTR)((const char*)expected + 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) \
915 UnityPrintFloat(expected); \
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);
933 UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* expected,
941 UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_expected = expected;
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))
1013 const UNITY_FLOAT expected,
1021 if (!UnityFloatsWithin(delta, expected, actual))
1024 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT((UNITY_DOUBLE)expected, (UNITY_DOUBLE)actual);
1032 const UNITY_FLOAT expected,
1039 if (UnityFloatsWithin(delta, expected, actual))
1043 UnityPrintFloat((UNITY_DOUBLE)expected);
1153 static int UnityDoublesWithin(UNITY_DOUBLE delta, UNITY_DOUBLE expected, UNITY_DOUBLE actual)
1156 UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
1161 UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* expected,
1169 UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_expected = expected;
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))
1241 const UNITY_DOUBLE expected,
1248 if (!UnityDoublesWithin(delta, expected, actual))
1251 UNITY_PRINT_EXPECTED_AND_ACTUAL_FLOAT(expected, actual);
1259 const UNITY_DOUBLE expected,
1266 if (UnityDoublesWithin(delta, expected, actual))
1270 UnityPrintFloat((UNITY_DOUBLE)expected);
1380 const UNITY_INT expected,
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);
1417 UnityPrintNumberByStyle(expected, style);
1427 UNITY_INTERNAL_PTR expected,
1444 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
1450 if (expected == actual)
1455 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
1471 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)expected;
1477 expect_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT8*)expected;
1487 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)expected;
1493 expect_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT16*)expected;
1504 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)expected;
1510 expect_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT64*)expected;
1522 expect_val = *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)expected;
1528 expect_val = (UNITY_INT)*(UNITY_PTR_ATTRIBUTE const UNITY_UINT32*)expected;
1583 expected = (UNITY_INTERNAL_PTR)((const char*)expected + increment);
1590 void UnityAssertEqualString(const char* expected,
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);
1629 void UnityAssertEqualStringLen(const char* expected,
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);
1669 void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
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))
1705 expd = (const char*)expected;
1713 expd = ((const char* const*)expected)[j];
1752 void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
1760 UNITY_PTR_ATTRIBUTE const unsigned char* ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
1770 UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, lineNumber, msg);
1780 if (expected == actual)
1785 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg))
1818 ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;