advapi32/tests: Properly test sdlen value.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2015-10-16 12:59:25 +02:00 committed by Alexandre Julliard
parent 78bd9c9811
commit 5935e9509b
1 changed files with 8 additions and 4 deletions

View File

@ -1803,6 +1803,7 @@ static void test_reg_query_info(void)
ok(classbufferW[0] == 0x5555, "classbufferW[0] = 0x%x\n", classbufferW[0]);
/* empty key */
sdlen = 0;
ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite);
ok(ret == ERROR_SUCCESS, "ret = %d\n", ret);
ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen);
@ -1812,10 +1813,11 @@ static void test_reg_query_info(void)
ok(values == 0, "values = %u\n", values);
ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen);
ok(maxvaluelen == 0, "maxvaluelen = %u\n", maxvaluelen);
ok(sdlen != 0, "sdlen = %u\n", sdlen);
todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen);
ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime);
ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime);
sdlen = 0;
ret = RegQueryInfoKeyW(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite);
ok(ret == ERROR_SUCCESS, "ret = %d\n", ret);
ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen);
@ -1825,7 +1827,7 @@ static void test_reg_query_info(void)
ok(values == 0, "values = %u\n", values);
ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen);
ok(maxvaluelen == 0, "maxvaluelen = %u\n", maxvaluelen);
ok(sdlen != 0, "sdlen = %u\n", sdlen);
todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen);
ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime);
ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime);
@ -1836,6 +1838,7 @@ static void test_reg_query_info(void)
ok(ret == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", ret);
/* with subkey & default value */
sdlen = 0;
ret = RegQueryInfoKeyA(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite);
ok(ret == ERROR_SUCCESS, "ret = %d\n", ret);
ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen);
@ -1845,10 +1848,11 @@ static void test_reg_query_info(void)
ok(values == 1, "values = %u\n", values);
ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen);
ok(maxvaluelen == sizeof("data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen);
ok(sdlen != 0, "sdlen = %u\n", sdlen);
todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen);
ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime);
ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime);
sdlen = 0;
ret = RegQueryInfoKeyW(subkey, NULL, &classlen, NULL, &subkeys, &maxsubkeylen, &maxclasslen, &values, &maxvaluenamelen, &maxvaluelen, &sdlen, &lastwrite);
ok(ret == ERROR_SUCCESS, "ret = %d\n", ret);
ok(classlen == strlen(subkey_class), "classlen = %u\n", classlen);
@ -1858,7 +1862,7 @@ static void test_reg_query_info(void)
ok(values == 1, "values = %u\n", values);
ok(maxvaluenamelen == 0, "maxvaluenamelen = %u\n", maxvaluenamelen);
ok(maxvaluelen == sizeof("data") * sizeof(WCHAR), "maxvaluelen = %u\n", maxvaluelen);
ok(sdlen != 0, "sdlen = %u\n", sdlen);
todo_wine ok(sdlen != 0, "sdlen = %u\n", sdlen);
ok(lastwrite.dwLowDateTime != 0, "lastwrite.dwLowDateTime = %u\n", lastwrite.dwLowDateTime);
ok(lastwrite.dwHighDateTime != 0, "lastwrite.dwHighDateTime = %u\n", lastwrite.dwHighDateTime);