Jacek Caban jacek@codeweavers.com wrote:
expectedLen = lstrlen(prop.value);
brokenLen = lstrlen(prop.broken_value);
expectedLen = lstrlenA(prop.value); /* This won't be necessary once GetPropertyLength is implemented. */ receivedLen = -1;
@@ -8145,14 +8144,14 @@ static void test_IUri_GetPropertyLength(void) { hr, prop.expected, i, j); } todo_wine {
ok(receivedLen == expectedLen || broken(receivedLen == brokenLen),
ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)),
Please don't use lstrlenA in the tests.
* On Fri, 8 Nov 2013, Dmitry Timoshkov wrote:
@@ -8145,14 +8144,14 @@ static void test_IUri_GetPropertyLength(void) { hr, prop.expected, i, j); } todo_wine {
ok(receivedLen == expectedLen || broken(receivedLen == brokenLen),
ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)),
Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
S.
Saulius Krasuckas saulius2@ar.fi.lt wrote:
Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
It hides the bugs.
Dmitry Timoshkov dmitry@baikal.ru writes:
Saulius Krasuckas saulius2@ar.fi.lt wrote:
Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
It hides the bugs.
Not with -D__WINESRC__.
Alexandre Julliard julliard@winehq.org wrote:
Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
It hides the bugs.
Not with -D__WINESRC__.
PSDK or mingw headers don't have an idea about __WINESRC__.
Dmitry Timoshkov dmitry@baikal.ru writes:
Alexandre Julliard julliard@winehq.org wrote:
Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
It hides the bugs.
Not with -D__WINESRC__.
PSDK or mingw headers don't have an idea about __WINESRC__.
Yes but it can't possibly hide bugs, since all tests will be built and tested with the Wine headers too.
Alexandre Julliard julliard@winehq.org wrote:
Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
It hides the bugs.
Not with -D__WINESRC__.
PSDK or mingw headers don't have an idea about __WINESRC__.
Yes but it can't possibly hide bugs, since all tests will be built and tested with the Wine headers too.
I don't follow, it wouldn't hide bugs only if the tests would be built and tested *without* the Wine headers too.
Dmitry Timoshkov dmitry@baikal.ru writes:
Alexandre Julliard julliard@winehq.org wrote:
> Please don't use lstrlenA in the tests.
Dmitry, could you please elaborate more on that?
It hides the bugs.
Not with -D__WINESRC__.
PSDK or mingw headers don't have an idea about __WINESRC__.
Yes but it can't possibly hide bugs, since all tests will be built and tested with the Wine headers too.
I don't follow, it wouldn't hide bugs only if the tests would be built and tested *without* the Wine headers too.
What hides bugs is the exception handler in lstrlen. When the tests are built with Wine headers, there's no exception handler, so it will crash and the bug will be caught. The only way a bug could remain hidden is if no one ever builds that test with Wine headers, which is not realistic.
Alexandre Julliard julliard@winehq.org wrote:
> > Please don't use lstrlenA in the tests. > > Dmitry, could you please elaborate more on that?
It hides the bugs.
Not with -D__WINESRC__.
PSDK or mingw headers don't have an idea about __WINESRC__.
Yes but it can't possibly hide bugs, since all tests will be built and tested with the Wine headers too.
I don't follow, it wouldn't hide bugs only if the tests would be built and tested *without* the Wine headers too.
What hides bugs is the exception handler in lstrlen. When the tests are built with Wine headers, there's no exception handler, so it will crash and the bug will be caught. The only way a bug could remain hidden is if no one ever builds that test with Wine headers, which is not realistic.
That's correct, but it would be much better IMO to avoid any possible difference in the generated test binaries with different compilers and header sets. That's why any hidden dependency on __WINESRC__ on any other Wine specific things in headers should be avoided as much as possible.