user32/tests: check return value of GetUpdateRect in test_validatergn (try 3)

Austin English austinenglish at gmail.com
Wed May 26 15:19:46 CDT 2010


GetUpdateRect isn't failing, so setting/checking LastError is inappropriate.

Thanks to AJ / Andrew Nguyen for pointing that out.

Passes WTB (win7 failures are already there):
https://testbot.winehq.org/JobDetails.pl?Key=2335

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 8f0f42d..eadad3a 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -3213,10 +3213,12 @@ static void test_validatergn(HWND hwnd)
     GetWindowRect( child, &rc);
     MapWindowPoints( NULL, hwnd, (POINT*) &rc, 2);
     ret = GetUpdateRect( child, &rc2, 0);
+    ok( ret == 1, "Expected GetUpdateRect to return non-zero, got %d\n", ret);
     ok( rc2.right > rc2.left && rc2.bottom > rc2.top,
             "Update rectangle is empty!\n");
     ValidateRect( hwnd, &rc);
     ret = GetUpdateRect( child, &rc2, 0);
+    ok( !ret, "Expected GetUpdateRect to return zero, got %d\n", ret);
     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);
@@ -3228,6 +3230,7 @@ static void test_validatergn(HWND hwnd)
     rgn = CreateRectRgnIndirect( &rc);
     ValidateRgn( hwnd, rgn);
     ret = GetUpdateRect( child, &rc2, 0);
+    ok( !ret, "Expected GetUpdateRect to return zero, got %d\n", ret);
     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