! * \brief Tests SDL_HasIntersection() with B fully inside A * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection */
| 709 | * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection |
| 710 | */ |
| 711 | int rect_testHasIntersectionInside (void *arg) |
| 712 | { |
| 713 | SDL_Rect refRectA = { 0, 0, 32, 32 }; |
| 714 | SDL_Rect refRectB; |
| 715 | SDL_Rect rectA; |
| 716 | SDL_Rect rectB; |
| 717 | SDL_bool intersection; |
| 718 | |
| 719 | /* rectB fully contained in rectA */ |
| 720 | refRectB.x = 0; |
| 721 | refRectB.y = 0; |
| 722 | refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1); |
| 723 | refRectB.h = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1); |
| 724 | rectA = refRectA; |
| 725 | rectB = refRectB; |
| 726 | intersection = SDL_HasIntersection(&rectA, &rectB); |
| 727 | _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB); |
| 728 | |
| 729 | return TEST_COMPLETED; |
| 730 | } |
| 731 | |
| 732 | /* ! |
| 733 | * \brief Tests SDL_HasIntersection() with B fully outside A |
nothing calls this directly
no test coverage detected