Lines Matching full:if

6 #if LV_BUILD_TEST
13 /* If omitted from header, declare overridable prototypes here so they're ready for use */
21 #define RETURN_IF_FAIL_OR_IGNORE do { if (Unity.CurrentTestFailed || Unity.CurrentTestIgnored) {…
80 if ((*pch <= 126) && (*pch >= 32)) in UnityPrintChar()
85 else if (*pch == 13) in UnityPrintChar()
91 else if (*pch == 10) in UnityPrintChar()
131 if (pch != NULL) in UnityPrint()
137 if ((*pch == 27) && (*(pch + 1) == '[')) in UnityPrint()
153 if (pch != NULL) in UnityPrintLen()
158 if ((*pch <= 126) && (*pch >= 32)) in UnityPrintLen()
163 else if (*pch == 13) in UnityPrintLen()
169 else if (*pch == 10) in UnityPrintLen()
189 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityPrintNumberByStyle()
191 if (style == UNITY_DISPLAY_STYLE_CHAR) in UnityPrintNumberByStyle()
195 if ((number <= 126) && (number >= 32)) in UnityPrintNumberByStyle()
200 else if (number == 13) in UnityPrintNumberByStyle()
206 else if (number == 10) in UnityPrintNumberByStyle()
225 else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT) in UnityPrintNumberByStyle()
242 if (number_to_print < 0) in UnityPrintNumber()
277 if ((unsigned)nibbles > UNITY_MAX_NIBBLES) in UnityPrintNumberHex()
286 if (nibble <= 9) in UnityPrintNumberHex()
305 if (current_bit & mask) in UnityPrintMask()
307 if (current_bit & number) in UnityPrintMask()
348 if (number < 0.0f) in UnityPrintFloat()
355 if (number == 0.0f) in UnityPrintFloat()
359 else if (UNITY_IS_NAN(number)) in UnityPrintFloat()
363 else if (UNITY_IS_INF(number)) in UnityPrintFloat()
383 if (number < 1.0f) in UnityPrintFloat()
392 else if (number > (UNITY_DOUBLE)max_scaled) in UnityPrintFloat()
421 /* round to even if exactly between two integers */ in UnityPrintFloat()
422 if ((n & 1) && (((UNITY_DOUBLE)n - number) == 0.5f)) in UnityPrintFloat()
428 if (n >= max_scaled) in UnityPrintFloat()
456 if (digits == decimals) in UnityPrintFloat()
463 /* print exponent if needed */ in UnityPrintFloat()
464 if (exponent != 0) in UnityPrintFloat()
468 if (exponent < 0) in UnityPrintFloat()
547 if (Unity.CurrentTestIgnored) in UnityConcludeTest()
551 else if (!Unity.CurrentTestFailed) in UnityConcludeTest()
576 if (Unity.CurrentDetail1) in UnityAddMsgIfSpecified()
581 if (Unity.CurrentDetail2) in UnityAddMsgIfSpecified()
588 if (msg) in UnityAddMsgIfSpecified()
599 if (expected != NULL) in UnityPrintExpectedAndActualStrings()
610 if (actual != NULL) in UnityPrintExpectedAndActualStrings()
628 if (expected != NULL) in UnityPrintExpectedAndActualStringsLen()
639 if (actual != NULL) in UnityPrintExpectedAndActualStringsLen()
662 if (expected == actual) { return 0; } in UnityIsOneArrayNull()
664 /* print and return true if just expected is NULL */ in UnityIsOneArrayNull()
665 if (expected == NULL) in UnityIsOneArrayNull()
673 /* print and return true if just actual is NULL */ in UnityIsOneArrayNull()
674 if (actual == NULL) in UnityIsOneArrayNull()
682 return 0; /* return false if neither is NULL */ in UnityIsOneArrayNull()
698 if ((mask & expected) != (mask & actual)) in UnityAssertBits()
719 if (expected != actual) in UnityAssertEqualNumber()
742 if ((threshold == actual) && (compare & UNITY_EQUAL_TO)) { return; } in UnityAssertGreaterOrLessOrEqualNumber()
743 if ((threshold == actual)) { failed = 1; } in UnityAssertGreaterOrLessOrEqualNumber()
745 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertGreaterOrLessOrEqualNumber()
747 if ((actual > threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessOrEqualNumber()
748 if ((actual < threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessOrEqualNumber()
752if (((UNITY_UINT)actual > (UNITY_UINT)threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessOrEqualNumber()
753if (((UNITY_UINT)actual < (UNITY_UINT)threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessOrEqualNumber()
756 if (failed) in UnityAssertGreaterOrLessOrEqualNumber()
761 if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); } in UnityAssertGreaterOrLessOrEqualNumber()
762 if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); } in UnityAssertGreaterOrLessOrEqualNumber()
763 if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); } in UnityAssertGreaterOrLessOrEqualNumber()
764 if (compare == UNITY_NOT_EQUAL) { UnityPrint(UnityStrNotEqual); } in UnityAssertGreaterOrLessOrEqualNumber()
794 if (num_elements == 0) in UnityAssertEqualIntArray()
803 if (expected == actual) in UnityAssertEqualIntArray()
808 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg)) in UnityAssertEqualIntArray()
823 if (style & (UNITY_DISPLAY_RANGE_UINT | UNITY_DISPLAY_RANGE_HEX)) in UnityAssertEqualIntArray()
834 if (style & (UNITY_DISPLAY_RANGE_UINT | UNITY_DISPLAY_RANGE_HEX)) in UnityAssertEqualIntArray()
855 if (style & (UNITY_DISPLAY_RANGE_UINT | UNITY_DISPLAY_RANGE_HEX)) in UnityAssertEqualIntArray()
866 if (expect_val != actual_val) in UnityAssertEqualIntArray()
868 if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8))) in UnityAssertEqualIntArray()
886 if (flags == UNITY_ARRAY_TO_ARRAY) in UnityAssertEqualIntArray()
898if (UNITY_IS_INF(expected) && UNITY_IS_INF(actual) && (((expected) < 0) == ((actual) < 0))) return…
899 if (UNITY_NAN_CHECK) return 1; \
901 if ((diff) < 0) (diff) = -(diff); \
902 if ((delta) < 0) (delta) = -(delta); \
948 if (elements == 0) in UnityAssertWithinFloatArray()
957 if (UNITY_IS_INF(in_delta)) in UnityAssertWithinFloatArray()
962 if (UNITY_IS_NAN(in_delta)) in UnityAssertWithinFloatArray()
968 if (expected == actual) in UnityAssertWithinFloatArray()
973if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg)) in UnityAssertWithinFloatArray()
978 /* fix delta sign if need */ in UnityAssertWithinFloatArray()
979 if (in_delta < 0) in UnityAssertWithinFloatArray()
988 if (current_element_delta < 0) in UnityAssertWithinFloatArray()
994 if (!UnityFloatsWithin(in_delta + current_element_delta, *ptr_expected, *ptr_actual)) in UnityAssertWithinFloatArray()
1003 if (flags == UNITY_ARRAY_TO_ARRAY) in UnityAssertWithinFloatArray()
1021 if (!UnityFloatsWithin(delta, expected, actual)) in UnityAssertFloatsWithin()
1039 if (UnityFloatsWithin(delta, expected, actual)) in UnityAssertFloatsNotWithin()
1065 if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessFloat()
1066 if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessFloat()
1068if ((compare & UNITY_EQUAL_TO) && UnityFloatsWithin(threshold * UNITY_FLOAT_PRECISION, threshold, … in UnityAssertGreaterOrLessFloat()
1070 if (failed) in UnityAssertGreaterOrLessFloat()
1075 if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); } in UnityAssertGreaterOrLessFloat()
1076 if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); } in UnityAssertGreaterOrLessFloat()
1077 if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); } in UnityAssertGreaterOrLessFloat()
1125 if (is_trait != should_be_trait) in UnityAssertFloatSpecial()
1129 if (!should_be_trait) in UnityAssertFloatSpecial()
1138 if (should_be_trait) in UnityAssertFloatSpecial()
1176 if (elements == 0) in UnityAssertWithinDoubleArray()
1185 if (UNITY_IS_INF(in_delta)) in UnityAssertWithinDoubleArray()
1190 if (UNITY_IS_NAN(in_delta)) in UnityAssertWithinDoubleArray()
1196 if (expected == actual) in UnityAssertWithinDoubleArray()
1201if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg)) in UnityAssertWithinDoubleArray()
1206 /* fix delta sign if need */ in UnityAssertWithinDoubleArray()
1207 if (in_delta < 0) in UnityAssertWithinDoubleArray()
1216 if (current_element_delta < 0) in UnityAssertWithinDoubleArray()
1222 if (!UnityDoublesWithin(in_delta + current_element_delta, *ptr_expected, *ptr_actual)) in UnityAssertWithinDoubleArray()
1231 if (flags == UNITY_ARRAY_TO_ARRAY) in UnityAssertWithinDoubleArray()
1248 if (!UnityDoublesWithin(delta, expected, actual)) in UnityAssertDoublesWithin()
1266 if (UnityDoublesWithin(delta, expected, actual)) in UnityAssertDoublesNotWithin()
1292 if (!(actual < threshold) && (compare & UNITY_SMALLER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessDouble()
1293 if (!(actual > threshold) && (compare & UNITY_GREATER_THAN)) { failed = 1; } in UnityAssertGreaterOrLessDouble()
1295if ((compare & UNITY_EQUAL_TO) && UnityDoublesWithin(threshold * UNITY_DOUBLE_PRECISION, threshold… in UnityAssertGreaterOrLessDouble()
1297 if (failed) in UnityAssertGreaterOrLessDouble()
1302 if (compare & UNITY_GREATER_THAN) { UnityPrint(UnityStrGt); } in UnityAssertGreaterOrLessDouble()
1303 if (compare & UNITY_SMALLER_THAN) { UnityPrint(UnityStrLt); } in UnityAssertGreaterOrLessDouble()
1304 if (compare & UNITY_EQUAL_TO) { UnityPrint(UnityStrOrEqual); } in UnityAssertGreaterOrLessDouble()
1352 if (is_trait != should_be_trait) in UnityAssertDoubleSpecial()
1356 if (!should_be_trait) in UnityAssertDoubleSpecial()
1365 if (should_be_trait) in UnityAssertDoubleSpecial()
1388 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertNumbersWithin()
1390 if (actual > expected) in UnityAssertNumbersWithin()
1401 if ((UNITY_UINT)actual > (UNITY_UINT)expected) in UnityAssertNumbersWithin()
1411 if (Unity.CurrentTestFailed) in UnityAssertNumbersWithin()
1441 if (num_elements == 0) in UnityAssertNumbersArrayWithin()
1450 if (expected == actual) in UnityAssertNumbersArrayWithin()
1455 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg)) in UnityAssertNumbersArrayWithin()
1469 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertNumbersArrayWithin()
1485 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertNumbersArrayWithin()
1502 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertNumbersArrayWithin()
1520 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertNumbersArrayWithin()
1536 if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) in UnityAssertNumbersArrayWithin()
1538 if (actual_val > expect_val) in UnityAssertNumbersArrayWithin()
1549 if ((UNITY_UINT)actual_val > (UNITY_UINT)expect_val) in UnityAssertNumbersArrayWithin()
1559 if (Unity.CurrentTestFailed) in UnityAssertNumbersArrayWithin()
1561 if ((style & UNITY_DISPLAY_RANGE_UINT) && (length < (UNITY_INT_WIDTH / 8))) in UnityAssertNumbersArrayWithin()
1581 if (flags == UNITY_ARRAY_TO_ARRAY) in UnityAssertNumbersArrayWithin()
1599 /* if both pointers not null compare the strings */ in UnityAssertEqualString()
1600 if (expected && actual) in UnityAssertEqualString()
1604 if (expected[i] != actual[i]) in UnityAssertEqualString()
1612 { /* fail if either null but not if both */ in UnityAssertEqualString()
1613 if (expected || actual) in UnityAssertEqualString()
1619 if (Unity.CurrentTestFailed) in UnityAssertEqualString()
1639 /* if both pointers not null compare the strings */ in UnityAssertEqualStringLen()
1640 if (expected && actual) in UnityAssertEqualStringLen()
1644 if (expected[i] != actual[i]) in UnityAssertEqualStringLen()
1652 { /* fail if either null but not if both */ in UnityAssertEqualStringLen()
1653 if (expected || actual) in UnityAssertEqualStringLen()
1659 if (Unity.CurrentTestFailed) in UnityAssertEqualStringLen()
1683 /* if no elements, it's an error */ in UnityAssertEqualStringArray()
1684 if (num_elements == 0) in UnityAssertEqualStringArray()
1693 if ((const void*)expected == (const void*)actual) in UnityAssertEqualStringArray()
1698if (UnityIsOneArrayNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg)) in UnityAssertEqualStringArray()
1703 if (flags != UNITY_ARRAY_TO_ARRAY) in UnityAssertEqualStringArray()
1711 if (flags == UNITY_ARRAY_TO_ARRAY) in UnityAssertEqualStringArray()
1716 /* if both pointers not null compare the strings */ in UnityAssertEqualStringArray()
1717 if (expd && act) in UnityAssertEqualStringArray()
1721 if (expd[i] != act[i]) in UnityAssertEqualStringArray()
1729 { /* handle case of one pointers being null (if both null, test should pass) */ in UnityAssertEqualStringArray()
1730 if (expd != act) in UnityAssertEqualStringArray()
1736 if (Unity.CurrentTestFailed) in UnityAssertEqualStringArray()
1739 if (num_elements > 1) in UnityAssertEqualStringArray()
1767 if (elements == 0) in UnityAssertEqualMemory()
1775 if (length == 0) in UnityAssertEqualMemory()
1780 if (expected == actual) in UnityAssertEqualMemory()
1785 if (UnityIsOneArrayNull(expected, actual, lineNumber, msg)) in UnityAssertEqualMemory()
1795 if (*ptr_exp != *ptr_act) in UnityAssertEqualMemory()
1799 if (num_elements > 1) in UnityAssertEqualMemory()
1816 if (flags == UNITY_ARRAY_TO_VAL) in UnityAssertEqualMemory()
1925 if (pch[1] == 'l') in UnityLengthModifierGet()
1941 if (pch[1] == 'h') in UnityLengthModifierGet()
1976 if (pch != NULL) in UnityPrintFVA()
1981 if (*pch == '%') in UnityPrintFVA()
1985 if (pch != NULL) in UnityPrintFVA()
2041 if (UNITY_POINTER_WIDTH == 64) in UnityPrintFVA()
2081 else if ((*pch == 27) && (*(pch + 1) == '[')) in UnityPrintFVA()
2087 else if (*pch == '\n') in UnityPrintFVA()
2105 if(format != NULL) in UnityPrintF()
2129 if (msg != NULL) in UnityFail()
2137 if (Unity.CurrentDetail1) in UnityFail()
2141 if (Unity.CurrentDetail2) in UnityFail()
2149 if (msg[0] != ' ') in UnityFail()
2166 if (msg != NULL) in UnityIgnore()
2180 if (msg != NULL) in UnityMessage()
2190 /* If we have not defined our own test runner, then include our default test runner to make life ea…
2199 if (TEST_PROTECT()) in UnityDefaultTestRun()
2204 if (TEST_PROTECT()) in UnityDefaultTestRun()
2248 if (Unity.TestFailures == 0U) in UnityEnd()
2283 if (argv[i][0] == '-') in UnityParseOptions()
2291 if (argv[i][2] == '=') in UnityParseOptions()
2295 else if (++i < argc) in UnityParseOptions()
2313 if (argv[i][2] == '=') in UnityParseOptions()
2317 else if (++i < argc) in UnityParseOptions()
2359 if (*sptr == '*') in IsStringInBiggerString()
2368 /* If they current bytes match, go on to the next bytes */ in IsStringInBiggerString()
2374 /* We're done if we match the entire string or up to a wildcard */ in IsStringInBiggerString()
2375 if (*sptr == '*') in IsStringInBiggerString()
2377 if (*sptr == ',') in IsStringInBiggerString()
2379 if (*sptr == '"') in IsStringInBiggerString()
2381 if (*sptr == '\'') in IsStringInBiggerString()
2383 if (*sptr == ':') in IsStringInBiggerString()
2385 if (*sptr == 0) in IsStringInBiggerString()
2409 if ((ptr1[0] == '"') || (ptr1[0] == '\'')) in UnityStringArgumentMatches()
2420if ((ptr2[0] == ':') && (ptr2[1] != 0) && (ptr2[0] != '\'') && (ptr2[0] != '"') && (ptr2[0] != ','… in UnityStringArgumentMatches()
2431 /* done if complete filename match */ in UnityStringArgumentMatches()
2433 if (retval == 1) in UnityStringArgumentMatches()
2438 /* done if testname match after filename partial match */ in UnityStringArgumentMatches()
2439 if ((retval == 2) && (ptrf != 0)) in UnityStringArgumentMatches()
2441 if (IsStringInBiggerString(Unity.CurrentTestName, ptrf)) in UnityStringArgumentMatches()
2447 /* done if complete testname match */ in UnityStringArgumentMatches()
2448 if (IsStringInBiggerString(Unity.CurrentTestName, ptr1) == 1) in UnityStringArgumentMatches()
2463 /* Check if this test name matches the included test pattern */ in UnityTestMatches()
2465 if (UnityOptionIncludeNamed) in UnityTestMatches()
2474 /* Check if this test name matches the excluded test pattern */ in UnityTestMatches()
2475 if (UnityOptionExcludeNamed) in UnityTestMatches()
2477 if (UnityStringArgumentMatches(UnityOptionExcludeNamed)) in UnityTestMatches()