James Hawkins : user32: Fix two tests that fail in win2k3 and above.

Alexandre Julliard julliard at winehq.org
Thu May 29 06:52:53 CDT 2008


Module: wine
Branch: master
Commit: 333f83ffd7d0570a74eec6f4e4361bd810fb687e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=333f83ffd7d0570a74eec6f4e4361bd810fb687e

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Wed May 28 19:25:24 2008 -0500

user32: Fix two tests that fail in win2k3 and above.

---

 dlls/user32/tests/sysparams.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c
index 8e95ffd..af6c731 100644
--- a/dlls/user32/tests/sysparams.c
+++ b/dlls/user32/tests/sysparams.c
@@ -1917,9 +1917,12 @@ static void test_SPI_SETLOWPOWERACTIVE( void )         /*     85 */
                       SPI_SETLOWPOWERACTIVE_VALNAME,
                       vals[i] ? "1" : "0" );
 
+        /* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */
         rc=SystemParametersInfoA( SPI_GETLOWPOWERACTIVE, 0, &v, 0 );
         ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
-        eq( v, vals[i], "SPI_GETLOWPOWERACTIVE", "%d" );
+        ok(v == vals[i] ||
+           v == 0, /* win2k3 */
+           "SPI_GETLOWPOWERACTIVE: got %d instead of 0 or %d\n", v, vals[i]);
     }
 
     rc=SystemParametersInfoA( SPI_SETLOWPOWERACTIVE, old_b, 0, SPIF_UPDATEINIFILE );
@@ -1951,9 +1954,12 @@ static void test_SPI_SETPOWEROFFACTIVE( void )         /*     86 */
                       SPI_SETPOWEROFFACTIVE_VALNAME,
                       vals[i] ? "1" : "0" );
 
+        /* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */
         rc=SystemParametersInfoA( SPI_GETPOWEROFFACTIVE, 0, &v, 0 );
         ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
-        eq( v, vals[i], "SPI_GETPOWEROFFACTIVE", "%d" );
+        ok(v == vals[i] ||
+           v == 0, /* win2k3 */
+           "SPI_GETPOWEROFFACTIVE: got %d instead of 0 or %d\n", v, vals[i]);
     }
 
     rc=SystemParametersInfoA( SPI_SETPOWEROFFACTIVE, old_b, 0, SPIF_UPDATEINIFILE );




More information about the wine-cvs mailing list