On 11 January 2013 09:49, Stefan Dösinger stefan@codeweavers.com wrote:
- Copyright 2006-2007, 2010 Stefan Dösinger for CodeWeavers
- Copyright 2006-2008,2010-2011,2013 Stefan Dösinger for CodeWeavers
I'm going to assume you're changing this because you checked it, but the formatting is a bit off.
- memset(&caps, 0, sizeof(caps));
That's redundant.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
Am 2013-01-11 12:24, schrieb Henri Verbeet:
- memset(&caps, 0, sizeof(caps));
That's redundant.
I don't think it's worth a big argument and resent the patches without it, but IMO zeroing output structures in the tests makes sense. Ideally we'd have a test that explicitly tests if GetDeviceCaps clears the structure. All other tests should clear the structure to avoid randomness - there might be a third d3d9 implementation where the author forgot to clear the structure.
Stefan
On 11 January 2013 12:49, Stefan Dösinger stefandoesinger@gmail.com wrote:
I don't think it's worth a big argument and resent the patches without it, but IMO zeroing output structures in the tests makes sense. Ideally we'd have a test that explicitly tests if GetDeviceCaps clears the structure. All other tests should clear the structure to avoid randomness - there might be a third d3d9 implementation where the author forgot to clear the structure.
Perhaps if we were explicitly testing GetDeviceCaps(), but it's probably basic enough that it's not needed. Everywhere else, the same reasoning applies as for not checking that e.g. HeapAlloc() succeeds in tests.