Commit d7eb469d authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

devenum/tests: Fix return value check for IEnumMoniker_Next.

IEnumMoniker::Next returns S_FALSE when there are no (more) items, so checking SUCCEEDED does not make sense. Signed-off-by: 's avatarThomas Faber <thomas.faber@reactos.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ffebb919
...@@ -154,8 +154,8 @@ static void test_moniker_isequal(void) ...@@ -154,8 +154,8 @@ static void test_moniker_isequal(void)
ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res);
if (SUCCEEDED(res)) if (SUCCEEDED(res))
{ {
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) && if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK &&
SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker1, NULL))) IEnumMoniker_Next(enum_moniker0, 1, &moniker1, NULL) == S_OK)
{ {
res = IMoniker_IsEqual(moniker0, moniker1); res = IMoniker_IsEqual(moniker0, moniker1);
ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %x)\n", res); ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %x)\n", res);
...@@ -177,8 +177,8 @@ static void test_moniker_isequal(void) ...@@ -177,8 +177,8 @@ static void test_moniker_isequal(void)
ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res);
if (SUCCEEDED(res)) if (SUCCEEDED(res))
{ {
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) && if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK &&
SUCCEEDED(IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL))) IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK)
{ {
res = IMoniker_IsEqual(moniker0, moniker1); res = IMoniker_IsEqual(moniker0, moniker1);
ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %x)\n", res); ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %x)\n", res);
...@@ -201,8 +201,8 @@ static void test_moniker_isequal(void) ...@@ -201,8 +201,8 @@ static void test_moniker_isequal(void)
ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res); ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res);
if (SUCCEEDED(res)) if (SUCCEEDED(res))
{ {
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) && if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK &&
SUCCEEDED(IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL))) IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK)
{ {
res = IMoniker_IsEqual(moniker0, moniker1); res = IMoniker_IsEqual(moniker0, moniker1);
ok(res == S_OK, "IMoniker_IsEqual failed (res = %x)\n", res); ok(res == S_OK, "IMoniker_IsEqual failed (res = %x)\n", res);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment