MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / rect_testHasIntersectionParam

Function rect_testHasIntersectionParam

deps/SDL2/test/testautomation_rect.c:936–951  ·  view source on GitHub ↗

! * \brief Negative tests against SDL_HasIntersection() with invalid parameters * * \sa * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection */

Source from the content-addressed store, hash-verified

934 * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection
935 */
936int rect_testHasIntersectionParam(void *arg)
937{
938 SDL_Rect rectA;
939 SDL_Rect rectB;
940 SDL_bool intersection;
941
942 /* invalid parameter combinations */
943 intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB);
944 SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
945 intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL);
946 SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
947 intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL);
948 SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
949
950 return TEST_COMPLETED;
951}
952
953/* !
954 * \brief Test SDL_EnclosePoints() without clipping

Callers

nothing calls this directly

Calls 2

SDL_HasIntersectionFunction · 0.85
SDLTest_AssertCheckFunction · 0.85

Tested by

no test coverage detected