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: Thomas Faber <thomas.faber@reactos.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ffebb91910
commit
d7eb469d59
|
@ -154,8 +154,8 @@ static void test_moniker_isequal(void)
|
|||
ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res);
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) &&
|
||||
SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker1, NULL)))
|
||||
if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK &&
|
||||
IEnumMoniker_Next(enum_moniker0, 1, &moniker1, NULL) == S_OK)
|
||||
{
|
||||
res = IMoniker_IsEqual(moniker0, moniker1);
|
||||
ok(res == S_FALSE, "IMoniker_IsEqual should fail (res = %x)\n", res);
|
||||
|
@ -177,8 +177,8 @@ static void test_moniker_isequal(void)
|
|||
ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res);
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) &&
|
||||
SUCCEEDED(IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL)))
|
||||
if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK &&
|
||||
IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK)
|
||||
{
|
||||
res = IMoniker_IsEqual(moniker0, moniker1);
|
||||
ok(res == S_FALSE, "IMoniker_IsEqual should failed (res = %x)\n", res);
|
||||
|
@ -201,8 +201,8 @@ static void test_moniker_isequal(void)
|
|||
ok(SUCCEEDED(res), "Cannot create enum moniker (res = %x)\n", res);
|
||||
if (SUCCEEDED(res))
|
||||
{
|
||||
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) &&
|
||||
SUCCEEDED(IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL)))
|
||||
if (IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL) == S_OK &&
|
||||
IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL) == S_OK)
|
||||
{
|
||||
res = IMoniker_IsEqual(moniker0, moniker1);
|
||||
ok(res == S_OK, "IMoniker_IsEqual failed (res = %x)\n", res);
|
||||
|
|
Loading…
Reference in New Issue