[PATCH 3/7] comctl32/monthcal: Use a single calendar for hittesting tests, make point calculation at runtime

Paul Vriens paul.vriens.wine at gmail.com
Thu Oct 1 03:17:30 CDT 2009


On 10/01/2009 09:58 AM, Nikolay Sivov wrote:
> Paul Vriens wrote:
>> On 09/30/2009 12:10 PM, Nikolay Sivov wrote:
>>> Paul Vriens wrote:
>>>> On 09/29/2009 12:36 PM, Nikolay Sivov wrote:
>>>>> Changelog:
>>>>> - be sure we have a single view calendar for hittesting
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>> Hi Nikolay,
>>>>
>>>> This one introduces a test failure on several platforms:
>>>>
>>>> monthcal.c:1002: Test failed: Expected 10000, got 10002
>>>>
>>>> I fixed it on my NT4 box by checking the point more to the left (see
>>>> attached).
>>>>
>>>> I somehow doubt it's the correct fix though. Aren't these tests with
>>>> more-or-less fixed points error-prone (aka, locale/font/dpi dependent)?
>>>>
>>> Hi, Paul.
>>>
>>> I certainly noticed that. A problem for me is that it doesn't fail on
>>> mine XP. Could you please send me (offlist) a crossbuilt binary with
>>> this patch - I'm not able to built it myself at the moment.
>>>
>>> About fragility of these test - it was a reason why I use dynamic point
>>> calculation here, it was fixed before. So now it should be less dpi/font
>>> dependent I hope. It isn't affected by locale too much I think.
>>>
>>
>> Doing a little bit of testing (doing a hittest on the full range)
>> shows subtle differences between for example my NT4 and W2K3 box. The
>> W2K3 calendar shows "April, 2009" where NT4 shows "April 2009".
>>
>> Looking at
>> http://test.winehq.org/data/3fe20bdc7ea59b3e5711bed26d86c433109b21e7/xp_af-xpsp3/comctl32:monthcal.html
>>
>> even seems to indicate that with this locale the year is shown before
>> the month?
>>
>> I'm wondering what a good test would be (that covers all cases) or
>> whether most of these tests should be dropped?
>>
>> A normal order should be for "April 2009":
>>
>> - MCHT_TITLE
>> - MCHT_TITLEBTNPREV
>> - MCHT_TITLE
>> - MCHT_TITLEMONTH
>> - MCHT_TITLE
>> - MCHT_TITLEYEAR
>> - MCHT_TITLE
>> - MCHT_TITLEBTNNEXT
>> - MCHT_TITLE
>>
>> (That box mentioned would have MCHT_TITLEMONTH and MCHT_TITLEYEAR the
>> other way around).
>>
>> Maybe testing the order (both variations) would be fine enough?
>>
>> Any thoughts?
>>
> If some locales do this rectangles permutation it's another bug in Wine
> code, we currently don't depend on locale at this point.
>
> Maybe you're right and we should add alternate hittesting codes for a
> test results structure and make it differ on month/year cases.
> When Wine got support for this it will fail without such changes on it
> as well. So patch it please if you have time now.

I'll see what I can come up with, although probably later today.

>
> P.S. how could I change a locale on my Debian system for particular Wine
> run? Could you help me with that?

What I usually do is something like

LC_ALL=nl_NL.UTF-8 wine ....
or
LC_ALL=nl_NL.UTF-8 make monthcal.ok

More lang references can be found at http://wiki.winehq.org/TestingLanguages

-- 
Cheers,

Paul.



More information about the wine-devel mailing list