Module: wine Branch: master Commit: 62bb1eb2a4154f4045e8388c9798d490c8301c65 URL: http://source.winehq.org/git/wine.git/?a=commit;h=62bb1eb2a4154f4045e8388c97...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Thu Dec 24 12:31:59 2009 +0100
hlink/tests: Fix a test failure on Win9x/WinMe.
---
dlls/hlink/tests/browse_ctx.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/hlink/tests/browse_ctx.c b/dlls/hlink/tests/browse_ctx.c index 637f3c8..e9806b8 100644 --- a/dlls/hlink/tests/browse_ctx.c +++ b/dlls/hlink/tests/browse_ctx.c @@ -24,6 +24,16 @@
#include "wine/test.h"
+/* Win9x and WinMe don't have lstrcmpW */ +static int strcmp_ww(const WCHAR *str1, const WCHAR *str2) +{ + DWORD len1 = lstrlenW(str1); + DWORD len2 = lstrlenW(str2); + + if (len1 != len2) return 1; + return memcmp(str1, str2, len1 * sizeof(WCHAR)); +} + static void test_SetInitialHlink(void) { IHlinkBrowseContext *bc; @@ -55,7 +65,7 @@ static void test_SetInitialHlink(void)
hres = IMoniker_GetDisplayName(found_moniker, bindctx, NULL, &found_name); ok(hres == S_OK, "GetDisplayName failed: 0x%08x\n", hres); - ok(lstrcmpW(found_name, friend), "Found display name should have been %s, was: %s\n", wine_dbgstr_w(friend), wine_dbgstr_w(found_name)); + ok(strcmp_ww(found_name, friend), "Found display name should not have been %s\n", wine_dbgstr_w(friend));
IBindCtx_Release(bindctx); IMoniker_Release(found_moniker);