! * \brief Tests SDL_HasIntersection() with B fully outside A * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection */
| 736 | * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection |
| 737 | */ |
| 738 | int rect_testHasIntersectionOutside (void *arg) |
| 739 | { |
| 740 | SDL_Rect refRectA = { 0, 0, 32, 32 }; |
| 741 | SDL_Rect refRectB; |
| 742 | SDL_Rect rectA; |
| 743 | SDL_Rect rectB; |
| 744 | SDL_bool intersection; |
| 745 | |
| 746 | /* rectB fully outside of rectA */ |
| 747 | refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10); |
| 748 | refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10); |
| 749 | refRectB.w = refRectA.w; |
| 750 | refRectB.h = refRectA.h; |
| 751 | rectA = refRectA; |
| 752 | rectB = refRectB; |
| 753 | intersection = SDL_HasIntersection(&rectA, &rectB); |
| 754 | _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB); |
| 755 | |
| 756 | return TEST_COMPLETED; |
| 757 | } |
| 758 | |
| 759 | /* ! |
| 760 | * \brief Tests SDL_HasIntersection() with B partially intersecting A |
nothing calls this directly
no test coverage detected