[PATCH 2/2] comctl32: Added message sequence tests for the tab control

Vitaliy Margolen wine-devel at kievinfo.com
Sat Mar 3 10:55:52 CST 2007


The_Hagop wrote:
>      assert(tabHandle);
>  
> -    SetWindowLong(tabHandle, GWL_STYLE, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | style);
> -    SendMessage (tabHandle, WM_SETFONT, 0, (LPARAM) hFont);
> +    if (!tabHandle)
> +    {
> +        HeapFree(GetProcessHeap(), 0, info);
> +        return NULL;
> +    }
This check is redundant. assert will terminate the test if window was
not created properly. You probably should remove it and skip the test.

> @@ -448,22 +717,42 @@
>      INT nTabsRetrieved;
>      INT rowCount;
>  
> +    parent_wnd = createParentWindow();
> +    ok(parent_wnd != NULL, "Failed to create parent window!\n");
> +    ok_sequence(sequences, PARENT_SEQ_INDEX, create_parent_wnd_seq, "create parent window", TRUE);
> +    flush_sequences(sequences, NUM_MSG_SEQUENCES);
> +
No need to test window creation sequence here. It's tested in much more
details in user32/tests/msg.c
Also you are leaking parent window - you don't destroying it at the end
of the test. And, same as hTab, don't make it global. You are not using
it outside one function.

> @@ -474,6 +763,9 @@
>      test_getset_tooltip(hTab);
>  
>      DestroyWindow(hTab);
> +
> +    ok_sequence(sequences, TAB_SEQ_INDEX, destroy_tab_control_seq, "Tab sequence, after removing tab control from parent", FALSE);
> +    ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Parent sequence, after removing tab control from parent", FALSE);
>  }
>  
>  START_TEST(tab)
Same thing here - there are no common controls' related messages in
them- no need to test what's already being tested in the other places.

And last but not the least - your tests fail on windows 2k and xp pro in
interactive mode (set WINETEST_INTERACTIVE=1):
tab: 911 tests executed (0 marked as todo, 20 failures), 0 skipped.


Vitaliy.



More information about the wine-devel mailing list