Commit 5935e950 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

advapi32/tests: Properly test sdlen value.

parent 78bd9c98
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment