Re: [1/3] comctl32/tab: Add a test for TCM_SETITEMEXTRA
On 09/26/2010 05:08 PM, Nikolay Sivov wrote:
Add a test for TCM_SETITEMEXTRA
+static HWND parent_wnd; -static void test_curfocus(HWND parent_wnd, INT nTabs) +static void test_curfocus(void) { - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); + hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, 5);
So how is the global better then function parameter? Or a magic number? Vitaliy.
On 9/27/2010 10:14, Vitaliy Margolen wrote:
On 09/26/2010 05:08 PM, Nikolay Sivov wrote:
Add a test for TCM_SETITEMEXTRA
+static HWND parent_wnd; -static void test_curfocus(HWND parent_wnd, INT nTabs) +static void test_curfocus(void) { - hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); + hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, 5);
So how is the global better then function parameter? Or a magic number? We always use the same parent window and I don't see a reason of having more parent windows for tests, so this kind of flexibility is useless here. Same for tab count - we don't run test with tables or even with different tab count so it makes no sense to pass it as parameter.
Vitaliy.
On 09/27/2010 01:17 AM, Nikolay Sivov wrote:
We always use the same parent window and I don't see a reason of having more parent windows for tests, so this kind of flexibility is useless here. Same for tab count - we don't run test with tables or even with different tab count so it makes no sense to pass it as parameter.
It doesn't mean no one will use different parent o a different number of tabs in the future. Regardless, it should be a separate patch. Vitaliy.
On 9/27/2010 17:32, Vitaliy Margolen wrote:
On 09/27/2010 01:17 AM, Nikolay Sivov wrote:
We always use the same parent window and I don't see a reason of having more parent windows for tests, so this kind of flexibility is useless here. Same for tab count - we don't run test with tables or even with different tab count so it makes no sense to pass it as parameter.
It doesn't mean no one will use different parent o a different number of tabs in the future. Regardless, it should be a separate patch. Of course future is always a mystery, anything could be possibly done someday, for now it's a cleanup of practically unused function parameters. About separate patch - I don't think this change is important enough to produce a separate patch for it. Yes, for code it's important, for tests it could go with other changes imho.
Vitaliy.
participants (2)
-
Nikolay Sivov -
Vitaliy Margolen