user32/tests: check return value of GetUpdateRect in test_validatergn (try 2)
Austin English
austinenglish at gmail.com
Sat May 22 03:55:15 CDT 2010
Set LastError and print it as a decimal.
--
-Austin
-------------- next part --------------
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 8f0f42d..cbd0ee7 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -3212,11 +3212,15 @@ static void test_validatergn(HWND hwnd)
InvalidateRect( child, NULL, 1);
GetWindowRect( child, &rc);
MapWindowPoints( NULL, hwnd, (POINT*) &rc, 2);
+ SetLastError(0xdeadbeef);
ret = GetUpdateRect( child, &rc2, 0);
+ ok(ret, "GetUpdateRect failed %d\n", GetLastError());
ok( rc2.right > rc2.left && rc2.bottom > rc2.top,
"Update rectangle is empty!\n");
ValidateRect( hwnd, &rc);
+ SetLastError(0xdeadbeef);
ret = GetUpdateRect( child, &rc2, 0);
+ ok(!ret, "GetUpdateRect failed %d\n", GetLastError());
ok( rc2.left == 0 && rc2.top == 0 && rc2.right == 0 && rc2.bottom == 0,
"Update rectangle %d,%d-%d,%d is not empty!\n", rc2.left, rc2.top,
rc2.right, rc2.bottom);
@@ -3227,7 +3231,9 @@ static void test_validatergn(HWND hwnd)
MapWindowPoints( NULL, hwnd, (POINT*) &rc, 2);
rgn = CreateRectRgnIndirect( &rc);
ValidateRgn( hwnd, rgn);
+ SetLastError(0xdeadbeef);
ret = GetUpdateRect( child, &rc2, 0);
+ ok(!ret, "GetUpdateRect failed %d\n", GetLastError());
ok( rc2.left == 0 && rc2.top == 0 && rc2.right == 0 && rc2.bottom == 0,
"Update rectangle %d,%d-%d,%d is not empty!\n", rc2.left, rc2.top,
rc2.right, rc2.bottom);
More information about the wine-patches
mailing list