File style cleanup for the SDL 2.0 release
This commit is contained in:
parent
2ac8624930
commit
0cb6385637
376 changed files with 17562 additions and 17773 deletions
|
@ -29,18 +29,18 @@ sdltest_getFuzzerInvocationCount(void *arg)
|
|||
{
|
||||
Uint8 result;
|
||||
int fuzzerCount1, fuzzerCount2;
|
||||
|
||||
|
||||
fuzzerCount1 = SDLTest_GetFuzzerInvocationCount();
|
||||
SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()");
|
||||
SDLTest_AssertCheck(fuzzerCount1 >= 0, "Verify returned value, expected: >=0, got: %d", fuzzerCount1);
|
||||
|
||||
|
||||
result = SDLTest_RandomUint8();
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8(), returned %d", result);
|
||||
|
||||
fuzzerCount2 = SDLTest_GetFuzzerInvocationCount();
|
||||
SDLTest_AssertPass("Call to SDLTest_GetFuzzerInvocationCount()");
|
||||
SDLTest_AssertCheck(fuzzerCount2 > fuzzerCount1, "Verify returned value, expected: >%d, got: %d", fuzzerCount1, fuzzerCount2);
|
||||
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ sdltest_randomNumber(void *arg)
|
|||
double dresult;
|
||||
Uint64 umax;
|
||||
Sint64 min, max;
|
||||
|
||||
|
||||
result = (Sint64)SDLTest_RandomUint8();
|
||||
umax = (1 << 8) - 1;
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8");
|
||||
|
@ -67,7 +67,7 @@ sdltest_randomNumber(void *arg)
|
|||
max = (1 << 7) - 1;
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8");
|
||||
SDLTest_AssertCheck(result >= min && result <= max, "Verify result value, expected: [%lld,%lld], got: %lld", min, max, result);
|
||||
|
||||
|
||||
result = (Sint64)SDLTest_RandomUint16();
|
||||
umax = (1 << 16) - 1;
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16");
|
||||
|
@ -99,7 +99,7 @@ sdltest_randomNumber(void *arg)
|
|||
dresult = (double)SDLTest_RandomUnitFloat();
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUnitFloat");
|
||||
SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, "Verify result value, expected: [0.0,1.0[, got: %e", dresult);
|
||||
|
||||
|
||||
dresult = (double)SDLTest_RandomFloat();
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomFloat");
|
||||
SDLTest_AssertCheck(dresult >= (double)(-FLT_MAX) && dresult <= (double)FLT_MAX, "Verify result value, expected: [%e,%e], got: %e", (double)(-FLT_MAX), (double)FLT_MAX, dresult);
|
||||
|
@ -110,7 +110,7 @@ sdltest_randomNumber(void *arg)
|
|||
|
||||
dresult = SDLTest_RandomDouble();
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomDouble");
|
||||
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
@ -133,56 +133,56 @@ sdltest_randomBoundaryNumberUint8(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 0 || uresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 100,
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 0xff, SDL_FALSE) returns 0 (no error) */
|
||||
uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 255, SDL_FALSE);
|
||||
|
@ -243,56 +243,56 @@ sdltest_randomBoundaryNumberUint16(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 0 || uresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 100,
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 0xffff, SDL_FALSE) returns 0 (no error) */
|
||||
uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 0xffff, SDL_FALSE);
|
||||
|
@ -333,7 +333,7 @@ sdltest_randomBoundaryNumberUint16(void *arg)
|
|||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @brief Calls to random boundary number generators for Uint32
|
||||
*/
|
||||
|
@ -353,56 +353,56 @@ sdltest_randomBoundaryNumberUint32(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 0 || uresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 100,
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 0xffffffff, SDL_FALSE) returns 0 (no error) */
|
||||
uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 0xffffffff, SDL_FALSE);
|
||||
|
@ -463,56 +463,56 @@ sdltest_randomBoundaryNumberUint64(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 0 || uresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomUint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
uresult == 100,
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %lld", uresult);
|
||||
|
||||
/* RandomUintXBoundaryValue(1, 0xffffffffffffffff, SDL_FALSE) returns 0 (no error) */
|
||||
uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, (Uint64)0xffffffffffffffffULL, SDL_FALSE);
|
||||
|
@ -573,56 +573,56 @@ sdltest_randomBoundaryNumberSint8(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 0 || sresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(SCHAR_MIN, 99, SDL_FALSE) returns 100 */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint8BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 100,
|
||||
"Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
"Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (no error) */
|
||||
sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE);
|
||||
|
@ -660,7 +660,7 @@ sdltest_randomBoundaryNumberSint8(void *arg)
|
|||
/* Clear error messages */
|
||||
SDL_ClearError();
|
||||
SDLTest_AssertPass("SDL_ClearError()");
|
||||
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
@ -683,56 +683,56 @@ sdltest_randomBoundaryNumberSint16(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 0 || sresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(SHRT_MIN, 99, SDL_FALSE) returns 100 */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint16BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 100,
|
||||
"Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
"Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE) returns SHRT_MIN (no error) */
|
||||
sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE);
|
||||
|
@ -773,7 +773,7 @@ sdltest_randomBoundaryNumberSint16(void *arg)
|
|||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @brief Calls to random boundary number generators for Sint32
|
||||
*/
|
||||
|
@ -784,7 +784,7 @@ sdltest_randomBoundaryNumberSint32(void *arg)
|
|||
char *lastError;
|
||||
Sint64 sresult;
|
||||
#if ((ULONG_MAX) == (UINT_MAX))
|
||||
Sint32 long_min = LONG_MIN;
|
||||
Sint32 long_min = LONG_MIN;
|
||||
Sint32 long_max = LONG_MAX;
|
||||
#else
|
||||
Sint32 long_min = INT_MIN;
|
||||
|
@ -800,56 +800,56 @@ sdltest_randomBoundaryNumberSint32(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 0 || sresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 100,
|
||||
"Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
"Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */
|
||||
sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE);
|
||||
|
@ -910,56 +910,56 @@ sdltest_randomBoundaryNumberSint64(void *arg)
|
|||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10,
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 11, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11,
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 12, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12,
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 13, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 20, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(20, 10, SDL_TRUE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(1, 20, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 0 || sresult == 21,
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(LLONG_MIN, 99, SDL_FALSE) returns 100 */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, 99, SDL_FALSE);
|
||||
SDLTest_AssertPass("Call to SDLTest_RandomSint64BoundaryValue");
|
||||
SDLTest_AssertCheck(
|
||||
sresult == 100,
|
||||
"Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
"Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %lld", sresult);
|
||||
|
||||
/* RandomSintXBoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE) returns LLONG_MIN (no error) */
|
||||
sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE);
|
||||
|
@ -1010,7 +1010,7 @@ sdltest_randomIntegerInRange(void *arg)
|
|||
Sint32 min, max;
|
||||
Sint32 result;
|
||||
#if ((ULONG_MAX) == (UINT_MAX))
|
||||
Sint32 long_min = LONG_MIN;
|
||||
Sint32 long_min = LONG_MIN;
|
||||
Sint32 long_max = LONG_MAX;
|
||||
#else
|
||||
Sint32 long_min = INT_MIN;
|
||||
|
@ -1101,11 +1101,11 @@ sdltest_randomAsciiString(void *arg)
|
|||
}
|
||||
SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters);
|
||||
if (nonAsciiCharacters) {
|
||||
SDLTest_LogError("Invalid result from generator: '%s'", result);
|
||||
SDLTest_LogError("Invalid result from generator: '%s'", result);
|
||||
}
|
||||
SDL_free(result);
|
||||
SDL_free(result);
|
||||
}
|
||||
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
@ -1139,9 +1139,9 @@ sdltest_randomAsciiStringWithMaximumLength(void *arg)
|
|||
}
|
||||
SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-Ascii characters, got: %d", nonAsciiCharacters);
|
||||
if (nonAsciiCharacters) {
|
||||
SDLTest_LogError("Invalid result from generator: '%s'", result);
|
||||
SDLTest_LogError("Invalid result from generator: '%s'", result);
|
||||
}
|
||||
SDL_free(result);
|
||||
SDL_free(result);
|
||||
}
|
||||
|
||||
/* Negative test */
|
||||
|
@ -1159,7 +1159,7 @@ sdltest_randomAsciiStringWithMaximumLength(void *arg)
|
|||
/* Clear error messages */
|
||||
SDL_ClearError();
|
||||
SDLTest_AssertPass("SDL_ClearError()");
|
||||
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
@ -1193,11 +1193,11 @@ sdltest_randomAsciiStringOfSize(void *arg)
|
|||
}
|
||||
SDLTest_AssertCheck(nonAsciiCharacters == 0, "Validate that result does not contain non-ASCII characters, got: %d", nonAsciiCharacters);
|
||||
if (nonAsciiCharacters) {
|
||||
SDLTest_LogError("Invalid result from generator: '%s'", result);
|
||||
SDLTest_LogError("Invalid result from generator: '%s'", result);
|
||||
}
|
||||
SDL_free(result);
|
||||
SDL_free(result);
|
||||
}
|
||||
|
||||
|
||||
/* Negative test */
|
||||
targetLen = 0;
|
||||
result = SDLTest_RandomAsciiStringOfSize(targetLen);
|
||||
|
@ -1213,7 +1213,7 @@ sdltest_randomAsciiStringOfSize(void *arg)
|
|||
/* Clear error messages */
|
||||
SDL_ClearError();
|
||||
SDLTest_AssertPass("SDL_ClearError()");
|
||||
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
@ -1222,58 +1222,58 @@ sdltest_randomAsciiStringOfSize(void *arg)
|
|||
|
||||
/* SDL_test test cases */
|
||||
static const SDLTest_TestCaseReference sdltestTest1 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_getFuzzerInvocationCount, "sdltest_getFuzzerInvocationCount", "Call to sdltest_GetFuzzerInvocationCount", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_getFuzzerInvocationCount, "sdltest_getFuzzerInvocationCount", "Call to sdltest_GetFuzzerInvocationCount", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest2 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomNumber, "sdltest_randomNumber", "Calls to random number generators", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomNumber, "sdltest_randomNumber", "Calls to random number generators", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest3 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint8, "sdltest_randomBoundaryNumberUint8", "Calls to random boundary number generators for Uint8", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint8, "sdltest_randomBoundaryNumberUint8", "Calls to random boundary number generators for Uint8", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest4 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint16, "sdltest_randomBoundaryNumberUint16", "Calls to random boundary number generators for Uint16", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint16, "sdltest_randomBoundaryNumberUint16", "Calls to random boundary number generators for Uint16", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest5 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint32, "sdltest_randomBoundaryNumberUint32", "Calls to random boundary number generators for Uint32", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint32, "sdltest_randomBoundaryNumberUint32", "Calls to random boundary number generators for Uint32", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest6 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint64, "sdltest_randomBoundaryNumberUint64", "Calls to random boundary number generators for Uint64", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint64, "sdltest_randomBoundaryNumberUint64", "Calls to random boundary number generators for Uint64", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest7 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint8, "sdltest_randomBoundaryNumberSint8", "Calls to random boundary number generators for Sint8", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint8, "sdltest_randomBoundaryNumberSint8", "Calls to random boundary number generators for Sint8", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest8 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint16, "sdltest_randomBoundaryNumberSint16", "Calls to random boundary number generators for Sint16", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint16, "sdltest_randomBoundaryNumberSint16", "Calls to random boundary number generators for Sint16", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest9 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint32, "sdltest_randomBoundaryNumberSint32", "Calls to random boundary number generators for Sint32", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint32, "sdltest_randomBoundaryNumberSint32", "Calls to random boundary number generators for Sint32", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest10 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint64, "sdltest_randomBoundaryNumberSint64", "Calls to random boundary number generators for Sint64", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint64, "sdltest_randomBoundaryNumberSint64", "Calls to random boundary number generators for Sint64", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest11 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomIntegerInRange, "sdltest_randomIntegerInRange", "Calls to ranged random number generator", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomIntegerInRange, "sdltest_randomIntegerInRange", "Calls to ranged random number generator", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest12 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomAsciiString, "sdltest_randomAsciiString", "Calls to default ASCII string generator", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomAsciiString, "sdltest_randomAsciiString", "Calls to default ASCII string generator", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest13 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomAsciiStringWithMaximumLength, "sdltest_randomAsciiStringWithMaximumLength", "Calls to random maximum length ASCII string generator", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomAsciiStringWithMaximumLength, "sdltest_randomAsciiStringWithMaximumLength", "Calls to random maximum length ASCII string generator", TEST_ENABLED };
|
||||
|
||||
static const SDLTest_TestCaseReference sdltestTest14 =
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomAsciiStringOfSize, "sdltest_randomAsciiStringOfSize", "Calls to fixed size ASCII string generator", TEST_ENABLED };
|
||||
{ (SDLTest_TestCaseFp)sdltest_randomAsciiStringOfSize, "sdltest_randomAsciiStringOfSize", "Calls to fixed size ASCII string generator", TEST_ENABLED };
|
||||
|
||||
/* Sequence of SDL_test test cases */
|
||||
static const SDLTest_TestCaseReference *sdltestTests[] = {
|
||||
&sdltestTest1, &sdltestTest2, &sdltestTest3, &sdltestTest4, &sdltestTest5, &sdltestTest6,
|
||||
&sdltestTest7, &sdltestTest8, &sdltestTest9, &sdltestTest10, &sdltestTest11, &sdltestTest12,
|
||||
&sdltestTest13, &sdltestTest14, NULL
|
||||
&sdltestTest1, &sdltestTest2, &sdltestTest3, &sdltestTest4, &sdltestTest5, &sdltestTest6,
|
||||
&sdltestTest7, &sdltestTest8, &sdltestTest9, &sdltestTest10, &sdltestTest11, &sdltestTest12,
|
||||
&sdltestTest13, &sdltestTest14, NULL
|
||||
};
|
||||
|
||||
/* SDL_test test suite (global) */
|
||||
SDLTest_TestSuiteReference sdltestTestSuite = {
|
||||
"SDLtest",
|
||||
NULL,
|
||||
sdltestTests,
|
||||
NULL
|
||||
"SDLtest",
|
||||
NULL,
|
||||
sdltestTests,
|
||||
NULL
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue