wininet: make a test pass on all versions of windows

Alexandre Julliard julliard at winehq.org
Fri Nov 9 04:47:52 CST 2007


"Lei Zhang" <thestig at google.com> writes:

> +
> +  {
> +    OSVERSIONINFOEX foo;
> +    BOOL r;
> +    memset(&foo, 0, sizeof(foo));
> +    foo.dwOSVersionInfoSize = sizeof(foo);
> +    r = GetVersionEx((OSVERSIONINFO *) &foo);
> +    if (!r)
> +    {
> +      skip("could not get windows version\n");
> +      return;
> +    }
> +
> +    is_sp1 = -1;
> +    if (foo.dwMajorVersion > 5)
> +      is_sp1 = 1;
> +    else if (foo.dwMajorVersion == 5)
> +    {
> +      if (foo.dwMinorVersion > 1)
> +        is_sp1 = 1;
> +      else if (foo.dwMinorVersion == 1)
> +      {
> +        if (foo.wServicePackMajor > 1)
> +          is_sp1 = 1;
> +        else if (foo.wServicePackMajor == 1)
> +          is_sp1 = 0;
> +      }
> +    }

Please don't add version checks in tests.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list