[PATCH 1/6] reg.exe/tests: Parameterise error messages
Henri Verbeet
hverbeet at gmail.com
Tue Oct 21 05:55:26 CDT 2014
On 21 October 2014 11:07, Stefan Dösinger <stefandoesinger at gmail.com> wrote:
> Am 2014-10-20 22:24, schrieb Jonathan Vollebregt:
>> - ok(type == REG_DWORD, "got wrong type %d, expected %d\n", type, REG_DWORD);
>> - ok(size == sizeof(DWORD), "got wrong size %d, expected %d\n", size, (int)sizeof(DWORD));
>> + ok(type == REG_DWORD, "got wrong type %u, expected %u\n", type, REG_DWORD);
>> + ok(size == sizeof(DWORD), "got wrong size %u, expected %u\n", size, (DWORD)sizeof(DWORD));
> I don't know if this is the canonical way to handle this. My gut feeling is that a cast to unsigned int would be nicer than a cast of DWORD, but I hope others can give a better answer.
>
I'd just go with
+ ok(size == sizeof(DWORD), "Got unexpected size %u.\n", size);
The only tests that really need to print the expected value are ones
where it's not constant, and those should be fairly rare.
More information about the wine-devel
mailing list