Make dlls-kernel-tests-file.c work on Windows 95 and XP.

Alexandre Julliard julliard at winehq.org
Mon Apr 26 14:00:31 CDT 2004


Jakob Eriksson <jakov at vmlinux.org> writes:

> +static int test_win9x_based()
> +{
> +    OSVERSIONINFOEX ver;
> +
> +    ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
> +    ok( GetVersionEx ((OSVERSIONINFO *) &ver), " --- Can't get OS version.\n" );
> +    if ((4 == ver.dwMajorVersion && 0 == ver.dwMinorVersion && 1381 == ver.dwBuildNumber)
> +        || ver.dwMajorVersion >= 5)
> +    {
> +        return 0;
> +    }
> +
> +    return 1;

You should not do version checks in tests, the checks should be based
on the features we are testing. Otherwise the results are going to
depend on the Windows version that Wine is configured for, which is
the wrong thing to do since the behavior of the Wine code in that case
does not depend on the version.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list