[PATCH 1/2] comctl32: Added getter-setter tests for the tab control (second attempt)

Vitaliy Margolen wine-devel at kievinfo.com
Sun Mar 4 12:31:24 CST 2007


Lei Zhang wrote:
> On 3/3/07, Vitaliy Margolen <wine-devel at kievinfo.com> wrote:
>> The_Hagop wrote:
>> > +static void test_getters_setters(INT nTabs)
>> > +{
>> > +}
>> All your small functions should go inside this function. There is no
>> need to create 100 small functions that do 1-3 tests.
> 
> I suggested breaking up the test into smaller functions to help
> improve readability. If he rolls all the code into this function,
> after applying part 2 of this patch, it would have created a 200 line
> function that's harder to understand and maintain.

I don't see nothing wrong with 200 lines function that does exactly the
same things over and over again. But creating 10 functions that do 5
checks each is pointless. That really makes it hard to read the test.
Also don't forget that all the tests run on the same control. So if you
change state of the control in one place, it will affect all the rest.
If you doing that, then they all should either create their own control
to test, or be all in one place.

Vitaliy



More information about the wine-devel mailing list