|
@@ -1528,20 +1528,20 @@ static int video_getSetWindowData(void *arg)
|
|
}
|
|
}
|
|
|
|
|
|
/* Get non-existent data */
|
|
/* Get non-existent data */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name);
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
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(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
|
|
|
|
/* Set data */
|
|
/* Set data */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, userdata);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s)", name, userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s)", name, userdata);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
|
|
|
|
/* Get data (twice) */
|
|
/* Get data (twice) */
|
|
for (iteration = 1; iteration <= 2; iteration++) {
|
|
for (iteration = 1; iteration <= 2; iteration++) {
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [iteration %d]", name, iteration);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [iteration %d]", name, iteration);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
@@ -1549,103 +1549,103 @@ static int video_getSetWindowData(void *arg)
|
|
|
|
|
|
/* Set data again twice */
|
|
/* Set data again twice */
|
|
for (iteration = 1; iteration <= 2; iteration++) {
|
|
for (iteration = 1; iteration <= 2; iteration++) {
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, userdata);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [iteration %d]", name, userdata, iteration);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [iteration %d]", name, userdata, iteration);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
}
|
|
}
|
|
|
|
|
|
/* Get data again */
|
|
/* Get data again */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again]", name);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again]", name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
|
|
|
|
/* Set data with new data */
|
|
/* Set data with new data */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, userdata2);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, userdata2);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata]", name, userdata2);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata]", name, userdata2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
|
|
|
|
/* Set data with new data again */
|
|
/* Set data with new data again */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, userdata2);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, userdata2);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata again]", name, userdata2);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [new userdata again]", name, userdata2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
|
|
|
|
/* Get new data */
|
|
/* Get new data */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata2, result);
|
|
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(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
|
|
|
|
/* Set data with NULL to clear */
|
|
/* Set data with NULL to clear */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL)", name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
|
|
|
|
/* Set data with NULL to clear again */
|
|
/* Set data with NULL to clear again */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,NULL) [again]", name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, "Validate that userdata2 was not changed, expected: %s, got: %s", referenceUserdata2, userdata2);
|
|
|
|
|
|
/* Get non-existent data */
|
|
/* Get non-existent data */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name);
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
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(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
|
|
|
|
/* Get non-existent data new name */
|
|
/* Get non-existent data new name */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name2, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name2, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name2);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s)", name2);
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName2, name2) == 0, "Validate that name2 was not changed, expected: %s, got: %s", referenceName2, name2);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName2, name2) == 0, "Validate that name2 was not changed, expected: %s, got: %s", referenceName2, name2);
|
|
|
|
|
|
/* Set data (again) */
|
|
/* Set data (again) */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), name, userdata);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), name, userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [again, after clear]", name, userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(...%s,%s) [again, after clear]", name, userdata);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
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);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, "Validate that userdata was not changed, expected: %s, got: %s", referenceUserdata, userdata);
|
|
|
|
|
|
/* Get data (again) */
|
|
/* Get data (again) */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), name, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again, after clear]", name);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(..,%s) [again, after clear]", name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, "Validate that correct result was returned; expected: %s, got: %s", referenceUserdata, result);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, "Validate that name was not changed, expected: %s, got: %s", referenceName, name);
|
|
|
|
|
|
/* Set data with NULL name, valid userdata */
|
|
/* Set data with NULL name, valid userdata */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), NULL, userdata);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), NULL, userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL)");
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL)");
|
|
checkInvalidParameterError();
|
|
checkInvalidParameterError();
|
|
|
|
|
|
/* Set data with empty name, valid userdata */
|
|
/* Set data with empty name, valid userdata */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), "", userdata);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), "", userdata);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name='')");
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name='')");
|
|
checkInvalidParameterError();
|
|
checkInvalidParameterError();
|
|
|
|
|
|
/* Set data with NULL name, NULL userdata */
|
|
/* Set data with NULL name, NULL userdata */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), NULL, NULL);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), NULL, NULL);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL,userdata=NULL)");
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name=NULL,userdata=NULL)");
|
|
checkInvalidParameterError();
|
|
checkInvalidParameterError();
|
|
|
|
|
|
/* Set data with empty name, NULL userdata */
|
|
/* Set data with empty name, NULL userdata */
|
|
- SDL_SetProperty(SDL_GetWindowProperties(window), "", NULL);
|
|
|
|
|
|
+ SDL_SetPointerProperty(SDL_GetWindowProperties(window), "", NULL);
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name='',userdata=NULL)");
|
|
SDLTest_AssertPass("Call to SDL_SetWindowData(name='',userdata=NULL)");
|
|
checkInvalidParameterError();
|
|
checkInvalidParameterError();
|
|
|
|
|
|
/* Get data with NULL name */
|
|
/* Get data with NULL name */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), NULL, NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), NULL, NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(name=NULL)");
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(name=NULL)");
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
|
|
|
|
/* Get data with empty name */
|
|
/* Get data with empty name */
|
|
- result = (char *)SDL_GetProperty(SDL_GetWindowProperties(window), "", NULL);
|
|
|
|
|
|
+ result = (char *)SDL_GetPointerProperty(SDL_GetWindowProperties(window), "", NULL);
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(name='')");
|
|
SDLTest_AssertPass("Call to SDL_GetWindowData(name='')");
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
SDLTest_AssertCheck(result == NULL, "Validate that result is NULL");
|
|
|
|
|