[PATCH] comctl32/tooltips: Cut tooltip text at first tab char unless TTS_NOPREFIX is used

Dmitry Timoshkov dmitry at baikal.ru
Mon May 2 10:39:38 CDT 2016


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> @@ -316,49 +318,40 @@ static void test_gettext(void)
>      toolinfoA.lParam = 0xdeadbeef;
>      GetClientRect(hwnd, &toolinfoA.rect);
>      r = SendMessageA(hwnd, TTM_ADDTOOLA, 0, (LPARAM)&toolinfoA);
> -    if (r)
> -    {
> -        toolinfoA.hwnd = NULL;
> -        toolinfoA.uId = 0x1234ABCD;
> -        toolinfoA.lpszText = bufA;
> -        SendMessageA(hwnd, TTM_GETTEXTA, 0, (LPARAM)&toolinfoA);
> -        ok(strcmp(toolinfoA.lpszText, "") == 0, "lpszText should be an empty string\n");
>  
> -        toolinfoA.lpszText = bufA;
> -        SendMessageA(hwnd, TTM_GETTOOLINFOA, 0, (LPARAM)&toolinfoA);
> -        ok(toolinfoA.lpszText == NULL,
> -           "expected NULL, got %p\n", toolinfoA.lpszText);

'r' is assigned but not used. Perhaps it would be a good idea to test return
value of every SendMessage() call.

-- 
Dmitry.



More information about the wine-devel mailing list