MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / UnityIsOneArrayNull

Function UnityIsOneArrayNull

tests/unity/src/unity.c:481–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479 *-----------------------------------------------*/
480
481static int UnityIsOneArrayNull(UNITY_INTERNAL_PTR expected,
482 UNITY_INTERNAL_PTR actual,
483 const UNITY_LINE_TYPE lineNumber,
484 const char* msg)
485{
486 if (expected == actual) return 0; /* Both are NULL or same pointer */
487
488 /* print and return true if just expected is NULL */
489 if (expected == NULL)
490 {
491 UnityTestResultsFailBegin(lineNumber);
492 UnityPrint(UnityStrNullPointerForExpected);
493 UnityAddMsgIfSpecified(msg);
494 return 1;
495 }
496
497 /* print and return true if just actual is NULL */
498 if (actual == NULL)
499 {
500 UnityTestResultsFailBegin(lineNumber);
501 UnityPrint(UnityStrNullPointerForActual);
502 UnityAddMsgIfSpecified(msg);
503 return 1;
504 }
505
506 return 0; /* return false if neither is NULL */
507}
508
509/*-----------------------------------------------
510 * Assertion Functions

Callers 5

UnityAssertEqualIntArrayFunction · 0.85
UnityAssertEqualMemoryFunction · 0.85

Calls 3

UnityPrintFunction · 0.85
UnityAddMsgIfSpecifiedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…