ddraw/tests: Check deviceGUID of enumerated devices.

Stefan Dösinger stefandoesinger at gmx.at
Thu Sep 6 17:19:53 CDT 2007


Am Donnerstag, 6. September 2007 16:02:59 schrieb David Hedberg:
> This patch adds tests to check the devices enumerated by
> IDirect3D7_EnumDevices . At least two games rely on the behavior
> tested by one of the test in this patch.
If wine behaves incorrectly and your test fails on wine, you have to send a 
fix before or in the same patch as the test. Alexandre has some scripts that 
run the conformance tests after each patch and refuses all patches that cause 
in test failures.

If you do not know how to fix the bug, or want to keep it unfixed for some 
other reason(e.g. the incorrect behavior is hard to fix and considered 
harmless), then you can mark the test as todo_wine. Then the tests script 
will ignore failures in the test. However, Alexandre will drop a note and ask 
for further explanation if a test marked todo_wine succeeds(e.g. we had a 
test that succeeded or failed for some time based on the features graphics 
driver).

todo_wine test(2 + 2 == 3.99998, "This is my test marked as TODO\n"); /* 
Microsoft does something insane here */

Other things:
+    if(!memcmp(&lpdd7->deviceGUID, &IID_IDirect3DRGBDevice, 
sizeof(IID_IDirect3DRGBDevice)))

You can use IsEqualGUID here. Sorry for not spotting this earlier.

+    IDirect3D7_EnumDevices(lpD3D, (LPD3DENUMDEVICESCALLBACK7) 
enumDevicesCallbackTest7, &d3d7et);
To get more compiler checks, you shouldn't cast the function to the right 
type, but use void *d3d7et, and cast it to the right pointer in your 
function. Debugging a wrong function pointer is a nasty thing ;-)



More information about the wine-devel mailing list