[PATCH 05/10] comctl32/tests: Add tests for BCM_SETSPLITINFO and BCM_GETSPLITINFO

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Apr 3 05:12:30 CDT 2019


On 4/3/19 12:48 PM, Nikolay Sivov wrote:
> On 4/1/19 3:19 PM, Gabriel Ivăncescu wrote:
> 
>> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
>> ---
>>   dlls/comctl32/tests/button.c | 210 +++++++++++++++++++++++++++++++++++
>>   1 file changed, 210 insertions(+)
>>
>> diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c
>> index fef3de5..abbee64 100644
>> --- a/dlls/comctl32/tests/button.c
>> +++ b/dlls/comctl32/tests/button.c
>> @@ -1427,6 +1427,213 @@ static void register_parent_class(void)
>>       RegisterClassA(&cls);
>>   }
>> +static void test_bcm_splitinfo(HWND hwnd)
>> +{
>> +    UINT button = GetWindowLongA(hwnd, GWL_STYLE) & BS_TYPEMASK;
>> +    int glyph_size = GetSystemMetrics(SM_CYMENUCHECK);
>> +    int border_w = GetSystemMetrics(SM_CXEDGE) * 2;
>> +    BUTTON_SPLITINFO info, dummy;
>> +    HIMAGELIST img;
>> +    BOOL ret;
>> +
>> +    /* Split buttons and their messages are not available pre-Vista */
>> +    if (broken(LOBYTE(LOWORD(GetVersion())) < 6)) return;
> 
> Version check is easy to avoid here, do a valid BCM_GETSPLITINFO and 
> win_skip() on failure, broken() is not meant for this.
> 

Ok, but I should probably only win_skip once since it's in a loop, 
right? Or have a skip message for each button?

> 
> I think such failure path in unnecessary, if img is NULL we'll just get 
> a bunch of additional test failures.
> 

Noted.



More information about the wine-devel mailing list