wshom.ocx/tests: Fix an ok() message so it actually dumps the invalid iid.
Francois Gouget
fgouget at free.fr
Tue Jan 3 05:40:09 CST 2012
---
dlls/wshom.ocx/tests/wshom.c | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c
index 414378f..3f5e615 100644
--- a/dlls/wshom.ocx/tests/wshom.c
+++ b/dlls/wshom.ocx/tests/wshom.c
@@ -19,6 +19,8 @@
#define COBJMACROS
#define CONST_VTABLE
+#include <stdio.h>
+
#include <initguid.h>
#include <ole2.h>
#include <dispex.h>
@@ -26,6 +28,23 @@
#include "wshom.h"
#include "wine/test.h"
+
+static const char *debugstr_guid(REFIID riid)
+{
+ static char buf[50];
+
+ if(!riid)
+ return "(null)";
+
+ sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
+ riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
+ riid->Data4[5], riid->Data4[6], riid->Data4[7]);
+
+ return buf;
+}
+
+
#define EXPECT_HR(hr,hr_exp) \
ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
@@ -72,7 +91,7 @@ static void test_wshshell(void)
hr = ITypeInfo_GetTypeAttr(ti, &tattr);
EXPECT_HR(hr, S_OK);
- ok(IsEqualIID(&tattr->guid, &IID_IWshCollection), "got \n");
+ ok(IsEqualIID(&tattr->guid, &IID_IWshCollection), "got an incorrect iid: %s\n", debugstr_guid(&tattr->guid));
ITypeInfo_ReleaseTypeAttr(ti, tattr);
IWshShell3_Release(sh3);
--
1.7.7.3
More information about the wine-patches
mailing list