Thanks, just a couple more tweaks.
On Mon, Mar 27, 2017 at 10:57:36PM +0800, Jactry Zeng wrote:
diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index e3c0f47256..b6275be8d2 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -135,6 +135,94 @@ static void test_devenum(IBindCtx *bind_ctx) if(sizeof(void*) == 4) ok(have_mrle, "mrle codec not found\n"); } +static void test_moniker_isequal(void) +{
- HRESULT res;
- ICreateDevEnum *create_devenum = NULL;
- IEnumMoniker *enum_moniker0 = NULL, *enum_moniker1 = NULL;
- IMoniker *moniker0 = NULL, *moniker1 = NULL;
- res = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
&IID_ICreateDevEnum, (LPVOID*)&create_devenum);
- if (res)
Please use FAILED() here.
if (SUCCEEDED(IEnumMoniker_Next(enum_moniker0, 1, &moniker0, NULL)) &&
SUCCEEDED(IEnumMoniker_Next(enum_moniker1, 1, &moniker1, NULL)))
{
res = IMoniker_IsEqual(moniker0, moniker1);
ok(SUCCEEDED(res), "IMoniker_IsEqual failed (res = %x)\n", res);
res = IMoniker_IsEqual(moniker1, moniker0);
ok(SUCCEEDED(res), "IMoniker_IsEqual failed (res = %x)\n", res);
These should be compared against S_OK, otherwise S_FALSE will also pass the test.
Andrew