Andrew Eikum : hlink/tests: Repair test to work as intended.

Alexandre Julliard julliard at winehq.org
Tue Dec 29 09:06:42 CST 2009


Module: wine
Branch: master
Commit: ff13146e92e2baa3b6f949143a9bc6ab625f9352
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ff13146e92e2baa3b6f949143a9bc6ab625f9352

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Mon Dec 28 17:40:52 2009 -0600

hlink/tests: Repair test to work as intended.

---

 dlls/hlink/tests/browse_ctx.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/dlls/hlink/tests/browse_ctx.c b/dlls/hlink/tests/browse_ctx.c
index e9806b8..483f604 100644
--- a/dlls/hlink/tests/browse_ctx.c
+++ b/dlls/hlink/tests/browse_ctx.c
@@ -41,17 +41,23 @@ static void test_SetInitialHlink(void)
     IMoniker *dummy, *found_moniker;
     IBindCtx *bindctx;
     WCHAR one[] = {'1',0};
-    WCHAR friend[] = {'f','r','i','e','n','d',0};
-    WCHAR *found_name;
+    WCHAR five[] = {'5',0};
+    WCHAR *found_name, *exp_name;
     HRESULT hres;
 
-    hres = CreateItemMoniker(one, one, &dummy);
+    hres = CreateBindCtx(0, &bindctx);
+    ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres);
+
+    hres = CreateItemMoniker(one, five, &dummy);
     ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
 
+    hres = IMoniker_GetDisplayName(dummy, bindctx, NULL, &exp_name);
+    ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres);
+
     hres = HlinkCreateBrowseContext(NULL, &IID_IHlinkBrowseContext, (void**)&bc);
     ok(hres == S_OK, "HlinkCreateBrowseContext failed: 0x%08x\n", hres);
 
-    hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, one, friend);
+    hres = IHlinkBrowseContext_SetInitialHlink(bc, dummy, one, NULL);
     ok(hres == S_OK, "SetInitialHlink failed: 0x%08x\n", hres);
 
     hres = IHlinkBrowseContext_GetHlink(bc, HLID_CURRENT, &found_hlink);
@@ -60,12 +66,9 @@ static void test_SetInitialHlink(void)
     hres = IHlink_GetMonikerReference(found_hlink, HLINKGETREF_DEFAULT, &found_moniker, NULL);
     ok(hres == S_OK, "GetMonikerReference failed: 0x%08x\n", hres);
 
-    hres = CreateBindCtx(0, &bindctx);
-    ok(hres == S_OK, "CreateBindCtx failed: 0x%08x\n", hres);
-
     hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name);
     ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres);
-    ok(strcmp_ww(found_name, friend), "Found display name should not have been %s\n", wine_dbgstr_w(friend));
+    ok(!strcmp_ww(found_name, exp_name), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(exp_name), wine_dbgstr_w(found_name));
 
     IBindCtx_Release(bindctx);
     IMoniker_Release(found_moniker);




More information about the wine-cvs mailing list