wininet: make a test pass on all versions of windows

Lei Zhang thestig at google.com
Fri Nov 9 11:14:38 CST 2007


On Nov 9, 2007 2:47 AM, Alexandre Julliard <julliard at winehq.org> wrote:
> "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
>

How do we know which set of result to expect then? Do we consider all
three sets of behavior to be acceptable? Or just conform to the newest
behavior?



More information about the wine-devel mailing list