--- a/test/testautomation_rect.c Sat May 18 12:48:50 2013 -0700
+++ b/test/testautomation_rect.c Sat May 18 14:17:52 2013 -0700
@@ -21,7 +21,7 @@
int x1, int y1, int x2, int y2,
int x1Ref, int y1Ref, int x2Ref, int y2Ref)
{
- SDLTest_AssertCheck(intersection == expectedIntersection,
+ SDLTest_AssertCheck(intersection == expectedIntersection,
"Check for correct intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)",
(expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
(intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
@@ -45,7 +45,7 @@
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
*/
-int
+int
rect_testIntersectRectAndLine (void *arg)
{
SDL_Rect refRect = { 0, 0, 32, 32 };
@@ -107,7 +107,7 @@
intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
_validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 0, 0, 31);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -116,7 +116,7 @@
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
*/
-int
+int
rect_testIntersectRectAndLineInside (void *arg)
{
SDL_Rect refRect = { 0, 0, 32, 32 };
@@ -174,7 +174,7 @@
intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
_validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymax, xmax, ymin);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -183,7 +183,7 @@
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
*/
-int
+int
rect_testIntersectRectAndLineOutside (void *arg)
{
SDL_Rect refRect = { 0, 0, 32, 32 };
@@ -229,7 +229,7 @@
intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
_validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yBottom, 31, yBottom);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -238,7 +238,7 @@
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
*/
-int
+int
rect_testIntersectRectAndLineEmpty (void *arg)
{
SDL_Rect refRect;
@@ -246,7 +246,7 @@
int x1, y1, x1Ref, y1Ref;
int x2, y2, x2Ref, y2Ref;
SDL_bool intersected;
-
+
refRect.x = SDLTest_RandomIntegerInRange(1, 1024);
refRect.y = SDLTest_RandomIntegerInRange(1, 1024);
refRect.w = 0;
@@ -264,7 +264,7 @@
intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
_validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -273,7 +273,7 @@
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine
*/
-int
+int
rect_testIntersectRectAndLineParam (void *arg)
{
SDL_Rect rect = { 0, 0, 32, 32 };
@@ -282,10 +282,10 @@
int x2 = x1;
int y2 = 2 * rect.h;
SDL_bool intersected;
-
+
intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);
SDLTest_AssertCheck(intersected == SDL_TRUE, "Check that intersection result was SDL_TRUE");
-
+
intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, &x1, &y1, &x2, &y2);
SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
intersected = SDL_IntersectRectAndLine(&rect, (int *)NULL, &y1, &x2, &y2);
@@ -299,21 +299,21 @@
intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
SDLTest_AssertCheck(intersected == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
* \brief Private helper to check SDL_HasIntersection results
*/
void _validateHasIntersectionResults(
- SDL_bool intersection, SDL_bool expectedIntersection,
+ SDL_bool intersection, SDL_bool expectedIntersection,
SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB)
{
- SDLTest_AssertCheck(intersection == expectedIntersection,
+ SDLTest_AssertCheck(intersection == expectedIntersection,
"Check intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)",
(expectedIntersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
(intersection == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- rectA->x, rectA->y, rectA->w, rectA->h,
+ rectA->x, rectA->y, rectA->w, rectA->h,
rectB->x, rectB->y, rectB->w, rectB->h);
SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,
"Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
@@ -329,15 +329,15 @@
* \brief Private helper to check SDL_IntersectRect results
*/
void _validateIntersectRectResults(
- SDL_bool intersection, SDL_bool expectedIntersection,
- SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,
+ SDL_bool intersection, SDL_bool expectedIntersection,
+ SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,
SDL_Rect *result, SDL_Rect *expectedResult)
{
_validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB);
if (result && expectedResult) {
SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h,
"Check that intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
- rectA->x, rectA->y, rectA->w, rectA->h,
+ rectA->x, rectA->y, rectA->w, rectA->h,
rectB->x, rectB->y, rectB->w, rectB->h,
result->x, result->y, result->w, result->h,
expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h);
@@ -348,7 +348,7 @@
* \brief Private helper to check SDL_UnionRect results
*/
void _validateUnionRectResults(
- SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,
+ SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,
SDL_Rect *result, SDL_Rect *expectedResult)
{
SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,
@@ -361,7 +361,7 @@
refRectB->x, refRectB->y, refRectB->w, refRectB->h);
SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h,
"Check that union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)",
- rectA->x, rectA->y, rectA->w, rectA->h,
+ rectA->x, rectA->y, rectA->w, rectA->h,
rectB->x, rectB->y, rectB->w, rectB->h,
result->x, result->y, result->w, result->h,
expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h);
@@ -371,10 +371,10 @@
* \brief Private helper to check SDL_RectEmpty results
*/
void _validateRectEmptyResults(
- SDL_bool empty, SDL_bool expectedEmpty,
+ SDL_bool empty, SDL_bool expectedEmpty,
SDL_Rect *rect, SDL_Rect *refRect)
{
- SDLTest_AssertCheck(empty == expectedEmpty,
+ SDLTest_AssertCheck(empty == expectedEmpty,
"Check for correct empty result: expected %s, got %s testing (%d,%d,%d,%d)",
(expectedEmpty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
(empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
@@ -389,10 +389,10 @@
* \brief Private helper to check SDL_RectEquals results
*/
void _validateRectEqualsResults(
- SDL_bool equals, SDL_bool expectedEquals,
+ SDL_bool equals, SDL_bool expectedEquals,
SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB)
{
- SDLTest_AssertCheck(equals == expectedEquals,
+ SDLTest_AssertCheck(equals == expectedEquals,
"Check for correct equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d)",
(expectedEquals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
(equals == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
@@ -433,7 +433,7 @@
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
_validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectB);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -459,9 +459,9 @@
rectA = refRectA;
rectB = refRectB;
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
- _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
+ _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -490,7 +490,7 @@
expectedResult.x = refRectB.x;
expectedResult.y = refRectB.y;
expectedResult.w = refRectA.w - refRectB.x;
- expectedResult.h = refRectA.h - refRectB.y;
+ expectedResult.h = refRectA.h - refRectB.y;
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
_validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
@@ -504,7 +504,7 @@
expectedResult.x = refRectB.x;
expectedResult.y = refRectB.y;
expectedResult.w = 1;
- expectedResult.h = refRectB.h;
+ expectedResult.h = refRectB.h;
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
_validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
@@ -518,7 +518,7 @@
expectedResult.x = 0;
expectedResult.y = refRectB.y;
expectedResult.w = 1;
- expectedResult.h = refRectB.h;
+ expectedResult.h = refRectB.h;
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
_validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
@@ -532,7 +532,7 @@
expectedResult.x = refRectB.x;
expectedResult.y = refRectB.y;
expectedResult.w = refRectB.w;
- expectedResult.h = 1;
+ expectedResult.h = 1;
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
_validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
@@ -546,11 +546,11 @@
expectedResult.x = refRectB.x;
expectedResult.y = 0;
expectedResult.w = refRectB.w;
- expectedResult.h = 1;
+ expectedResult.h = 1;
intersection = SDL_IntersectRect(&rectA, &rectB, &result);
_validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -586,7 +586,7 @@
refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
refRectB.x = refRectA.x;
- refRectB.y = refRectA.y;
+ refRectB.y = refRectA.y;
refRectB.x += offsetX;
refRectB.y += offsetY;
rectA = refRectA;
@@ -597,7 +597,7 @@
}
}
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -632,7 +632,7 @@
_validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
empty = (SDL_bool)SDL_RectEmpty(&result);
SDLTest_AssertCheck(empty == SDL_TRUE, "Validate result is empty Rect; got: %s", (empty == SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
-
+
// Rect B empty
result.w = SDLTest_RandomIntegerInRange(1, 100);
result.h = SDLTest_RandomIntegerInRange(1, 100);
@@ -687,19 +687,19 @@
// invalid parameter combinations
intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
intersection = SDL_IntersectRect(&rectA, &rectB, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 3st parameter is NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 3st parameter is NULL");
intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, &result);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameters are NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameters are NULL");
intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 3rd parameters are NULL ");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 3rd parameters are NULL ");
intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -726,7 +726,7 @@
intersection = SDL_HasIntersection(&rectA, &rectB);
_validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -753,7 +753,7 @@
intersection = SDL_HasIntersection(&rectA, &rectB);
_validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -820,7 +820,7 @@
intersection = SDL_HasIntersection(&rectA, &rectB);
_validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -855,7 +855,7 @@
refRectA.x = SDLTest_RandomIntegerInRange(1, 100);
refRectA.y = SDLTest_RandomIntegerInRange(1, 100);
refRectB.x = refRectA.x;
- refRectB.y = refRectA.y;
+ refRectB.y = refRectA.y;
refRectB.x += offsetX;
refRectB.y += offsetY;
rectA = refRectA;
@@ -866,7 +866,7 @@
}
}
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -924,7 +924,7 @@
intersection = SDL_HasIntersection(&rectA, &rectB);
_validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -941,13 +941,13 @@
// invalid parameter combinations
intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when 2st parameter is NULL");
intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
+ SDLTest_AssertCheck(intersection == SDL_FALSE, "Check that function returns SDL_FALSE when all parameters are NULL");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -989,35 +989,35 @@
if (newy > maxy) maxy = newy;
}
}
-
+
// Call function and validate - special case: no result requested
anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
- "Check expected return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
+ "Check expected return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
for (i=0; i<numPoints; i++) {
SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
- "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
}
// Call function and validate
anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, &result);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
- "Check return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
+ "Check return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
for (i=0; i<numPoints; i++) {
SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
- "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
}
SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),
"Resulting enclosing rectangle incorrect: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)",
minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1068,32 +1068,32 @@
// Call function and validate - special case: no result requested
anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
- "Check return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
+ "Check return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
for (i=0; i<numPoints; i++) {
SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
- "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
}
-
+
// Call function and validate
anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, &result);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
- "Check return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
+ "Check return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
for (i=0; i<numPoints; i++) {
SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
- "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
}
SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),
"Check resulting enclosing rectangle: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)",
minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1151,27 +1151,27 @@
// Call function and validate - special case: no result requested
clip = refClip;
anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, (SDL_Rect *)NULL);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
- "Expected return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,
+ "Expected return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosedNoResult==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
for (i=0; i<numPoints; i++) {
SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
- "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
}
SDLTest_AssertCheck(refClip.x==clip.x && refClip.y==clip.y && refClip.w==clip.w && refClip.h==clip.h,
"Check that source clipping rectangle was not modified");
-
+
// Call function and validate
anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, &result);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
- "Check return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
+ "Check return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
for (i=0; i<numPoints; i++) {
SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,
- "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
+ "Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)",
i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);
}
SDLTest_AssertCheck(refClip.x==clip.x && refClip.y==clip.y && refClip.w==clip.w && refClip.h==clip.h,
@@ -1180,19 +1180,19 @@
SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),
"Check resulting enclosing rectangle: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)",
minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);
- }
-
+ }
+
/* Empty clipping rectangle */
clip.w = 0;
clip.h = 0;
expectedEnclosed = SDL_FALSE;
anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, &result);
- SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
- "Check return value %s, got %s",
- (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
- (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
+ SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,
+ "Check return value %s, got %s",
+ (expectedEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE",
+ (anyEnclosed==SDL_TRUE) ? "SDL_TRUE" : "SDL_FALSE");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1211,16 +1211,16 @@
// invalid parameter combinations
anyEnclosed = SDL_EnclosePoints((SDL_Point *)NULL, 1, (const SDL_Rect *)&clip, &result);
- SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 1st parameter is NULL");
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 1st parameter is NULL");
anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, 0, (const SDL_Rect *)&clip, &result);
SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 2nd parameter is 0");
count = SDLTest_RandomIntegerInRange(-100, -1);
anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, count, (const SDL_Rect *)&clip, &result);
- SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 2nd parameter is %i (negative)", count);
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 2nd parameter is %i (negative)", count);
anyEnclosed = SDL_EnclosePoints((SDL_Point *)NULL, 0, (const SDL_Rect *)&clip, &result);
- SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 1st parameter is NULL and 2nd parameter was 0");
+ SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, "Check that functions returns SDL_FALSE when 1st parameter is NULL and 2nd parameter was 0");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1237,9 +1237,9 @@
SDL_Rect result;
int minx, maxx, miny, maxy;
int dx, dy;
-
+
/* Union 1x1 outside */
- for (dx = -1; dx < 2; dx++) {
+ for (dx = -1; dx < 2; dx++) {
for (dy = -1; dy < 2; dy++) {
if ((dx != 0) || (dy != 0)) {
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
@@ -1253,7 +1253,7 @@
minx = (refRectA.x<refRectB.x) ? refRectA.x : refRectB.x;
maxx = (refRectA.x>refRectB.x) ? refRectA.x : refRectB.x;
miny = (refRectA.y<refRectB.y) ? refRectA.y : refRectB.y;
- maxy = (refRectA.y>refRectB.y) ? refRectA.y : refRectB.y;
+ maxy = (refRectA.y>refRectB.y) ? refRectA.y : refRectB.y;
expectedResult.x = minx;
expectedResult.y = miny;
expectedResult.w = maxx - minx + 1;
@@ -1267,7 +1267,7 @@
}
/* Union outside overlap */
- for (dx = -1; dx < 2; dx++) {
+ for (dx = -1; dx < 2; dx++) {
for (dy = -1; dy < 2; dy++) {
if ((dx != 0) || (dy != 0)) {
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
@@ -1291,7 +1291,7 @@
}
}
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1307,7 +1307,7 @@
SDL_Rect expectedResult;
SDL_Rect result;
- /* A empty */
+ /* A empty */
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.w=0;
@@ -1321,8 +1321,8 @@
rectB = refRectB;
SDL_UnionRect(&rectA, &rectB, &result);
_validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
-
- /* B empty */
+
+ /* B empty */
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.w=SDLTest_RandomIntegerInRange(1, 1024);
@@ -1337,7 +1337,7 @@
SDL_UnionRect(&rectA, &rectB, &result);
_validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
- /* A and B empty */
+ /* A and B empty */
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.w=0;
@@ -1356,7 +1356,7 @@
SDL_UnionRect(&rectA, &rectB, &result);
_validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1372,7 +1372,7 @@
SDL_Rect expectedResult;
SDL_Rect result;
int dx, dy;
-
+
/* Union 1x1 with itself */
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
@@ -1399,7 +1399,7 @@
_validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);
/* Union inside with edges modified */
- for (dx = -1; dx < 2; dx++) {
+ for (dx = -1; dx < 2; dx++) {
for (dy = -1; dy < 2; dy++) {
if ((dx != 0) || (dy != 0)) {
refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);
@@ -1410,7 +1410,7 @@
if (dx == -1) refRectB.x++;
if ((dx == 1) || (dx == -1)) refRectB.w--;
if (dy == -1) refRectB.y++;
- if ((dy == 1) || (dy == -1)) refRectB.h--;
+ if ((dy == 1) || (dy == -1)) refRectB.h--;
expectedResult = refRectA;
rectA = refRectA;
rectB = refRectB;
@@ -1420,7 +1420,7 @@
}
}
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1436,19 +1436,19 @@
// invalid parameter combinations
SDL_UnionRect((SDL_Rect *)NULL, &rectB, &result);
- SDLTest_AssertPass("Check that function returns when 1st parameter is NULL");
+ SDLTest_AssertPass("Check that function returns when 1st parameter is NULL");
SDL_UnionRect(&rectA, (SDL_Rect *)NULL, &result);
- SDLTest_AssertPass("Check that function returns when 2nd parameter is NULL");
+ SDLTest_AssertPass("Check that function returns when 2nd parameter is NULL");
SDL_UnionRect(&rectA, &rectB, (SDL_Rect *)NULL);
- SDLTest_AssertPass("Check that function returns when 3rd parameter is NULL");
+ SDLTest_AssertPass("Check that function returns when 3rd parameter is NULL");
SDL_UnionRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL);
- SDLTest_AssertPass("Check that function returns when 1st and 3rd parameter are NULL");
+ SDLTest_AssertPass("Check that function returns when 1st and 3rd parameter are NULL");
SDL_UnionRect(&rectA, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
- SDLTest_AssertPass("Check that function returns when 2nd and 3rd parameter are NULL");
+ SDLTest_AssertPass("Check that function returns when 2nd and 3rd parameter are NULL");
SDL_UnionRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL);
- SDLTest_AssertPass("Check that function returns when all parameters are NULL");
+ SDLTest_AssertPass("Check that function returns when all parameters are NULL");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1474,7 +1474,7 @@
rect = refRect;
result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect);
_validateRectEmptyResults(result, expectedResult, &rect, &refRect);
-
+
// Empty case
for (w=-1; w<2; w++) {
for (h=-1; h<2; h++) {
@@ -1491,7 +1491,7 @@
}
}
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1506,9 +1506,9 @@
// invalid parameter combinations
result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)NULL);
- SDLTest_AssertCheck(result == SDL_TRUE, "Check that function returns TRUE when 1st parameter is NULL");
+ SDLTest_AssertCheck(result == SDL_TRUE, "Check that function returns TRUE when 1st parameter is NULL");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1531,14 +1531,14 @@
refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);
refRectA.w=SDLTest_RandomIntegerInRange(1, 1024);
refRectA.h=SDLTest_RandomIntegerInRange(1, 1024);
- refRectB = refRectA;
+ refRectB = refRectA;
expectedResult = SDL_TRUE;
rectA = refRectA;
rectB = refRectB;
result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)&rectB);
_validateRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB);
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/*!
@@ -1565,13 +1565,13 @@
// invalid parameter combinations
result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB);
- SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
+ SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st parameter is NULL");
result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL);
- SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL");
+ SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 2nd parameter is NULL");
result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL);
- SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL");
+ SDLTest_AssertCheck(result == SDL_FALSE, "Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL");
- return TEST_COMPLETED;
+ return TEST_COMPLETED;
}
/* ================= Test References ================== */
@@ -1580,98 +1580,98 @@
/* SDL_IntersectRectAndLine */
static const SDLTest_TestCaseReference rectTest1 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,"rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,"rect_testIntersectRectAndLine", "Tests SDL_IntersectRectAndLine clipping cases", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest2 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, "rect_testIntersectRectAndLineInside", "Tests SDL_IntersectRectAndLine with line fully contained in rect", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest3 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, "rect_testIntersectRectAndLineOutside", "Tests SDL_IntersectRectAndLine with line fully outside of rect", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest4 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, "rect_testIntersectRectAndLineEmpty", "Tests SDL_IntersectRectAndLine with empty rectangle ", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest5 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, "rect_testIntersectRectAndLineParam", "Negative tests against SDL_IntersectRectAndLine with invalid parameters", TEST_ENABLED };
/* SDL_IntersectRect */
static const SDLTest_TestCaseReference rectTest6 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectInside, "rect_testIntersectRectInside", "Tests SDL_IntersectRect with B fully contained in A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest7 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, "rect_testIntersectRectOutside", "Tests SDL_IntersectRect with B fully outside of A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest8 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, "rect_testIntersectRectPartial", "Tests SDL_IntersectRect with B partially intersecting A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest9 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, "rect_testIntersectRectPoint", "Tests SDL_IntersectRect with 1x1 sized rectangles", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest10 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, "rect_testIntersectRectEmpty", "Tests SDL_IntersectRect with empty rectangles", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest11 =
- { (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testIntersectRectParam, "rect_testIntersectRectParam", "Negative tests against SDL_IntersectRect with invalid parameters", TEST_ENABLED };
/* SDL_HasIntersection */
static const SDLTest_TestCaseReference rectTest12 =
- { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, "rect_testHasIntersectionInside", "Tests SDL_HasIntersection with B fully contained in A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest13 =
- { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, "rect_testHasIntersectionOutside", "Tests SDL_HasIntersection with B fully outside of A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest14 =
- { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,"rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,"rect_testHasIntersectionPartial", "Tests SDL_HasIntersection with B partially intersecting A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest15 =
- { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, "rect_testHasIntersectionPoint", "Tests SDL_HasIntersection with 1x1 sized rectangles", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest16 =
- { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, "rect_testHasIntersectionEmpty", "Tests SDL_HasIntersection with empty rectangles", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest17 =
- { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, "rect_testHasIntersectionParam", "Negative tests against SDL_HasIntersection with invalid parameters", TEST_ENABLED };
/* SDL_EnclosePoints */
static const SDLTest_TestCaseReference rectTest18 =
- { (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testEnclosePoints, "rect_testEnclosePoints", "Tests SDL_EnclosePoints without clipping", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest19 =
- { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, "rect_testEnclosePointsWithClipping", "Tests SDL_EnclosePoints with clipping", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest20 =
- { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, "rect_testEnclosePointsRepeatedInput", "Tests SDL_EnclosePoints with repeated input", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest21 =
- { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, "rect_testEnclosePointsParam", "Negative tests against SDL_EnclosePoints with invalid parameters", TEST_ENABLED };
/* SDL_UnionRect */
static const SDLTest_TestCaseReference rectTest22 =
- { (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testUnionRectInside, "rect_testUnionRectInside", "Tests SDL_UnionRect where rect B is inside rect A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest23 =
- { (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testUnionRectOutside, "rect_testUnionRectOutside", "Tests SDL_UnionRect where rect B is outside rect A", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest24 =
- { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, "rect_testUnionRectEmpty", "Tests SDL_UnionRect where rect A or rect B are empty", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest25 =
- { (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testUnionRectParam, "rect_testUnionRectParam", "Negative tests against SDL_UnionRect with invalid parameters", TEST_ENABLED };
/* SDL_RectEmpty */
static const SDLTest_TestCaseReference rectTest26 =
- { (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testRectEmpty, "rect_testRectEmpty", "Tests SDL_RectEmpty with various inputs", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest27 =
- { (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testRectEmptyParam, "rect_testRectEmptyParam", "Negative tests against SDL_RectEmpty with invalid parameters", TEST_ENABLED };
/* SDL_RectEquals */
static const SDLTest_TestCaseReference rectTest28 =
- { (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testRectEquals, "rect_testRectEquals", "Tests SDL_RectEquals with various inputs", TEST_ENABLED };
static const SDLTest_TestCaseReference rectTest29 =
- { (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED };
+ { (SDLTest_TestCaseFp)rect_testRectEqualsParam, "rect_testRectEqualsParam", "Negative tests against SDL_RectEquals with invalid parameters", TEST_ENABLED };
/*!
@@ -1681,16 +1681,16 @@
* http://wiki.libsdl.org/moin.cgi/CategoryRect
*/
static const SDLTest_TestCaseReference *rectTests[] = {
- &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14,
- &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27,
- &rectTest28, &rectTest29, NULL
+ &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14,
+ &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27,
+ &rectTest28, &rectTest29, NULL
};
/* Rect test suite (global) */
SDLTest_TestSuiteReference rectTestSuite = {
- "Rect",
- NULL,
- rectTests,
- NULL
+ "Rect",
+ NULL,
+ rectTests,
+ NULL
};