-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
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.
On 21 October 2014 11:07, Stefan Dösinger stefandoesinger@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.