user32/tests: Make checks in test_LoadImageFile and test_LoadImage more comprehensive.
Gerald Pfeifer
gerald at pfeifer.com
Tue May 11 15:20:17 CDT 2010
See Ma', not removing any variables. :-)
test_LoadImage also missed this check. ret is used there in some other
place, but a manual review of mine revealed that.
Gerald
---
dlls/user32/tests/cursoricon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index e68eaac..a7be34f 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -762,7 +762,7 @@ static void test_LoadImageFile(const unsigned char * image_data,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError());
ret = WriteFile(handle, image_data, image_size, &bytes_written, NULL);
- ok(bytes_written == image_size, "test file created improperly.\n");
+ ok(ret && bytes_written == image_size, "test file created improperly.\n");
CloseHandle(handle);
/* Load as cursor. For all tested formats, this should fail */
@@ -852,7 +852,7 @@ static void test_LoadImage(void)
FILE_ATTRIBUTE_NORMAL, NULL);
ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError());
ret = WriteFile(handle, icon_data, ICON_SIZE, &bytes_written, NULL);
- ok(bytes_written == ICON_SIZE, "icon.ico created improperly.\n");
+ ok(ret && bytes_written == ICON_SIZE, "icon.ico created improperly.\n");
CloseHandle(handle);
/* Test loading an icon as a cursor. */
--
1.6.6.2
More information about the wine-patches
mailing list