=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: include: Make wine_dbgstr_guid available in test.h for all tests.

Alexandre Julliard julliard at winehq.org
Tue Jan 28 13:33:24 CST 2014


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Sat Jan 25 15:24:22 2014 +0100

include: Make wine_dbgstr_guid available in test.h for all tests.

---

 include/wine/test.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/wine/test.h b/include/wine/test.h
index ab10399..f8b608f 100644
--- a/include/wine/test.h
+++ b/include/wine/test.h
@@ -65,6 +65,7 @@ extern void winetest_add_failures( LONG new_failures );
 extern void winetest_wait_child_process( HANDLE process );
 
 extern const char *wine_dbgstr_wn( const WCHAR *str, int n );
+extern const char *wine_dbgstr_guid( const GUID *guid );
 static inline const char *wine_dbgstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
 
 /* strcmpW is available for tests compiled under Wine, but not in standalone
@@ -523,6 +524,19 @@ const char *wine_dbgstr_wn( const WCHAR *str, int n )
     return res;
 }
 
+const char *wine_dbgstr_guid( const GUID *guid )
+{
+    char *res;
+
+    if (!guid) return "(null)";
+    res = get_temp_buffer( 39 ); /* CHARS_IN_GUID */
+    sprintf( res, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+             guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
+             guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
+             guid->Data4[5], guid->Data4[6], guid->Data4[7] );
+    return res;
+}
+
 /* Find a test by name */
 static const struct test *find_test( const char *name )
 {




More information about the wine-cvs mailing list