-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-10-17 20:38, schrieb Jonathan Vollebregt:
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword1 /t REG_DWORD /f", &r); todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */),
"got exit code %d, expected 0\n", r);
"got exit code %d, expected 1\n", r);
r is a DWORD, which is an unsigned value, so %u is the correct format to print it.
There's not much point in printing the expected value. One can look it up by looking at the source file. Having the expected value twice only asks for inconsistencies like the one you're fixing here.
If you want to print the expected value I'd prefer something like this:
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected %u\n", r, REG_EXIT_SUCCESS);
or maybe
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %d, expected REG_EXIT_SUCCESS(%d)\n", r, REG_EXIT_SUCCESS);
That way you don't hardcode the numerical value of REG_EXIT_SUCCESS.
I recommend sending smaller patchsets, e.g. in your case send the tests, and once they are in, send the implementation changes. The tests make sense on their own, and that way you don't flood wine-patches too much.