comctl32/ipaddress: Use ok() test instead of assert()

Nikolay Sivov bunglehead at gmail.com
Wed May 27 06:21:48 CDT 2009


Paul Vriens wrote:
> Paul Vriens wrote:
>> Nikolay Sivov wrote:
>>> This test fails to create window sometimes on Win95,
>>> let's turn it into general failure.
>>>
>>> Changelog:
>>>     - replace assert() with ok() test
>>>
>>>> From b63fc6defb497505ecaab4921449327e875ab252 Mon Sep 17 00:00:00 2001
>>> From: Nikolay Sivov <bunglehead at gmail.com>
>>> Date: Wed, 27 May 2009 14:26:37 +0400
>>> Subject: Use ok() test instead of assert()
>>>
>>> ---
>>>  dlls/comctl32/tests/ipaddress.c |    3 +--
>>>  1 files changed, 1 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/dlls/comctl32/tests/ipaddress.c 
>>> b/dlls/comctl32/tests/ipaddress.c
>>> index d04223c..b8f30e4 100644
>>> --- a/dlls/comctl32/tests/ipaddress.c
>>> +++ b/dlls/comctl32/tests/ipaddress.c
>>> @@ -33,8 +33,6 @@ static HWND create_ipaddress_control (void)
>>>      handle = CreateWindowEx(0, WC_IPADDRESS, NULL,
>>>                  WS_BORDER|WS_VISIBLE, 0, 0, 0, 0,
>>>                  NULL, NULL, NULL, NULL);
>>> -    assert(handle);
>>> -
>>>      return handle;
>>>  }
>>>  
>>> @@ -45,6 +43,7 @@ static void test_get_set_text(void)
>>>      INT r;
>>>  
>>>      hwnd = create_ipaddress_control();
>>> +    ok(hwnd != NULL, "Expected window to be created\n");
>>>  
>>
>> Shouldn't you insert a return here when hwnd is NULL. The following 
>> tests will fail as well I guess.
>>
> Just had a look and it seems that only one box actually has this 
> failure. Maybe a win_skip() would be 'better'?
>
> hwnd = create_ipaddress_control();
> if (!hwnd)
> {
>     win_skip();
>     return;
> }
>
> Maybe even printing the last error in that win_skip() ?
>
> Especially as MSDN states:
>
> The IP address control is implemented in version 4.71 and later of 
> Comctl32.dll.
>
> And this box has 4.70.0.1146.
>
Maybe it's true. But what about two others boxes:
http://test.winehq.org/data/bf353f180d622cbf8508af7dbc9590e33293a6ab/95_gvg-w95/version.html
http://test.winehq.org/data/bf353f180d622cbf8508af7dbc9590e33293a6ab/95_fg-win95/version.html

Version reported as 4.0, so it's pure Win95 - tests pass on it.




More information about the wine-devel mailing list