2008/7/28 Chris Ahrendt celticht32@aol.com:
Problem with this is if any of the above values change for whatever reason then it breaks the verification. I agree for the most part that testing the range makes sense but I think in this case it is safer to do it this way. But if the general consensus is to use the range that is an easy change.
The values aren't just going to change, they're essentially part of the D3D interface.
Default:
Did you try to compile your code?
Yes and got warnings but no errors... and that leads to another question I have.. why would I get the warnings on the switch statement about the case items being unhandled? I looked it up and the suggested thing to fix the warnings was to add the default which was already there. That warning didn't make sense to me...
C is case-sensitive, "Default" is not the same as "default". In general, you shouldn't submit patches that generate warnings.
So I need to write the test cases for d3d9 since this is the module which would be effected.
These changes affect all of ddraw, d3d8 and d3d9, so you'd need tests for all of them. Note that for d3d9 there are already some tests for SetRenderState() in dlls/d3d9/tests/stateblock.c