-----------------------------------------------*/
| 655 | |
| 656 | /*-----------------------------------------------*/ |
| 657 | static int UnityIsOneArrayNull(UNITY_INTERNAL_PTR expected, |
| 658 | UNITY_INTERNAL_PTR actual, |
| 659 | const UNITY_LINE_TYPE lineNumber, |
| 660 | const char* msg) |
| 661 | { |
| 662 | /* Both are NULL or same pointer */ |
| 663 | if (expected == actual) { return 0; } |
| 664 | |
| 665 | /* print and return true if just expected is NULL */ |
| 666 | if (expected == NULL) |
| 667 | { |
| 668 | UnityTestResultsFailBegin(lineNumber); |
| 669 | UnityPrint(UnityStrNullPointerForExpected); |
| 670 | UnityAddMsgIfSpecified(msg); |
| 671 | return 1; |
| 672 | } |
| 673 | |
| 674 | /* print and return true if just actual is NULL */ |
| 675 | if (actual == NULL) |
| 676 | { |
| 677 | UnityTestResultsFailBegin(lineNumber); |
| 678 | UnityPrint(UnityStrNullPointerForActual); |
| 679 | UnityAddMsgIfSpecified(msg); |
| 680 | return 1; |
| 681 | } |
| 682 | |
| 683 | return 0; /* return false if neither is NULL */ |
| 684 | } |
| 685 | |
| 686 | /*----------------------------------------------- |
| 687 | * Assertion Functions |
no test coverage detected