On 04/27/2011 01:14 AM, Nikolay Sivov wrote:
Remove practically unused parameters from test functions
So how is global variable any better then local variable passed as function parameter?
IMHO this is s wrong thing to do - to move everything as global variables just to move it back whenever need arises.
Vitaliy.
On 4/27/2011 17:53, Vitaliy Margolen wrote:
On 04/27/2011 01:14 AM, Nikolay Sivov wrote:
Remove practically unused parameters from test functions
So how is global variable any better then local variable passed as function parameter?
Because there's no need to have different parent windows for currently present tests. I don't see a reason of having window handle created exactly once and then passed in each test function, it's tests after all with a straightforward structure.
IMHO this is s wrong thing to do - to move everything as global variables just to move it back whenever need arises.
I don't see when it's needed to pass different parent window. Even more, you'll need to create another parent before test function call. I prefer to have START_TEST(..){} as short as possible without any additional logic.
Ideally we shouldn't use the same parent for different test calls at all to make them completely separate and not affecting each other.
Vitaliy.
On 04/27/2011 09:47 AM, Nikolay Sivov wrote:
On 4/27/2011 17:53, Vitaliy Margolen wrote:
On 04/27/2011 01:14 AM, Nikolay Sivov wrote:
Remove practically unused parameters from test functions
So how is global variable any better then local variable passed as function parameter?
Because there's no need to have different parent windows for currently present tests. I don't see a reason of having window handle created exactly once and then passed in each test function, it's tests after all with a straightforward structure.
The reason - all global variables are bad, do not use them. Regardless why and how they are created and/or used.
Vitaliy.
On 04/28/2011 02:05 AM, Vitaliy Margolen wrote:
On 04/27/2011 09:47 AM, Nikolay Sivov wrote:
On 4/27/2011 17:53, Vitaliy Margolen wrote:
On 04/27/2011 01:14 AM, Nikolay Sivov wrote:
Remove practically unused parameters from test functions
So how is global variable any better then local variable passed as function parameter?
Because there's no need to have different parent windows for currently present tests. I don't see a reason of having window handle created exactly once and then passed in each test function, it's tests after all with a straightforward structure.
The reason - all global variables are bad, do not use them. Regardless why and how they are created and/or used.
All generalizations are bad, do not use them.
bye michael