Re: wininet: make a test pass on all versions of windows
"Lei Zhang" <thestig(a)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(a)winehq.org
On Nov 9, 2007 2:47 AM, Alexandre Julliard <julliard(a)winehq.org> wrote:
"Lei Zhang" <thestig(a)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(a)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?
"Lei Zhang" <thestig(a)google.com> writes:
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?
Any results that are returned by Windows are by definition acceptable. So yes, you just have to accept the various behaviors, and make Wine conform to one of them (usually the newest is preferable). There's no reason to check that the behavior matches the reported Windows version, unless there is a real app that does a version check at that point. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Lei Zhang