| 479 | *-----------------------------------------------*/ |
| 480 | |
| 481 | static 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 |
no test coverage detected
searching dependent graphs…