Fix assert format strings/parameters in testautomation modules; improve output of SDL_CompareSurfaces to aid debugging; update platform_testSetErrorInvalidInput for SDL changes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
diff --git a/include/SDL_test_compare.h b/include/SDL_test_compare.h
index f1353a8..0649ee3 100644
--- a/include/SDL_test_compare.h
+++ b/include/SDL_test_compare.h
@@ -51,9 +51,9 @@ extern "C" {
*
* \param surface Surface used in comparison
* \param referenceSurface Test Surface used in comparison
- * \param allowable_error Allowable difference (squared) in blending accuracy.
+ * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
*
- * \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
+ * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
*/
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
diff --git a/src/test/SDL_test_compare.c b/src/test/SDL_test_compare.c
index de70416..5fffe41 100644
--- a/src/test/SDL_test_compare.c
+++ b/src/test/SDL_test_compare.c
@@ -43,6 +43,7 @@ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface,
int bpp, bpp_reference;
Uint8 *p, *p_reference;
int dist;
+ int sampleErrorX, sampleErrorY, sampleDist;
Uint8 R, G, B, A;
Uint8 Rd, Gd, Bd, Ad;
char imageFilename[128];
@@ -86,6 +87,11 @@ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface,
/* Allow some difference in blending accuracy */
if (dist > allowable_error) {
ret++;
+ if (ret == 1) {
+ sampleErrorX = i;
+ sampleErrorY = j;
+ sampleDist = dist;
+ }
}
}
}
@@ -96,6 +102,8 @@ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface,
/* Save test image and reference for analysis on failures */
_CompareSurfaceCount++;
if (ret != 0) {
+ SDLTest_LogError("Comparison of pixels with allowable error of %i failed %i times.", allowable_error, ret);
+ SDLTest_LogError("First detected occurrence at position %i,%i with a squared RGB-difference of %i.", sampleErrorX, sampleErrorY, sampleDist);
SDL_snprintf(imageFilename, 127, "CompareSurfaces%04d_TestOutput.bmp", _CompareSurfaceCount);
SDL_SaveBMP(surface, imageFilename);
SDL_snprintf(referenceFilename, 127, "CompareSurfaces%04d_Reference.bmp", _CompareSurfaceCount);
diff --git a/test/testautomation_platform.c b/test/testautomation_platform.c
index 849d4e3..5228bfd 100644
--- a/test/testautomation_platform.c
+++ b/test/testautomation_platform.c
@@ -34,16 +34,16 @@ int platform_testTypes(void *arg)
int ret;
ret = _compareSizeOfType( sizeof(Uint8), 1 );
- SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", sizeof(Uint8) );
+ SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected 1", (unsigned long)sizeof(Uint8) );
ret = _compareSizeOfType( sizeof(Uint16), 2 );
- SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", sizeof(Uint16) );
+ SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", (unsigned long)sizeof(Uint16) );
ret = _compareSizeOfType( sizeof(Uint32), 4 );
- SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", sizeof(Uint32) );
+ SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", (unsigned long)sizeof(Uint32) );
ret = _compareSizeOfType( sizeof(Uint64), 8 );
- SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", sizeof(Uint64) );
+ SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", (unsigned long)sizeof(Uint64) );
return TEST_COMPLETED;
}
@@ -395,21 +395,17 @@ int platform_testSetErrorInvalidInput(void *arg)
len = SDL_strlen(lastError);
SDLTest_AssertCheck(len == 0,
"SDL_GetError(): expected message len 0, was len: %i",
- 0,
len);
- SDLTest_AssertCheck(SDL_strcmp(lastError, "") == 0,
- "SDL_GetError(): expected message '', was message: '%s'",
- lastError);
}
/* Set */
result = SDL_SetError(probeError);
- SDLTest_AssertPass("SDL_SetError()");
+ SDLTest_AssertPass("SDL_SetError('%s')", probeError);
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
/* Check for no-op */
result = SDL_SetError(invalidError);
- SDLTest_AssertPass("SDL_SetError()");
+ SDLTest_AssertPass("SDL_SetError(NULL)");
SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
lastError = (char *)SDL_GetError();
SDLTest_AssertCheck(lastError != NULL,
@@ -417,14 +413,9 @@ int platform_testSetErrorInvalidInput(void *arg)
if (lastError != NULL)
{
len = SDL_strlen(lastError);
- SDLTest_AssertCheck(len == SDL_strlen(probeError),
- "SDL_GetError(): expected message len %i, was len: %i",
- SDL_strlen(probeError),
+ SDLTest_AssertCheck(len == 0,
+ "SDL_GetError(): expected message len 0, was len: %i",
len);
- SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,
- "SDL_GetError(): expected message '%s', was message: '%s'",
- probeError,
- lastError);
}
/* Reset */
diff --git a/test/testautomation_render.c b/test/testautomation_render.c
index e380181..5a1bc9b 100644
--- a/test/testautomation_render.c
+++ b/test/testautomation_render.c
@@ -113,6 +113,9 @@ int render_testPrimitives (void *arg)
int checkFailCount1;
int checkFailCount2;
+ /* Clear surface. */
+ _clearScreen();
+
/* Need drawcolor or just skip test. */
SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor");
@@ -184,7 +187,10 @@ int render_testPrimitives (void *arg)
ret = SDL_RenderDrawLine(renderer, 79, 59, 50, 30 );
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret);
-
+
+ /* Make current */
+ SDL_RenderPresent(renderer);
+
/* See if it's the same. */
referenceSurface = SDLTest_ImagePrimitives();
_compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );
@@ -214,6 +220,9 @@ int render_testPrimitivesBlend (void *arg)
int checkFailCount2;
int checkFailCount3;
+ /* Clear surface. */
+ _clearScreen();
+
/* Need drawcolor and blendmode or just skip test. */
SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor");
SDLTest_AssertCheck(_hasBlendModes(), "_hasBlendModes");
@@ -326,6 +335,9 @@ int render_testPrimitivesBlend (void *arg)
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2);
SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderDrawPoint, expected: 0, got: %i", checkFailCount3);
+ /* Make current */
+ SDL_RenderPresent(renderer);
+
/* See if it's the same. */
referenceSurface = SDLTest_ImagePrimitivesBlend();
_compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );
@@ -358,6 +370,8 @@ render_testBlit(void *arg)
int i, j, ni, nj;
int checkFailCount1;
+ /* Clear surface. */
+ _clearScreen();
/* Need drawcolor or just skip test. */
SDLTest_AssertCheck(_hasDrawColor(), "_hasDrawColor)");
@@ -390,6 +404,9 @@ render_testBlit(void *arg)
}
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount1);
+ /* Make current */
+ SDL_RenderPresent(renderer);
+
/* See if it's the same */
referenceSurface = SDLTest_ImageBlit();
_compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );
@@ -424,6 +441,9 @@ render_testBlitColor (void *arg)
int checkFailCount1;
int checkFailCount2;
+ /* Clear surface. */
+ _clearScreen();
+
/* Create face surface. */
tface = _loadTestFace();
SDLTest_AssertCheck(tface != NULL, "Verify _loadTestFace() result");
@@ -458,6 +478,9 @@ render_testBlitColor (void *arg)
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount2);
+ /* Make current */
+ SDL_RenderPresent(renderer);
+
/* See if it's the same. */
referenceSurface = SDLTest_ImageBlitColor();
_compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );
@@ -492,6 +515,9 @@ render_testBlitAlpha (void *arg)
int checkFailCount1;
int checkFailCount2;
+ /* Clear surface. */
+ _clearScreen();
+
/* Need alpha or just skip test. */
SDLTest_AssertCheck(_hasTexAlpha(), "_hasTexAlpha");
@@ -529,6 +555,9 @@ render_testBlitAlpha (void *arg)
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount2);
+ /* Make current */
+ SDL_RenderPresent(renderer);
+
/* See if it's the same. */
referenceSurface = SDLTest_ImageBlitAlpha();
_compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );
@@ -644,6 +673,9 @@ render_testBlitBlend (void *arg)
/* Test None. */
_testBlitBlendMode( tface, SDL_BLENDMODE_NONE );
referenceSurface = SDLTest_ImageBlitBlendNone();
+
+ /* Make current and compare */
+ SDL_RenderPresent(renderer);
_compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );
SDL_FreeSurface(referenceSurface);
referenceSurface = NULL;
@@ -651,6 +683,9 @@ render_testBlitBlend (void *arg)
/* Test Blend. */
_testBlitBlendMode( tface, SDL_BLENDMODE_BLEND );
referenceSurface = SDLTest_ImageBlitBlend();
+
+ /* Make current and compare */
+ SDL_RenderPresent(renderer);
_compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );
SDL_FreeSurface(referenceSurface);
referenceSurface = NULL;
@@ -658,6 +693,9 @@ render_testBlitBlend (void *arg)
/* Test Add. */
_testBlitBlendMode( tface, SDL_BLENDMODE_ADD );
referenceSurface = SDLTest_ImageBlitBlendAdd();
+
+ /* Make current and compare */
+ SDL_RenderPresent(renderer);
_compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );
SDL_FreeSurface(referenceSurface);
referenceSurface = NULL;
@@ -665,6 +703,9 @@ render_testBlitBlend (void *arg)
/* Test Mod. */
_testBlitBlendMode( tface, SDL_BLENDMODE_MOD);
referenceSurface = SDLTest_ImageBlitBlendMod();
+
+ /* Make current and compare */
+ SDL_RenderPresent(renderer);
_compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );
SDL_FreeSurface(referenceSurface);
referenceSurface = NULL;
@@ -712,6 +753,9 @@ render_testBlitBlend (void *arg)
/* Clean up. */
SDL_DestroyTexture( tface );
+ /* Make current */
+ SDL_RenderPresent(renderer);
+
/* Check to see if final image matches. */
referenceSurface = SDLTest_ImageBlitBlendAll();
_compare(referenceSurface, ALLOWABLE_ERROR_BLENDED);
@@ -984,7 +1028,8 @@ _compare(SDL_Surface *referenceSurface, int allowable_error)
*
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor
- * http://wiki.libsdl.org/moin.cgi/SDL_RenderFillRect
+ * http://wiki.libsdl.org/moin.cgi/SDL_RenderClear
+ * http://wiki.libsdl.org/moin.cgi/SDL_RenderPresent
* http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawBlendMode
*/
static int
@@ -997,8 +1042,11 @@ _clearScreen(void)
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret);
/* Clear screen. */
- ret = SDL_RenderFillRect(renderer, NULL );
- SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderFillRect, expected: 0, got: %i", ret);
+ ret = SDL_RenderClear(renderer);
+ SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderClear, expected: 0, got: %i", ret);
+
+ /* Make current */
+ SDL_RenderPresent(renderer);
/* Set defaults. */
ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );
diff --git a/test/testautomation_rwops.c b/test/testautomation_rwops.c
index ac79022..3a1f682 100644
--- a/test/testautomation_rwops.c
+++ b/test/testautomation_rwops.c
@@ -105,7 +105,7 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
/* Set to start. */
i = SDL_RWseek(rw, 0, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
- SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %i", i);
+ SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %lli", i);
/* Test write. */
s = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1, 1);
@@ -120,12 +120,12 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
/* Test seek to random position */
i = SDL_RWseek( rw, seekPos, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
- SDLTest_AssertCheck(i == (Sint64)seekPos, "Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %i", seekPos, seekPos, i);
+ SDLTest_AssertCheck(i == (Sint64)seekPos, "Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %lli", seekPos, seekPos, i);
/* Test seek back to start */
i = SDL_RWseek(rw, 0, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
- SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %i", i);
+ SDLTest_AssertCheck(i == (Sint64)0, "Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %lli", i);
/* Test read */
s = SDL_RWread( rw, buf, 1, sizeof(RWopsHelloWorldTestString)-1 );
@@ -144,7 +144,7 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
SDLTest_AssertPass("Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded");
SDLTest_AssertCheck(
i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5),
- "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i",
+ "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %lli",
sizeof(RWopsHelloWorldTestString)-5,
i);
@@ -152,7 +152,7 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
SDLTest_AssertPass("Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded");
SDLTest_AssertCheck(
i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2),
- "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i",
+ "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %lli",
sizeof(RWopsHelloWorldTestString)-2,
i);
@@ -161,7 +161,7 @@ _testGenericRWopsValidations(SDL_RWops *rw, int write)
SDLTest_AssertPass("Call to SDL_RWseek(...,0,invalid_whence) succeeded");
SDLTest_AssertCheck(
i == (Sint64)(-1),
- "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i",
+ "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %lli",
i);
}
@@ -668,7 +668,7 @@ rwops_testFileWriteReadEndian(void)
/* Test seek to start */
result = SDL_RWseek( rw, 0, RW_SEEK_SET );
SDLTest_AssertPass("Call to SDL_RWseek succeeded");
- SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %i", result);
+ SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %lli", result);
/* Read test data */
BE16test = SDL_ReadBE16(rw);
diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c
index 646027a..2238ba4 100644
--- a/test/testautomation_sdltest.c
+++ b/test/testautomation_sdltest.c
@@ -1076,7 +1076,7 @@ sdltest_randomIntegerInRange(void *arg)
max = 0;
result = SDLTest_RandomIntegerInRange(min, max);
SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(0,0)");
- SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %d", min, max, result);
+ SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %d", result);
/* Swapped min-max */
min = (Sint32)SDLTest_RandomSint16();
diff --git a/test/testautomation_timer.c b/test/testautomation_timer.c
index ddf6a5f..0e83645 100644
--- a/test/testautomation_timer.c
+++ b/test/testautomation_timer.c
@@ -42,7 +42,7 @@ timer_getPerformanceCounter(void *arg)
result = SDL_GetPerformanceCounter();
SDLTest_AssertPass("Call to SDL_GetPerformanceCounter()");
- SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %lu", result);
+ SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %llu", result);
return TEST_COMPLETED;
}
@@ -57,7 +57,7 @@ timer_getPerformanceFrequency(void *arg)
result = SDL_GetPerformanceFrequency();
SDLTest_AssertPass("Call to SDL_GetPerformanceFrequency()");
- SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %lu", result);
+ SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %llu", result);
return TEST_COMPLETED;
}
diff --git a/test/testautomation_video.c b/test/testautomation_video.c
index 8a9fc47..f90ff5c 100644
--- a/test/testautomation_video.c
+++ b/test/testautomation_video.c
@@ -740,7 +740,7 @@ video_getWindowGammaRampNegative(void *arg)
/* Call against invalid window */
result = SDL_GetWindowGammaRamp(NULL, red, green, blue);
SDLTest_AssertPass("Call to SDL_GetWindowGammaRamp(window=NULL,r,g,b)");
- SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %f", result);
+ SDLTest_AssertCheck(result == -1, "Validate result value; expected: -1, got: %i", result);
_checkInvalidWindowError();
return TEST_COMPLETED;
@@ -1619,7 +1619,7 @@ video_getSetWindowData(void *arg)
/* Set data with NULL to clear */
result = (char *)SDL_SetWindowData(window, name, NULL);
- SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name, userdata);
+ SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name);
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result);
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
@@ -1627,7 +1627,7 @@ video_getSetWindowData(void *arg)
/* Set data with NULL to clear again */
result = (char *)SDL_SetWindowData(window, name, NULL);
- SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name, userdata);
+ SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name);
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);