Hey Austin,
ok(ret, "WintrustSetRegPolicyFlags failed: %d\n", GetLastError()); size = sizeof(flags1); r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size); - ok(flags1 == flags3, "Got %08x flags instead of %08x\n", flags1, flags3); + ok(!r || r == ERROR_FILE_NOT_FOUND, "RegQueryValueEx failed: %d\n", r); + if (!r) + ok(flags1 == flags3, "Got %08x flags instead of %08x\n", flags1, flags3);
It seems to me that the introduction of ERROR_FILE_NOT_FOUND weakens the test. (Testing r should be done, thanks for fixing that.) I assume that, since WintrustSetRegPolicyFlags should have succeeded, the registry value should now exist. Is there a test failure you're also trying to fix?
Thanks, --Juan
On Thu, Feb 3, 2011 at 20:19, Juan Lang juan.lang@gmail.com wrote:
Hey Austin,
ok(ret, "WintrustSetRegPolicyFlags failed: %d\n", GetLastError()); size = sizeof(flags1); r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size);
- ok(flags1 == flags3, "Got %08x flags instead of %08x\n", flags1, flags3);
- ok(!r || r == ERROR_FILE_NOT_FOUND, "RegQueryValueEx failed: %d\n", r);
- if (!r)
- ok(flags1 == flags3, "Got %08x flags instead of %08x\n",
flags1, flags3);
It seems to me that the introduction of ERROR_FILE_NOT_FOUND weakens the test. (Testing r should be done, thanks for fixing that.) I assume that, since WintrustSetRegPolicyFlags should have succeeded, the registry value should now exist. Is there a test failure you're also trying to fix?
No, good catch. Too little caffeine -> copy/paste error. Resending, thanks.