Am Mittwoch, den 18.01.2006, 13:28 -0600 schrieb James Hawkins:
There is one case where I think it's leaning towards the OK side, though it still bugs me, and that is the advpack:GetVersionFromFile tests.
This test is in the wrong File (file.c and tests/advpack.c).
There's really no way to determine (easily) what the results for that function should be and then do an OK on the results,
Maybe something like:
major = minor = 0x00dead00 GetVersionFromFile .. and validate the Returned data with known limits (NT3.1 and win2003) 6.0 >= major >= 3.1
Or use GetFileVersionInfo / VerQueryValue to read the exact values from the dll.
GetVersionFromFile does not test for files without resources (GetModuleFileName on NULL for the advpack_test-binary as example) and for nonexistent Files.