Joel Holdsworth wrote:
I've run your new tests on Win95, Win98 and NT4 (all VMware):
Is there another way you can detect whether some XP (and up) tests can be run? We generally try not to use GetVersion() in our tests.
It turns out that the reason for the Win95 errors is that it calculates true-colour -> 16-bit dithers differently. These tests can be safely skipped, on these platforms.
In addition to the errors Win95 has, the other Win98 failures seem to be the product of my interpretation GetVersion returns being wrong. Easily fixed.
However, you're saying GetVersion is a problem. Why is that? And how else is one supposed to cope with GdiAlphaBlend not being present in pre-XP systems, as well as old-style dithering differences?
Hi Joel,
GetVersion() is not a problem in itself but we make an effort to decide what to test based on behavior not version. If it absolutely can not be avoided (and you will see some examples in the code) GetVersion() is accepted.
You reference GdiAlphaBlend(). That's not part of user32. If you are sure Windows uses this for alpha blend support you can always check for the availability of the GdiAlphaBlend() function:
static BOOL (WINAPI *pGdiAlphaBlend)(HDC,int,int,int,int,HDC,int,int,int,int,BLENDFUNCTION);
pGdiAlphaBlend = (void*)GetProcAddress(GetModuleHandle("gdi32.dll"), "GdiAlphaBlend");
if (!pGdiAlphaBlend) { We are on W95/W98/WinME/NT4 }
This will give you a chance to decide not to run the tests on these platforms. I already ran you tests on NT4 and they pass. This doesn't mean that all tests run on NT4 as you sometimes return() without having done an ok() test or with a trace() or skip()/win_skip(), like here:
+ hicon = create_test_icon(hdc, 2, 1, bpp, 0, (UINT32*)&color, sizeof(color)); + if (!hicon) return;
Is there a reason this could fail? If not you should add an ok() test for hicon. If yes, you should use skip() or win_skip() to show these tests are skipped but with a correct/expected reason.
There are more of these "blind" return's in your patch.