user/tests: It is perfectly valid for some sysparams registry fields

to not be set if they have their default value. This is the case on
Windows for instance.
This commit is contained in:
Francois Gouget 2006-10-05 11:59:13 +02:00 committed by Alexandre Julliard
parent 33546e0869
commit f4ac836f58
1 changed files with 7 additions and 5 deletions

View File

@ -1466,18 +1466,20 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
rc=SystemParametersInfoA( SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &lpMm_orig, FALSE );
if (!test_error_msg(rc,"SPI_{GET,SET}MINIMIZEDMETRICS"))
return;
/* test registry */
/* Test registry. Note that it is perfectly valid for some fields to
* not be set.
*/
regval = metricfromreg( SPI_MINIMIZEDMETRICS_REGKEY, SPI_MINWIDTH_VALNAME, dpi);
ok( regval == lpMm_orig.iWidth, "wrong value in registry %d, expected %d\n",
ok( regval == -1 || regval == lpMm_orig.iWidth, "wrong value in registry %d, expected %d\n",
regval, lpMm_orig.iWidth);
regval = metricfromreg( SPI_MINIMIZEDMETRICS_REGKEY, SPI_MINHORZGAP_VALNAME, dpi);
ok( regval == lpMm_orig.iHorzGap, "wrong value in registry %d, expected %d\n",
ok( regval == -1 || regval == lpMm_orig.iHorzGap, "wrong value in registry %d, expected %d\n",
regval, lpMm_orig.iHorzGap);
regval = metricfromreg( SPI_MINIMIZEDMETRICS_REGKEY, SPI_MINVERTGAP_VALNAME, dpi);
ok( regval == lpMm_orig.iVertGap, "wrong value in registry %d, expected %d\n",
ok( regval == -1 || regval == lpMm_orig.iVertGap, "wrong value in registry %d, expected %d\n",
regval, lpMm_orig.iVertGap);
regval = metricfromreg( SPI_MINIMIZEDMETRICS_REGKEY, SPI_MINARRANGE_VALNAME, dpi);
ok( regval == lpMm_orig.iArrange, "wrong value in registry %d, expected %d\n",
ok( regval == -1 || regval == lpMm_orig.iArrange, "wrong value in registry %d, expected %d\n",
regval, lpMm_orig.iArrange);
/* set some new values */
lpMm_cur.iWidth = 180;